Skip to content

Commit

Permalink
Update dependencies & changes (#26)
Browse files Browse the repository at this point in the history
* Update dependencies & changes

* Try fix action to check changelog

* ...

* mailto links

added malto link for each maintainer with subject title

* removed banner

* Shorten README.md

* bump version

---------

Co-authored-by: Thibaud Coroller <[email protected]>
  • Loading branch information
kruscpe1 and tcoroller authored Apr 19, 2024
1 parent 97b898f commit b707d2f
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 11 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/check-changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: "Check Changelog Update"

on:
pull_request:
branches: [ main ] # or the default branch of your repo

jobs:
check-changelog:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Check for Changelog Updates
run: |
HEAD_CHANGELOG_HASH=$(git log -1 --format=format:%H -- docs/CHANGELOG.md)
git fetch origin ${{ github.base_ref }}
git checkout origin/${{ github.base_ref }}
BASE_CHANGELOG_HASH=$(git log -1 --format=format:%H -- docs/CHANGELOG.md)
if [ "$BASE_CHANGELOG_HASH" == "$HEAD_CHANGELOG_HASH" ]; then
echo "Changelog must be updated with every pull request."
exit 1
fi
30 changes: 21 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
# Deep survival analysis made easy

> :warning: :construction: **We are still working on the publication of this project and appreciate your patience until everything will be ready.** :construction: :warning:
![CodeQC](https://github.com/Novartis/torchsurv/actions/workflows/codeqc.yml/badge.svg?branch=main)
![Docs](https://github.com/Novartis/torchsurv/actions/workflows/docs.yml/badge.svg?branch=main)
[![PyPI - Version](https://img.shields.io/pypi/v/torchsurv)](https://pypi.org/project/torchsurv/)
[![arXiv](https://img.shields.io/badge/arXiv-2404.10761-f9f107.svg)](https://arxiv.org/abs/2404.10761)
[![Documentation](https://img.shields.io/badge/GithubPage-Sphinx-blue)](https://opensource.nibr.com/torchsurv/)
[![Downloads](https://static.pepy.tech/badge/torchsurv)](https://pepy.tech/project/torchsurv)


`TorchSurv` is a Python package that serves as a companion tool to perform deep survival modeling within the `PyTorch` environment. Unlike existing libraries that impose specific parametric forms on users, `TorchSurv` enables the use of custom `PyTorch`-based deep survival models. With its lightweight design, minimal input requirements, full `PyTorch` backend, and freedom from restrictive survival model parameterizations, `TorchSurv` facilitates efficient survival model implementation, particularly beneficial for high-dimensional input data scenarios.

## TL;DR
Expand Down Expand Up @@ -43,15 +40,15 @@ cindex.p_value(method="noether", alternative="two_sided")
cindex.compare(cindexB)
```

## Installation
## Installation and dependencies

First, install the package:

```bash
pip install torchsurv
```

or for local installation (from package root)
or for local installation (from package root / clone of this git repository):

```bash
pip install -e .
Expand All @@ -60,6 +57,21 @@ pip install -e .
If you use Conda, you can install requirements into a conda environment
using the `environment.yml` file included in the `dev` subfolder of the source repository.

Using the package has the following dependencies which will be installed automatically via pip:

* [torch](https://pytorch.org/): Consider pre-installing if you have specific system requirements (CPU / GPU / CUDA version).
* [scipy](https://scipy.org/): We use some statistical helper functions to calculate metrics.
* [torchmetrics](https://lightning.ai/docs/torchmetrics/stable/): We use some statistical helper functions to calculate metrics.

To run the tests and example notebooks, you need to install the following additional packages:

* [lifelines](https://lifelines.readthedocs.io/en/latest/)
* [scikit-survival](https://scikit-survival.readthedocs.io/en/stable/)
* [pytorch_lightning](https://lightning.ai/docs/pytorch/stable/) (and [lightning](https://lightning.ai/))

To build the documentation and for package development, please see [the development notes](https://opensource.nibr.com/torchsurv/devnotes.html) and
[dev/environment.yml](dev/environment.yml).

## Getting started

We recommend starting with the [introductory guide](https://opensource.nibr.com/torchsurv/notebooks/introduction.html), where you'll find an overview of the package's functionalities.
Expand Down Expand Up @@ -213,10 +225,10 @@ By contributing to this project, you agree to license your contributions under t

## Contacts

* Thibaud Coroller [email protected] `(creator, maintainer)`
* Mélodie Monod [email protected] `(creator, maintainer)`
* Peter Krusche [email protected] `(author, maintainer)`
* Qian Cao [email protected] `(author, maintainer)`
* [Thibaud Coroller](mailto:[email protected]?subject=TorchSurv) `(creator, maintainer)`
* [Mélodie Monod](mailto:[email protected]?subject=TorchSurv) `(creator, maintainer)`
* [Peter Krusche](mailto:[email protected]?subject=TorchSurv) `(author, maintainer)`
* [Qian Cao](mailto:[email protected]@novartis.com?subject=TorchSurv) `(author, maintainer)`

If you have any questions, suggestions, or feedback, feel free to reach out the developement team [us](https://opensource.nibr.com/torchsurv/AUTHORS.html).

Expand Down
6 changes: 6 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
Change log
=========

Version 0.1.2
-------------

* Updated package documentation with publication links & badges (#9, #14, #16, #19, #21, #22, #24)
* Fixed and documented package dependencies (#1)

Version 0.1.1
-------------

Expand Down
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "torchsurv"
version = "0.1.1"
version = "0.1.2"
description = "Survival analysis made easy with pytorch"
authors = [
{name = "Thibaud Coroller", email = "[email protected]"},
Expand All @@ -30,7 +30,6 @@ classifiers = [

dependencies = [
"torch",
"lightning",
"scipy",
"numpy",
"torchmetrics",
Expand Down

0 comments on commit b707d2f

Please sign in to comment.