-
Notifications
You must be signed in to change notification settings - Fork 112
Expand file tree
/
Copy pathtox.ini
More file actions
94 lines (86 loc) · 3.34 KB
/
Copy pathtox.ini
File metadata and controls
94 lines (86 loc) · 3.34 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:tox] is the section name to use when the configuration lives in
## setup.cfg; in a tox.ini it has to be [tox], or the settings below are
## silently ignored (which they were, until 2026-08).
[tox]
envlist = py310,py311,py312,py313,py314,docs,style,deptry,audit,package
[testenv]
deps = --editable .[test]
## TODO: too much duplication here, and it's getting worse for every docker-based server we decide to add to the test framework. Can this be redone somehow?
passenv =
BAIKAL_URL
BAIKAL_USERNAME
BAIKAL_PASSWORD
NEXTCLOUD_URL
NEXTCLOUD_USERNAME
NEXTCLOUD_PASSWORD
CYRUS_URL
CYRUS_USERNAME
CYRUS_PASSWORD
SOGO_URL
SOGO_USERNAME
SOGO_PASSWORD
BEDEWORK3_URL
BEDEWORK3_USERNAME
BEDEWORK3_PASSWORD
commands = coverage run -m pytest
[testenv:docs]
## TODO - I don't like duplication, this is now both here and in docs/requirements.txt
deps =
sphinx<9
manuel
sphinx-copybutton
pydata-sphinx-theme
sphinx-autodoc-typehints
## "environment" is not a tox key (it is passenv/setenv), so tox silently
## ignored it and the doctests never saw PYTHON_CALDAV_USE_TEST_SERVER -
## the same class of bug as the [tox:tox] one fixed above.
passenv =
PYTHON_CALDAV_USE_TEST_SERVER
commands =
sphinx-build -b doctest docs/source docs/build/doctest
[testenv:style]
deps = pre-commit
skip_install = true
commands = pre-commit run --all-files --show-diff-on-failure
[testenv:deptry]
basepython = python3.13
deps = --editable .[test]
commands = deptry caldav --known-first-party caldav
[testenv:audit]
## Audits the resolved runtime dependency tree against the PyPI advisory
## database. We declare open-ended version ranges, so a vulnerable release is
## normally resolved away by itself - the value here is catching the case where
## one of our *upper* bounds (currently only icalendar-searcher<2) would hold
## users back on a release with a known vulnerability. Test-only
## dependencies are deliberately not covered: pip-audit reads pyproject.toml
## metadata and skips the optional extras.
##
## No basepython pin: the audit is essentially interpreter-independent, and
## pinning would make this env unrunnable on machines lacking that version.
## Needs network access (PyPI advisory lookups). The socket timeout is raised
## from the 15s default because the advisory lookups are one request per
## dependency and a single slow response is enough to fail the whole run.
skip_install = true
deps = pip-audit
## A dedicated HTTP cache dir is used because pip-audit otherwise shares pip's
## cache, where it hits entries it cannot deserialize and logs a screenful of
## warnings on every run - noise is the enemy of a job nobody looks at.
commands = pip-audit --strict --desc on --timeout 30 --cache-dir {toxworkdir}/pip-audit-cache {toxinidir}
[testenv:package]
## Builds the release artifacts and checks that nothing local leaked into
## them. Without this nothing ever built an sdist outside a release, so the
## contents of the tarball were only ever discovered after publishing - see
## tests/tools/check_dist.py for what went wrong before.
skip_install = true
deps =
build
hatch-vcs
hatchling>=1.27.0
twine
commands = python {toxinidir}/tests/tools/check_dist.py --outdir {envtmpdir}/dist
[build_sphinx]
source-dir = docs/source
build-dir = docs/build
all_files = 1
[upload_sphinx]
upload-dir = docs/build/html