-
-
Notifications
You must be signed in to change notification settings - Fork 66
Expand file tree
/
Copy pathtox.ini
More file actions
94 lines (88 loc) · 3.59 KB
/
Copy pathtox.ini
File metadata and controls
94 lines (88 loc) · 3.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
[tox]
envlist = towncrier-check,pre-commit,docs{,-lint,-all},py{310,311,312,313,314,315}-cov,coverage-platform,py{310,311,312,313,314,315}
labels =
test = py-cov,coverage
test310 = py310-cov,coverage310
test311 = py311-cov,coverage311
test312 = py312-cov,coverage312
test313 = py313-cov,coverage313
test314 = py314-cov,coverage314
test315 = py315-cov,coverage315
test-fast = py{310,311,312,313,314,315}-fast
test-platform = py{310,311,312,313,314,315}-cov,coverage-platform
skip_missing_interpreters = true
[testenv:pre-commit]
package = wheel
wheel_build_env = .pkg
dependency_groups = pre-commit
commands = pre-commit run --all-files --show-diff-on-failure --color=always
[testenv:py{,310,311,312,313,314,315}{,-fast,-cov}]
package = wheel
wheel_build_env = .pkg
depends = pre-commit
use_develop = fast: True
# Needed on Windows to test data directory creation
passenv = LOCALAPPDATA
setenv = COVERAGE_FILE = {env:COVERAGE_FILE:.coverage}
dependency_groups = test
allowlist_externals =
make
commands =
make -C tests{/}objc
!fast-!cov : python -X warn_default_encoding -m pytest {posargs:-vv --color yes}
cov : python -X warn_default_encoding -m coverage run -m pytest {posargs:-vv --color yes}
fast : python -m pytest {posargs:-vv --color yes -n auto}
[testenv:coverage{,310,311,312,313,314,315}{,-ci}{,-platform,-platform-macos,-project}{,-keep}{,-html}]
package = wheel
wheel_build_env = .pkg
depends = pre-commit,py{,310,311,312,313,314,315}{,-cov}
# by default, coverage should run on oldest supported Python for testing platform coverage.
# however, coverage for a particular Python version should match the version used for pytest.
base_python =
coverage: py310,py311,py312,py313,py314,py315
coverage310: py310
coverage311: py311
coverage312: py312
coverage313: py313
coverage314: py314
coverage315: py315
passenv = COVERAGE_FILE
setenv =
keep: COMBINE_FLAGS = --keep
# use the coverage files created in CI for individual platforms
ci-platform-macos: COVERAGE_FILE = .coverage.macos
# disable conditional coverage exclusions for Python version to test entire platform
{platform,project}: COVERAGE_EXCLUDE_PYTHON_VERSION=disable
# disable conditional coverage exclusions for host platform to test entire project
project: COVERAGE_EXCLUDE_PLATFORM=disable
dependency_groups = test
commands_pre =
python --version
commands =
-python -m coverage combine {env:COMBINE_FLAGS}
html: python -m coverage html --skip-covered --skip-empty
python -m coverage report
[testenv:towncrier{,-check}]
dependency_groups = towncrier
commands =
check : python -m towncrier.check --compare-with origin/main
!check : python -m towncrier {posargs}
[docs]
docs_dir = {tox_root}{/}docs{/}en
[testenv:docs{,-lint,-all,-live,-en}]
# Docs are always built on Python 3.12. See also the RTD config and contribution docs.
base_python = py312
setenv =
DISABLE_MKDOCS_2_WARNING = true
package = wheel
wheel_build_env = .pkg
dependency_groups = docs
commands =
!lint-!all-!live-!en : build_md_translations {posargs} en --source-code=stubs
lint : pyspelling
# cppreference has added a Cloudflare robot check.
# Github has an aggressive rate limiters
lint : markdown-checker --dir {[docs]docs_dir} --func check_broken_urls --skip-urls-containing=https://en.cppreference.com/,https://github.com/beeware,https://github.com/python/cpython
live : live_serve_en {posargs} src stubs --source-code=stubs --port=8040
all : build_md_translations {posargs} en --source-code=stubs
en : build_md_translations {posargs} en --source-code=stubs