forked from globus/globus-sdk-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtox.ini
More file actions
108 lines (94 loc) · 2.72 KB
/
tox.ini
File metadata and controls
108 lines (94 loc) · 2.72 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
[tox]
envlist =
lint
mypy
test-lazy-imports
coverage_clean
py{311,310,39,38,37}
py37-mindeps
coverage_report
skip_missing_interpreters = true
# TODO: set a minversion after we drop support for python3.6
# minversion = 4.0.0
[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/test.txt
mindeps: -r requirements/test-mindeps.txt
commands = coverage run -m pytest {posargs}
depends =
py{37,38,39,310,311,37-mindeps}: coverage_clean
coverage_report: py{37,38,39,310,311,37-mindeps}
[testenv:coverage_clean]
deps = coverage
skip_install = true
commands = coverage erase
[testenv:coverage_report]
deps = coverage
skip_install = true
commands_pre = -coverage combine
commands = coverage report --skip-covered
[testenv:lint]
deps = pre-commit<3
skip_install = true
commands = pre-commit run --all-files
[testenv:mypy{,-mindeps,-test}]
commands_pre =
deps =
!mindeps: -r requirements/typing.txt
mindeps: -r requirements/typing-mindeps.txt
commands =
!test: mypy src/ {posargs}
test: mypy --show-error-codes --warn-unused-ignores tests/non-pytest/mypy-ignore-tests/
[testenv:test-lazy-imports]
deps = -r requirements/test.txt
commands =
pytest -n auto tests/non-pytest/lazy-imports/test_for_import_cycles.py
pytest tests/unit/test_lazy_imports.py
[testenv:pylint]
deps = pylint
commands = pylint src/
[testenv:pyright]
deps = pyright
commands = pyright src/ {posargs}
[testenv:docs]
# force use of py310 for doc builds so that we get the same behaviors as the
# readthedocs doc build
basepython = python3.10
deps = -r requirements/docs.txt
allowlist_externals = rm
changedir = docs/
# clean the build dir before rebuilding
commands_pre = rm -rf _build/
commands = sphinx-build -d _build/doctrees -b dirhtml -W . _build/dirhtml {posargs}
[testenv:twine-check]
skip_install = true
deps = build
twine
allowlist_externals = rm
commands_pre = rm -rf dist/
# check that twine validating package data works
commands = python -m build
twine check dist/*
[testenv:poetry-check]
skip_install = true
deps = poetry
# remove the dist dir because it can lead to (confusing) spurious failures
allowlist_externals = rm
commands_pre = rm -rf dist/
# use `poetry lock` to ensure that poetry can parse our dependencies
changedir = tests/non-pytest/poetry-lock-test
commands = poetry lock
[testenv:freezedeps]
description = freeze development dependencies using pip-compile
skip_install = true
deps = pip-tools
commands = python scripts/freezedeps.py
[testenv:prepare-release]
skip_install = true
deps = scriv
commands =
python changelog.d/check-version-is-new.py
scriv collect