From 5c99045b6e74714c3eee7d2b2b06302be3556ad7 Mon Sep 17 00:00:00 2001 From: Elias Sadek Date: Fri, 22 Nov 2024 11:13:33 +0000 Subject: [PATCH] using legacy ini --- pyproject.toml | 35 +++++++++++++++++++++++++++++++++++ tox.toml | 26 -------------------------- 2 files changed, 35 insertions(+), 26 deletions(-) delete mode 100644 tox.toml diff --git a/pyproject.toml b/pyproject.toml index fbbc026..c5cd81d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -190,6 +190,41 @@ known-first-party = ["tephi"] "ERA001", # Has commented out code ] +[tool.tox] +legacy_tox_ini = """ + [tox] + requires = + tox-conda + minversion = 3.15 + base_python = py311 + envlist=py{38,39,310,311} + + [testenv] + description = invoke pytest to run automated tests + deps = + pytest + pytest-cov + filelock + requests + imagehash + conda_env = requirements/dev.yml + commands = + pytest --cov tephi --cov-report term-missing {posargs} + + [testenv:{docs,doctests}] + description = + invoke sphinx-build to build the docs/run the doctests + setenv = + DOCSDIR = {toxinidir}/docs/source + BUILDDIR = {toxinidir}/docs/_build + conda_env = requirements/rtd.yml + commands = + sphinx-apidoc -o "{env:DOCSDIR}/api" tephi tephi/tests + sphinx-build -W --keep-going -b html -d "{env:BUILDDIR}/doctrees" "{env:DOCSDIR}" "{env:BUILDDIR}/html" {posargs} + # when running the doctests, also check that any snippets in the + # docs are representative of the module output + doctests: sphinx-build -b doctest -d "{env:BUILDDIR}/doctrees" "{env:DOCSDIR}" "{env:BUILDDIR}/doctest" {posargs} + """ [tool.ruff.lint.pydocstyle] convention = "numpy" diff --git a/tox.toml b/tox.toml deleted file mode 100644 index c19db38..0000000 --- a/tox.toml +++ /dev/null @@ -1,26 +0,0 @@ -requires = ["tox-conda"] -env_list = ["3.8", "3.9", "3.10", "3.11"] -base_python = [""] - -[env.tests] -description = "invoke pytest to run automated tests" -deps = [ - "pytest", - "pytest-cov", - "filelock", - "requests", - "imagehash", - ] -conda_env = "requirements/dev.yml" -commands = ["pytest --cov tephi --cov-report term-missing {posargs}"] - -[env.doctests] -description = "invoke sphinx-build to build the docs/run the doctests" -set_env.DOCSDIR = "/docs/source" -set_env.BUILDDIR = "/docs/_build" -conda_env = "requirements/rtd.yml" -commands = [ - ["sphinx-apidoc -o", "{env:DOCSDIR}/api", "tephi tephi/tests"], - ["sphinx-build -W --keep-going -b html -d", "{env:BUILDDIR}/doctrees", "{env:DOCSDIR}", "{env:BUILDDIR}/html", "{posargs}"], - ["doctests: sphinx-build -b doctest -d", "{env:BUILDDIR}/doctrees", "{env:DOCSDIR}", "{env:BUILDDIR}/doctest", "{posargs}"] -]