2014-02-10 00:27:14 +00:00
|
|
|
[tox]
|
2020-12-23 10:12:35 +00:00
|
|
|
envlist =
|
2025-10-21 07:50:45 +00:00
|
|
|
py{38,39,310,311,312}-dj{42}-{unittest,pytest,checkmigrations}
|
2025-10-21 08:36:39 +00:00
|
|
|
py{310,311,312,313}-dj{50}-{unittest,pytest,checkmigrations}
|
|
|
|
|
py{310,311,312,313}-dj{51}-{unittest,pytest,checkmigrations}
|
2025-10-21 07:50:45 +00:00
|
|
|
py{310,311,312,313,314}-dj{52}-{unittest,pytest,checkmigrations}
|
2025-10-21 08:36:39 +00:00
|
|
|
py{312,313,314}-dj{main}-{unittest,pytest,checkmigrations}
|
2020-12-23 10:12:35 +00:00
|
|
|
lint
|
|
|
|
|
sphinx
|
|
|
|
|
readme
|
2020-01-07 08:54:20 +00:00
|
|
|
|
2020-12-23 10:12:35 +00:00
|
|
|
[gh-actions]
|
|
|
|
|
python =
|
|
|
|
|
3.8: py38, lint, sphinx, readme
|
|
|
|
|
3.9: py39
|
2021-12-22 23:40:19 +00:00
|
|
|
3.10: py310
|
2024-07-30 10:03:32 +00:00
|
|
|
3.11: py311
|
|
|
|
|
3.12: py312
|
2025-10-21 07:50:45 +00:00
|
|
|
3.13: py313
|
|
|
|
|
3.14: py314
|
2020-12-23 10:12:35 +00:00
|
|
|
|
|
|
|
|
[gh-actions:env]
|
|
|
|
|
DJANGO =
|
2024-07-30 10:03:32 +00:00
|
|
|
4.2: dj42
|
|
|
|
|
5.0: dj50
|
2025-10-21 07:50:45 +00:00
|
|
|
5.1: dj51
|
|
|
|
|
5.2: dj52
|
2021-03-09 12:49:08 +00:00
|
|
|
main: djmain
|
2014-02-10 00:27:14 +00:00
|
|
|
|
|
|
|
|
[testenv]
|
|
|
|
|
deps =
|
|
|
|
|
coverage
|
2024-07-30 10:03:32 +00:00
|
|
|
dj42: Django>=4.2,<5.0
|
|
|
|
|
dj50: Django>=5.0,<5.1
|
2025-10-21 07:50:45 +00:00
|
|
|
dj51: django>=5.1,<5.2
|
|
|
|
|
dj52: django>=5.2,<5.3
|
2021-03-09 12:49:08 +00:00
|
|
|
djmain: https://github.com/django/django/archive/main.tar.gz
|
2021-12-22 23:33:08 +00:00
|
|
|
pytest
|
|
|
|
|
pytest-cov
|
2014-02-10 00:27:14 +00:00
|
|
|
commands =
|
2015-06-12 09:15:39 +00:00
|
|
|
pip install -e .
|
|
|
|
|
pip install -e demo
|
2024-07-30 11:46:17 +00:00
|
|
|
# doctests and unit tests
|
2021-12-22 23:33:08 +00:00
|
|
|
pytest --cov=django_downloadview --cov=demoproject {posargs}
|
2024-07-30 11:46:17 +00:00
|
|
|
# demo project integration tests
|
|
|
|
|
coverage run --append {envbindir}/demo test {posargs: demoproject}
|
2021-12-22 23:33:08 +00:00
|
|
|
coverage xml
|
2014-02-10 00:27:14 +00:00
|
|
|
pip freeze
|
2020-12-23 10:12:35 +00:00
|
|
|
ignore_outcome =
|
2021-03-09 12:49:08 +00:00
|
|
|
djmain: True
|
2014-02-10 00:27:14 +00:00
|
|
|
|
2020-12-23 10:12:35 +00:00
|
|
|
[testenv:lint]
|
2014-02-10 00:27:14 +00:00
|
|
|
deps =
|
|
|
|
|
flake8
|
2020-12-23 10:12:35 +00:00
|
|
|
black
|
|
|
|
|
isort
|
2014-02-10 00:27:14 +00:00
|
|
|
commands =
|
2015-06-12 18:39:00 +00:00
|
|
|
flake8 demo django_downloadview tests
|
2020-12-23 10:12:35 +00:00
|
|
|
black --check demo django_downloadview tests
|
|
|
|
|
isort --check-only --recursive demo django_downloadview tests
|
2014-02-10 00:27:14 +00:00
|
|
|
|
|
|
|
|
[testenv:sphinx]
|
|
|
|
|
deps =
|
|
|
|
|
Sphinx
|
|
|
|
|
commands =
|
2015-06-12 09:15:39 +00:00
|
|
|
pip install -e .
|
2015-06-12 17:30:57 +00:00
|
|
|
make --directory=docs SPHINXOPTS='-W' clean {posargs:html doctest linkcheck}
|
2014-02-10 00:27:14 +00:00
|
|
|
whitelist_externals =
|
|
|
|
|
make
|
|
|
|
|
|
|
|
|
|
[testenv:readme]
|
2020-12-23 10:12:35 +00:00
|
|
|
description = Ensure README renders on PyPI
|
|
|
|
|
deps = twine
|
2014-03-03 13:38:33 +00:00
|
|
|
commands =
|
2020-12-23 10:12:35 +00:00
|
|
|
{envpython} setup.py -q sdist bdist_wheel
|
|
|
|
|
twine check dist/*
|
2020-01-07 14:01:26 +00:00
|
|
|
|
|
|
|
|
[flake8]
|
2020-01-07 14:51:55 +00:00
|
|
|
max-line-length = 88
|
2020-01-07 14:42:04 +00:00
|
|
|
ignore = E203, W503
|
2021-12-22 23:33:08 +00:00
|
|
|
|
|
|
|
|
[coverage:run]
|
|
|
|
|
source = django_downloadview,demo
|
|
|
|
|
|
|
|
|
|
[pytest]
|
|
|
|
|
DJANGO_SETTINGS_MODULE = demoproject.settings
|
|
|
|
|
addopts = --doctest-modules --ignore=docs/
|
2024-07-30 11:46:17 +00:00
|
|
|
python_files = tests/*.py
|