From 6a50dc8c025ef39edee67afd30305cb8b8eb1117 Mon Sep 17 00:00:00 2001 From: Dulmandakh Date: Tue, 10 Dec 2024 06:17:04 +0800 Subject: [PATCH] split tox config (#451) --- pyproject.toml | 43 ------------------------------------------- tox.ini | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 43 deletions(-) create mode 100644 tox.ini diff --git a/pyproject.toml b/pyproject.toml index 9810c2bd..99a2ecbe 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,46 +12,3 @@ target-version = "py38" [tool.ruff.lint] select = ["B", "C4", "E", "F", "I", "T10", "YTT", "W"] -[tool.tox] -legacy_tox_ini = """ -[tox] -min_version = 4.4 -envlist = - {py38,py39,py310,py311,py312}-django420-{end2end,unittests} - {py310,py311,py312}-django{500,510}-{end2end,unittests} - py39-lint - -[gh-actions] -python = - 3.8: py38 - 3.9: py39, py39-lint - 3.10: py310 - 3.11: py311 - 3.12: py312 - -[testenv] -deps = - django420: Django>=4.2,<4.3 - django500: Django>=5.0,<5.1 - django510: Django>=5.1,<5.2 - coverage - -rrequirements.txt -skip_missing_interpreters=true - -changedir = - end2end: {toxinidir}/django_prometheus/tests/end2end -setenv = - end2end: PYTHONPATH = {toxinidir} - end2end: DJANGO_SETTINGS_MODULE=testapp.settings -commands = - end2end: coverage run --source=django_prometheus -m pytest testapp/ - unittests: coverage run --source=django_prometheus setup.py test - unittests: python setup.py sdist bdist_wheel - -[testenv:py39-lint] -deps = - ruff==0.8.2 -commands = - ruff format --check django_prometheus/ - ruff check django_prometheus/ -""" diff --git a/tox.ini b/tox.ini new file mode 100644 index 00000000..6b2abd13 --- /dev/null +++ b/tox.ini @@ -0,0 +1,40 @@ +[tox] +min_version = 4.4 +envlist = + {py38,py39,py310,py311,py312}-django420-{end2end,unittests} + {py310,py311,py312}-django{500,510}-{end2end,unittests} + py39-lint + +[gh-actions] +python = + 3.8: py38 + 3.9: py39, py39-lint + 3.10: py310 + 3.11: py311 + 3.12: py312 + +[testenv] +deps = + django420: Django>=4.2,<4.3 + django500: Django>=5.0,<5.1 + django510: Django>=5.1,<5.2 + coverage + -rrequirements.txt +skip_missing_interpreters=true + +changedir = + end2end: {toxinidir}/django_prometheus/tests/end2end +setenv = + end2end: PYTHONPATH = {toxinidir} + end2end: DJANGO_SETTINGS_MODULE=testapp.settings +commands = + end2end: coverage run --source=django_prometheus -m pytest testapp/ + unittests: coverage run --source=django_prometheus setup.py test + unittests: python setup.py sdist bdist_wheel + +[testenv:py39-lint] +deps = + ruff==0.8.2 +commands = + ruff format --check django_prometheus/ + ruff check django_prometheus/