Skip to content

Commit

Permalink
split tox config (#451)
Browse files Browse the repository at this point in the history
  • Loading branch information
dulmandakh authored Dec 9, 2024
1 parent a5b9385 commit 6a50dc8
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 43 deletions.
43 changes: 0 additions & 43 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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/
"""
40 changes: 40 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -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/

0 comments on commit 6a50dc8

Please sign in to comment.