From 402d1246e82ad7fe3479e86ae7e4fd71058f57b3 Mon Sep 17 00:00:00 2001 From: Peter Krusche Date: Mon, 15 Apr 2024 18:00:28 +0200 Subject: [PATCH 1/6] Upd pyproject.toml --- pyproject.toml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index ad1edea..c847c31 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,10 +9,19 @@ description = "Survival analysis made easy with pytorch" authors = [ {name = "Thibaud Coroller", email = "thibaud.coroller@novartis.com"}, {name = "Melodie Monod", email = "melodie.monod@novartis.com"}, - {name = "Peter Krusche", email = "peter.krusche@novartis.com"} + {name = "Peter Krusche", email = "peter.krusche@novartis.com"}, + {name = "Qian Cao", email = "qian.cao@fda.hhs.com"} ] license = {file = "LICENSE.txt"} +dependencies = [ + "torch", + "lightning", + "scipy", + "numpy", + "torchmetrics", +] + [tool.pylint] max-line-length = 250 disable = ["C0114", "C0116", "R0801", "R0915", "E0402"] From 25e872bd3450d5cc3eb30519678ac75aaa52a2ed Mon Sep 17 00:00:00 2001 From: Peter Krusche Date: Mon, 15 Apr 2024 21:40:40 +0200 Subject: [PATCH 2/6] more metadata --- pyproject.toml | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c847c31..0587552 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [build-system] -requires = ["setuptools", "wheel"] +requires = ["setuptools>=42.0", "wheel"] build-backend = "setuptools.build_meta" [project] @@ -12,7 +12,21 @@ authors = [ {name = "Peter Krusche", email = "peter.krusche@novartis.com"}, {name = "Qian Cao", email = "qian.cao@fda.hhs.com"} ] + 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", @@ -22,6 +36,13 @@ dependencies = [ "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 disable = ["C0114", "C0116", "R0801", "R0915", "E0402"] From b3481230e72f40eb1d420e2927c137b49dd8e9a4 Mon Sep 17 00:00:00 2001 From: Peter Krusche Date: Mon, 15 Apr 2024 22:19:08 +0200 Subject: [PATCH 3/6] Add test build script --- .github/workflows/build-release.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/build-release.yml diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml new file mode 100644 index 0000000..12a31e1 --- /dev/null +++ b/.github/workflows/build-release.yml @@ -0,0 +1,29 @@ +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 build=0.7.0 pep517 setuptools wheel + + - name: Build PyPI release + run: python -m build + + - name: Upload artifact + uses: actions/upload-artifact@v2 + with: + name: Python-package + path: dist + From 0efad79eace72784d195f6e563831b75efbfca1a Mon Sep 17 00:00:00 2001 From: Peter Krusche Date: Mon, 15 Apr 2024 22:20:45 +0200 Subject: [PATCH 4/6] typo --- .github/workflows/build-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index 12a31e1..bc52363 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -13,7 +13,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v2 with: - python-version: 3.10 + python-version: "3.10" - name: Install dependencies run: pip install build=0.7.0 pep517 setuptools wheel From 952831d3d10c79c1767e080485e08237c1e109b0 Mon Sep 17 00:00:00 2001 From: Peter Krusche Date: Mon, 15 Apr 2024 22:22:04 +0200 Subject: [PATCH 5/6] install more deps --- .github/workflows/build-release.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index bc52363..673855c 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -16,7 +16,9 @@ jobs: python-version: "3.10" - name: Install dependencies - run: pip install build=0.7.0 pep517 setuptools wheel + run: | + pip install --upgrade pip + pip install build==0.7.0 pep517 setuptools wheel - name: Build PyPI release run: python -m build From 186edd298b21b89981a7567809a97bd999a974c7 Mon Sep 17 00:00:00 2001 From: Peter Krusche Date: Mon, 15 Apr 2024 22:23:42 +0200 Subject: [PATCH 6/6] add check step --- .github/workflows/build-release.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index 673855c..324137e 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -18,11 +18,14 @@ jobs: - name: Install dependencies run: | pip install --upgrade pip - pip install build==0.7.0 pep517 setuptools wheel + 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: