Skip to content

Commit 2848b33

Browse files
authored
Merge pull request #1383 from EpistasisLab/dev
Package build and PyPI deployment updates
2 parents 1095e80 + b1ce6a0 commit 2848b33

File tree

8 files changed

+97
-146
lines changed

8 files changed

+97
-146
lines changed

.github/workflows/publish_package.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ jobs:
2020
- name: Install dependencies
2121
run: |
2222
python -m pip install --upgrade pip
23-
pip install setuptools wheel twine
23+
pip install build twine
2424
2525
- name: Build package
26-
run: python setup.py sdist bdist_wheel
26+
run: python -m build
2727

2828
- name: Upload to PyPI
2929
env:

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,5 @@ build/*
1717
*.egg
1818
*.coverage*
1919
docs/documentation/
20-
mkdocs.yml
20+
mkdocs.yml
21+
dist/

pyproject.toml

Lines changed: 83 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,88 @@
11
[build-system]
2-
requires = ["setuptools", "wheel"]
2+
requires = ["setuptools>=61", "setuptools_scm>=7.0", "wheel"]
33
build-backend = "setuptools.build_meta"
44

5-
[tool.pytest.ini_options]
6-
addopts = "--cov=tpot"
7-
testpaths = [
8-
"tpot/tests",
5+
[project]
6+
name = "TPOT"
7+
description = "Tree-based Pipeline Optimization Tool"
8+
readme = "README.md"
9+
requires-python = ">=3.10,<3.14"
10+
license = { text = "LGPL-3.0" }
11+
authors = [
12+
{ name = "Pedro Ribeiro" }
913
]
14+
keywords = [
15+
"pipeline optimization",
16+
"hyperparameter optimization",
17+
"data science",
18+
"machine learning",
19+
"genetic programming",
20+
"evolutionary computation"
21+
]
22+
classifiers = [
23+
"Intended Audience :: Science/Research",
24+
"Programming Language :: Python :: 3.10",
25+
"Programming Language :: Python :: 3.11",
26+
"Programming Language :: Python :: 3.12",
27+
"Programming Language :: Python :: 3.13",
28+
"Topic :: Scientific/Engineering :: Artificial Intelligence"
29+
]
30+
dependencies = [
31+
"numpy>=1.26.4",
32+
"scipy>=1.3.1",
33+
"scikit-learn>=1.6",
34+
"update_checker>=0.16",
35+
"tqdm>=4.36.1",
36+
"stopit>=1.1.1",
37+
"pandas>=2.2.0",
38+
"joblib>=1.1.1",
39+
"xgboost>=3.0.0",
40+
"matplotlib>=3.6.2",
41+
"traitlets>=5.8.0",
42+
"lightgbm>=3.3.3",
43+
"optuna>=3.0.5",
44+
"networkx>=3.0",
45+
"dask>=2024.4.2",
46+
"distributed>=2024.4.2",
47+
"dask-expr>=1.0.12",
48+
"dask-jobqueue>=0.8.5",
49+
"func_timeout>=4.3.5",
50+
"configspace>=1.1.1",
51+
"dill>=0.3.9",
52+
"seaborn>=0.13.2",
53+
]
54+
55+
dynamic = ["version"]
56+
57+
[project.optional-dependencies]
58+
skrebate = ["skrebate>=0.3.4"]
59+
mdr = ["scikit-mdr>=0.4.4"]
60+
sklearnex = ["scikit-learn-intelex>=2023.2.1"]
61+
amltk = ["amltk>=1.12.1"]
62+
testing = [
63+
"pytest>=6.0",
64+
"pytest-cov>=2.0",
65+
"mypy>=0.910",
66+
"flake8>=3.9",
67+
"tox>=3.24"
68+
]
69+
70+
[project.urls]
71+
Homepage = "https://github.com/EpistasisLab/tpot"
72+
73+
[project.scripts]
74+
tpot = "tpot:main"
75+
76+
[tool.setuptools]
77+
packages = ["tpot"]
78+
zip-safe = true
79+
80+
[tool.setuptools.package-data]
81+
tpot = ["py.typed"]
82+
83+
[tool.flake8]
84+
max-line-length = 120
1085

11-
[tool.mypy]
12-
mypy_path = "tpot"
13-
check_untyped_defs = true
14-
disallow_any_generics = true
15-
ignore_missing_imports = true
16-
no_implicit_optional = true
17-
show_error_codes = true
18-
strict_equality = true
19-
warn_redundant_casts = true
20-
warn_return_any = true
21-
warn_unreachable = true
22-
warn_unused_configs = true
23-
no_implicit_reexport = true
86+
[tool.setuptools_scm]
87+
# setuptools_scm gets the version from Git tags, e.g git tag v1.1.0
88+
# then python -m build embeds the version into the package

requirements_dev.txt

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

setup.cfg

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

setup.py

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

tox.ini

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ minversion = 3.28.0
44
# envlist = py310, flake8, mypy
55
envlist = py310, py311, py312, py313
66
isolated_build = true
7+
skip_missing_interpreters = true
78

89
[gh-actions]
910
python =
@@ -16,8 +17,9 @@ python =
1617
[testenv]
1718
setenv =
1819
PYTHONPATH = {toxinidir}
20+
extras = testing
1921
deps =
20-
-r{toxinidir}/requirements_dev.txt
22+
setuptools>=65.0.0
2123
commands =
2224
pytest --basetemp={envtmpdir}
2325

@@ -28,6 +30,7 @@ commands = flake8 tpot
2830

2931
[testenv:mypy]
3032
basepython = python3.10
33+
extras = testing
3134
deps =
32-
-r{toxinidir}/requirements_dev.txt
35+
setuptools>=65.0.0
3336
commands = mypy tpot

tpot/_version.py

Lines changed: 5 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,6 @@
1-
"""
2-
This file is part of the TPOT library.
1+
try:
2+
from importlib.metadata import version
3+
except ImportError:
4+
from importlib_metadata import version # for Python < 3.8
35

4-
The current version of TPOT was developed at Cedars-Sinai by:
5-
- Pedro Henrique Ribeiro (https://github.com/perib, https://www.linkedin.com/in/pedro-ribeiro/)
6-
- Anil Saini ([email protected])
7-
- Jose Hernandez ([email protected])
8-
- Jay Moran ([email protected])
9-
- Nicholas Matsumoto ([email protected])
10-
- Hyunjun Choi ([email protected])
11-
- Gabriel Ketron ([email protected])
12-
- Miguel E. Hernandez ([email protected])
13-
- Jason Moore ([email protected])
14-
15-
The original version of TPOT was primarily developed at the University of Pennsylvania by:
16-
- Randal S. Olson ([email protected])
17-
- Weixuan Fu ([email protected])
18-
- Daniel Angell ([email protected])
19-
- Jason Moore ([email protected])
20-
- and many more generous open-source contributors
21-
22-
TPOT is free software: you can redistribute it and/or modify
23-
it under the terms of the GNU Lesser General Public License as
24-
published by the Free Software Foundation, either version 3 of
25-
the License, or (at your option) any later version.
26-
27-
TPOT is distributed in the hope that it will be useful,
28-
but WITHOUT ANY WARRANTY; without even the implied warranty of
29-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30-
GNU Lesser General Public License for more details.
31-
32-
You should have received a copy of the GNU Lesser General Public
33-
License along with TPOT. If not, see <http://www.gnu.org/licenses/>.
34-
35-
"""
36-
__version__ = '1.1.0'
6+
__version__ = version("tpot")

0 commit comments

Comments
 (0)