File: tox.ini

package info (click to toggle)
python-globus-sdk 4.3.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,172 kB
  • sloc: python: 35,227; sh: 44; makefile: 35
file content (141 lines) | stat: -rw-r--r-- 4,458 bytes parent folder | download
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
[tox]
envlist =
    lint
    mypy
    pylint
    test-lazy-imports
    coverage_clean
    py{3.14,3.13,3.12,3.11,3.10,3.9}
    py3.9-mindeps
    py3.11-sphinxext
    coverage_report
    docs
minversion = 4.22.0
labels =
    freezedeps = freezedeps-print,freezedeps-py{3.14,3.13,3.12,3.11,3.10,3.9}

[testenv]
# build a wheel, not a tarball, and use a common env to do it (so that the wheel is shared)
package = wheel
wheel_build_env = build_wheel

deps =
    !mindeps: -r requirements/py{py_dot_ver}/test.txt
    mindeps: -r requirements/py{py_dot_ver}/test-mindeps.txt
    sphinxext: -r requirements/py{py_dot_ver}/docs.txt
commands = coverage run -m pytest {posargs}
depends =
    py{3.14,3.13,3.12,3.11,3.10,3.9}{-mindeps,-sphinxext,}: coverage_clean, lint
    coverage_report: py{3.14,3.13,3.12,3.11,3.10,3.9}{-mindeps,-sphinxext,}

[testenv:coverage_clean]
dependency_groups = coverage
skip_install = true
commands = coverage erase

[testenv:coverage_report]
dependency_groups = coverage
skip_install = true
commands_pre = -coverage combine
commands = coverage report --skip-covered

[testenv:lint]
deps = pre-commit
skip_install = true
commands = pre-commit run --all-files

[testenv:mypy,mypy-{py3.9,py3.14}]
deps = -r requirements/py{py_dot_ver}/typing.txt
commands = mypy src/ {posargs}

[testenv:mypy-test]
base = mypy
commands = mypy --show-error-codes --warn-unused-ignores tests/non-pytest/mypy-ignore-tests/

[testenv:test-lazy-imports]
deps = -r requirements/py{py_dot_ver}/test.txt
commands =
    pytest -n auto tests/non-pytest/lazy-imports/
    pytest tests/unit/test_lazy_imports.py

[testenv:benchmark]
deps =
    -r requirements/py{py_dot_ver}/test.txt
    pytest-benchmark
commands = pytest tests/benchmark/ {posargs}

[testenv:pylint,pylint-{py3.9,py3.10,py3.11,py3.12,py3.13,py3.14}]
deps = pylint
commands = pylint {posargs:src/}

[testenv:pyright]
deps = pyright
commands = pyright src/ {posargs}

[testenv:docs]
# force use of py3.11 for doc builds so that we get the same behaviors as the
# readthedocs doc build
basepython = python3.11
deps = -r requirements/py{py_dot_ver}/docs.txt
# clean the build dir before rebuilding
globus_sdk_rmtree = docs/_build
changedir = docs/
commands = sphinx-build -j auto -d _build/doctrees -b html -W . _build/html {posargs}

[testenv:twine-check]
skip_install = true
deps = build
       twine!=5.1.0
globus_sdk_rmtree = dist
# check that twine validating package data works
commands = python -m build
           twine check --strict dist/*

[testenv:poetry-check]
skip_install = true
deps = poetry
# remove the dist dir because it can lead to (confusing) spurious failures
globus_sdk_rmtree = dist
# use `poetry lock` to ensure that poetry can parse our dependencies
changedir = tests/non-pytest/poetry-lock-test
commands = poetry lock

[testenv:freezedeps-print]
description = print dependency-groups to temporary files for use in pip-compile
skip_install = true
deps = dependency-groups>=1,<2
commands =
    python -m dependency_groups test -o requirements/.test.in
    python -m dependency_groups typing -o requirements/.typing.in
    python -m dependency_groups test-mindeps -o requirements/.test-mindeps.in
    python -m dependency_groups docs -o requirements/.docs.in
[testenv:freezedeps-py{3.14,3.13,3.12,3.11,3.10,3.9}]
description = freeze development dependencies using pip-compile
skip_install = true
setenv =
    CUSTOM_COMPILE_COMMAND=tox p -m freezedeps
change_dir = requirements/
deps = pip-tools
commands =
    pip-compile --strip-extras -q -U --resolver=backtracking .test.in -o py{py_dot_ver}/test.txt
    pip-compile --strip-extras -q -U --resolver=backtracking .typing.in -o py{py_dot_ver}/typing.txt

    # Minimum dependencies are only tested against the lowest supported Python version.
    py3.9: pip-compile --strip-extras -q -U --resolver=backtracking .test-mindeps.in -o py{py_dot_ver}/test-mindeps.txt

    # The docs requirements are only generated for Python 3.11.
    py3.11: pip-compile --strip-extras -q -U --resolver=backtracking .docs.in -o py{py_dot_ver}/docs.txt
depends = freezedeps-print

[testenv:check-min-python-is-tested]
description = Check the Requires-Python metadata against CI config
skip_install = true
dependency_groups = check-project-metadata
commands = python scripts/ensure_min_python_is_tested.py

[testenv:prepare-release]
skip_install = true
deps = scriv[toml]
commands =
    python changelog.d/check-version-is-new.py
    scriv collect