Skip to content

Commit

Permalink
Merge pull request Novartis#13 from Novartis/12-make-pypi-package
Browse files Browse the repository at this point in the history
Create pypi package & fix dependencies
  • Loading branch information
kruscpe1 authored Apr 16, 2024
2 parents c5982a8 + 186edd2 commit 5e40f70
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 2 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Test-build Python Package

on: push

jobs:
build:
runs-on: ubuntu-latest

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

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.10"

- name: Install dependencies
run: |
pip install --upgrade pip
pip install build==0.7.0 pep517 setuptools wheel twine
- name: Build PyPI release
run: python -m build

- name: Check PyPI release
run: python -m twine check dist/*

- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: Python-package
path: dist

34 changes: 32 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["setuptools", "wheel"]
requires = ["setuptools>=42.0", "wheel"]
build-backend = "setuptools.build_meta"

[project]
Expand All @@ -9,9 +9,39 @@ description = "Survival analysis made easy with pytorch"
authors = [
{name = "Thibaud Coroller", email = "[email protected]"},
{name = "Melodie Monod", email = "[email protected]"},
{name = "Peter Krusche", email = "[email protected]"}
{name = "Peter Krusche", email = "[email protected]"},
{name = "Qian Cao", email = "[email protected]"}
]

license = {file = "LICENSE.txt"}
readme = "README.md"

keywords = ["example", "project", "tutorial"]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
]

dependencies = [
"torch",
"lightning",
"scipy",
"numpy",
"torchmetrics",
]

[project.urls]
Homepage = "https://github.com/Novartis/torchsurv"
Repository = "https://github.com/Novartis/torchsurv"
Documentation = "https://opensource.nibr.com/torchsurv/"
IssueTracker = "https://github.com/Novartis/torchsurv/issues"
Changelog = "https://opensource.nibr.com/torchsurv/CHANGELOG.html"

[tool.pylint]
max-line-length = 250
Expand Down

0 comments on commit 5e40f70

Please sign in to comment.