Skip to content

Commit

Permalink
Update dependencies & changes
Browse files Browse the repository at this point in the history
  • Loading branch information
kruscpe1 committed Apr 18, 2024
1 parent 8db63f2 commit 7acf7a4
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 4 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/check-changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
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: |
git fetch origin ${{ github.base_ref }}
git checkout origin/${{ github.base_ref }}
BASE_CHANGELOG_HASH=$(git log -1 --format=format:%H -- CHANGELOG.md)
git checkout ${{ github.head_ref }}
HEAD_CHANGELOG_HASH=$(git log -1 --format=format:%H -- CHANGELOG.md)
if [ "$BASE_CHANGELOG_HASH" == "$HEAD_CHANGELOG_HASH" ]; then
echo "Changelog must be updated with every pull request."
exit 1
fi
26 changes: 23 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
[![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 +42,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 +59,27 @@ 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 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, you will need the following packages:

* [sphinx](https://www.sphinx-doc.org/)
* [myst-parser](https://myst-parser.readthedocs.io/)
* [nbsphinx](https://nbsphinx.readthedocs.io/)
* [sphinxcontrib-bibtex](https://pypi.org/project/sphinxcontrib-bibtex)
* [sphinx-book-theme](https://pypi.org/project/sphinx-book-theme)
* [pandoc](https://pypi.org/project/pandoc)

## 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
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
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ classifiers = [

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

0 comments on commit 7acf7a4

Please sign in to comment.