Skip to content

Commit cfae5ae

Browse files
authored
[MNT] Migrate packaging to pyproject.toml (#594)
Migrates packaging to `pyproject.toml`. * move the dependency sets from `requirements` to `pyproject.toml` * move `setup.py` and `setup.cfg` to `pyproject.toml` Also carries out a minimal improvement of the testing workflow: * remove outdated python 3.8 and 3.9 * add concurrency handling Depends on #597 which should be merged first
1 parent 023db27 commit cfae5ae

6 files changed

Lines changed: 111 additions & 145 deletions

File tree

.github/workflows/label-conflicts.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.

.github/workflows/releasing.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
11
name: PyPI Release
22

33
on:
4-
push:
5-
branches: [main]
6-
tags: ["v?[0-9]+.[0-9]+.[0-9]+"]
7-
pull_request:
8-
branches: [main]
9-
release:
10-
types: [published]
4+
release:
5+
types: [published]
116

127
jobs:
138
# based on https://github.com/pypa/gh-action-pypi-publish

.github/workflows/testing.yml

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,20 @@
11
name: Testing
22

33
on:
4-
push:
5-
branches: [main]
6-
pull_request: {}
4+
push:
5+
paths-ignore:
6+
- 'docs/**'
7+
branches:
8+
- main
9+
pull_request:
10+
branches:
11+
- main
12+
paths-ignore:
13+
- 'docs/**'
714

815
concurrency:
9-
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref }}
10-
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
16+
group: ${{ github.workflow }}-${{ github.ref }}
17+
cancel-in-progress: true
1118

1219
jobs:
1320
pytest:
@@ -16,13 +23,7 @@ jobs:
1623
fail-fast: false
1724
matrix:
1825
os: [ubuntu-latest]
19-
python-version: ["3.8", "3.9", "3.10"]
20-
include:
21-
- { os: "ubuntu-20.04", python-version: "3.8", requires: "oldest" }
22-
- { os: "ubuntu-20.04", python-version: "3.9", requires: "oldest" }
23-
24-
env:
25-
TORCH_URL: "https://download.pytorch.org/whl/cpu/torch_stable.html"
26+
python-version: ["3.10"]
2627

2728
steps:
2829
- uses: actions/checkout@v4
@@ -42,7 +43,7 @@ jobs:
4243

4344
- name: Install main package & dependencies
4445
run: |
45-
pip install -e .[extra] -r requirements/dev.txt -f ${TORCH_URL}
46+
pip install -e .[dev,extra]
4647
pip list
4748
4849
- name: Restore test's datasets

pyproject.toml

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,98 @@
1+
[project]
2+
name = "pytorch_tabular"
3+
version = "1.1.1"
4+
description = "A standard framework for using Deep Learning for tabular data"
5+
readme = { file = "README.md", content-type = "text/markdown" }
6+
license = { text = "MIT" }
7+
8+
authors = [
9+
{ name = "Manu Joseph", email = "manujosephv@gmail.com" }
10+
]
11+
12+
requires-python = ">=3.8"
13+
14+
keywords = [
15+
"pytorch",
16+
"tabular",
17+
"pytorch-lightning",
18+
"neural network",
19+
]
20+
21+
classifiers = [
22+
"Development Status :: 4 - Beta",
23+
"Intended Audience :: Developers",
24+
"License :: OSI Approved :: MIT License",
25+
"Natural Language :: English",
26+
"Programming Language :: Python :: 3",
27+
"Programming Language :: Python :: 3.10",
28+
"Programming Language :: Python :: 3.11",
29+
"Programming Language :: Python :: 3.12",
30+
"Programming Language :: Python :: 3.13",
31+
"Programming Language :: Python :: 3.14",
32+
]
33+
34+
dependencies = [
35+
"torch>=1.11.0",
36+
"numpy>1.20.0,<2.0",
37+
"pandas>=1.1.5",
38+
"scikit-learn>=1.3.0",
39+
"pytorch-lightning>=2.0.0,<2.5.0",
40+
"omegaconf>=2.3.0",
41+
"torchmetrics>=0.10.0,<1.7.0",
42+
"tensorboard>2.2.0,!=2.5.0",
43+
"protobuf>=3.20.0,<5.30.0",
44+
"pytorch-tabnet==4.1",
45+
"PyYAML>=5.4,<6.1.0",
46+
"matplotlib>3.1",
47+
"ipywidgets",
48+
"einops>=0.6.0,<0.8.0",
49+
"rich>=11.0.0",
50+
"fsspec>=2022.5.0,<2024.4.0; python_version == '3.8'",
51+
]
52+
53+
54+
[project.optional-dependencies]
55+
56+
dev = [
57+
"wget",
58+
"bump2version==1.0.1",
59+
"mkdocs-material==9.5.*",
60+
"ipython[notebook]>8.0,<9.0",
61+
"mkdocstrings[python]==0.26.*; python_version < '3.9'",
62+
"mkdocstrings[python]==0.29.*; python_version >= '3.9'",
63+
"mknotebooks==0.8.*",
64+
"pytest>=5.3.2",
65+
"pytest-runner>=5.1",
66+
"torch_optimizer",
67+
]
68+
69+
extra = [
70+
"wandb>=0.15.0,<0.19.0",
71+
"plotly>=5.13.0,<5.25.0",
72+
"kaleido>=0.2.0,<0.3.0",
73+
"captum>=0.5.0,<0.8.0",
74+
]
75+
76+
77+
[project.urls]
78+
Homepage = "https://github.com/pytorch-tabular/pytorch_tabular"
79+
80+
81+
[build-system]
82+
requires = ["setuptools>=61.0", "wheel"]
83+
build-backend = "setuptools.build_meta"
84+
85+
86+
[tool.setuptools]
87+
include-package-data = true
88+
zip-safe = false
89+
90+
91+
[tool.setuptools.packages.find]
92+
where = ["src"]
93+
include = ["pytorch_tabular", "pytorch_tabular.*"]
94+
95+
196
[tool.ruff]
297
target-version = "py38"
398
line-length = 120

setup.cfg

Lines changed: 0 additions & 36 deletions
This file was deleted.

setup.py

Lines changed: 0 additions & 67 deletions
This file was deleted.

0 commit comments

Comments
 (0)