Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions .github/workflows/publish_package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,12 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build twine
curl -sSL https://install.python-poetry.org | python3 -

- name: Build package
run: python -m build
run: poetry build

- name: Upload to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: twine upload dist/*

POETRY_PYPI_TOKEN_POETRY: ${{ secrets.PYPI_API_TOKEN }}
run: poetry publish
8 changes: 6 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox tox-gh-actions
sudo apt-get update
sudo apt-get install -y --no-install-recommends curl gcc
curl -sSL https://install.python-poetry.org | python3 -
export PATH="/root/.local/bin:$PATH"
poetry install --extras cpu --with dev,github-ci
- name: Test with tox
run: tox
run: poetry run tox
75 changes: 40 additions & 35 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
[build-system]
requires = ["setuptools>=61", "setuptools_scm>=7.0", "wheel"]
requires = ["setuptools>=64", "setuptools-scm>=8"]
build-backend = "setuptools.build_meta"

[project]
name = "TPOT"
description = "Tree-based Pipeline Optimization Tool"
dynamic = ["version"]
# TODO: this doesn't seem to match code comments
authors = [{ name = "Pedro Ribioro", email = "[email protected]" }]
readme = "README.md"
requires-python = ">=3.10,<3.14"
license = { text = "LGPL-3.0" }
authors = [
{ name = "Pedro Ribeiro" }
classifiers=[
"Intended Audience :: Science/Research",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering :: Artificial Intelligence"
]
keywords = [
"pipeline optimization",
Expand All @@ -19,42 +25,28 @@ keywords = [
"genetic programming",
"evolutionary computation"
]
classifiers = [
"Intended Audience :: Science/Research",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering :: Artificial Intelligence"
]
license = "LGPL-3.0-only"
requires-python=">=3.10.0,<3.14.0"

dependencies = [
"ConfigSpace>=1.1.1",
"distributed>=2024.4.2",
"func_timeout>=4.3.5",
"joblib>=1.1.1",
"lightgbm>=3.3.3",
"networkx>=3.0",
"nose",
"numpy>=1.26.4",
"scipy>=1.3.1",
"pandas>=2.2.0",
"scikit-learn>=1.6",
"update_checker>=0.16",
"tqdm>=4.36.1",
"scipy>=1.3.1",
# see [tool.uv.sources] below, upstream using deprecated pkg_resources
"stopit>=1.1.1",
"pandas>=2.2.0",
"joblib>=1.1.1",
"xgboost>=3.0.0",
"matplotlib>=3.6.2",
"tqdm>=4.36.1",
"traitlets>=5.8.0",
"lightgbm>=3.3.3",
"optuna>=3.0.5",
"networkx>=3.0",
"dask>=2024.4.2",
"distributed>=2024.4.2",
"dask-expr>=1.0.12",
"dask-jobqueue>=0.8.5",
"func_timeout>=4.3.5",
"configspace>=1.1.1",
"dill>=0.3.9",
"seaborn>=0.13.2",
]

dynamic = ["version"]

[project.optional-dependencies]
[dependency-groups]
skrebate = ["skrebate>=0.3.4"]
mdr = ["scikit-mdr>=0.4.4"]
sklearnex = ["scikit-learn-intelex>=2023.2.1"]
Expand All @@ -66,9 +58,14 @@ testing = [
"flake8>=3.9",
"tox>=3.24"
]
cpu = ["xgboost-cpu (>=3.0) ; extra != 'cuda'"]
cuda = ["xgboost (>=3.0) ; extra != 'cpu'"]
nn = ["torch"]
plot = ["matplotlib>=3.6.2"]

[project.urls]
Homepage = "https://github.com/EpistasisLab/tpot"
Repository = "https://github.com/EpistasisLab/tpot"
Documentation = "https://epistasislab.github.io/tpot/"

[project.scripts]
tpot = "tpot:main"
Expand All @@ -86,3 +83,11 @@ max-line-length = 120
[tool.setuptools_scm]
# setuptools_scm gets the version from Git tags, e.g git tag v1.1.0
# then python -m build embeds the version into the package

[[tool.uv.index]]
name = "pypi"
url = "https://pypi.org/simple"
publish-url = "https://upload.pypi.org/tpot/"

[tool.uv.sources]
stopit = { git = "https://github.com/jikamens/stopit" }
11 changes: 5 additions & 6 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,8 @@ python =
setenv =
PYTHONPATH = {toxinidir}
extras = testing
deps =
setuptools>=65.0.0
commands =
pytest --basetemp={envtmpdir}
deps = setuptools>=65.0.0,uv
commands = pytest --basetemp={envtmpdir}

[testenv:flake8]
basepython = python3.10
Expand All @@ -31,6 +29,7 @@ commands = flake8 tpot
[testenv:mypy]
basepython = python3.10
extras = testing
deps =
setuptools>=65.0.0
deps = setuptools>=65.0.0,uv
commands_pre =
uv sync --with cpu,dev,github-ci
commands = mypy tpot
17 changes: 14 additions & 3 deletions tpot/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
#TODO: are all the imports in the init files done correctly?
#TODO clean up import organization

import warnings

from .individual import BaseIndividual

from .graphsklearn import GraphPipeline
Expand All @@ -54,6 +56,15 @@

from .tpot_estimator import TPOTClassifier, TPOTRegressor, TPOTEstimator, TPOTEstimatorSteadyState

from update_checker import update_check
from ._version import __version__
update_check("tpot",__version__)
# Optionally import update_checker and use it to noisily complain if this isn't exactly the latest
# TPOT release.
try:
from update_checker import update_check
from ._version import __version__
update_check("tpot",__version__)
except ImportError:
warnings.warn(
ImportWarning(
"Optional update_check import is missing. Recency of TPOT version won't be checked."
)
)
Loading