diff --git a/pyproject.toml b/pyproject.toml index 0528c49..524613d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -95,84 +95,3 @@ convention = "numpy" [tool.setuptools.packages.find] include = ["detectree", "detectree.*"] - -[tool.tox] -env_list = [ - "lint", - "py39", - "py310", - "py311", - "py312" -] -requires = [ - "tox>=4.19" -] - -[tool.tox.env.lint] -commands = [ - [ - [ - "python", - "-m", - "build" - ], - [ - "sphinx-build", - "docs", - "docs/_build" - ], - [ - "twine", - "check", - "dist/*" - ] - ] -] -extras = [ - "dev", - "doc", - "test" -] -whitelist_externals = [ - "build", - "sphinx-build", - "twine" -] - -[tool.tox.env_run_base] -commands = [ - [ - "pytest", - "-s", - "--cov=detectree", - "--cov-append", - "--cov-report=xml", - "--cov-report", - "term-missing", - "tests" - ] -] -conda_deps = [ - "lightgbm" -] -extras = [ - "test" -] -whitelist_externals = [ - "pytest" -] - -[tool.tox.gh.python] -"3.9" = [ - "3.9" -] -"3.10" = [ - "3.10" -] -"3.11" = [ - "3.11" -] -"3.12" = [ - "3.12", - "lint" -] diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..fca23f2 --- /dev/null +++ b/tox.ini @@ -0,0 +1,37 @@ +[tox] +# add py313 when https://github.com/microsoft/LightGBM/pull/6668 is merged +env_list = py38, py39, py310, py311, py312, lint + +[gh] +python = + 3.12 = 3.12, lint + 3.11 = 3.11 + 3.10 = 3.10 + 3.9 = 3.9 + 3.8 = 3.8 + +[testenv:lint] +conda_deps= + lightgbm +allowlist_externals = + build + sphinx-build + twine +extras = + test + doc + dev +commands = + python -m build -s + sphinx-build docs docs/_build + twine check dist/* + +[testenv] +conda_deps= + lightgbm +allowlist_externals = + pytest +extras = + test +commands = + pytest -s --cov=detectree --cov-append --cov-report=xml --cov-report term-missing tests