-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathtox.ini
92 lines (84 loc) · 2.36 KB
/
tox.ini
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
[tox]
envlist =
cov-clean
py{3.13,3.12,3.11,3.10,3.9,3.8}
py3.8-mindeps
cov-combine
cov-report
mypy
minversion = 4.22.0
[testenv]
package = wheel
# tox-uv currently has a bug that erases the built wheel environment
# when 'recreate=true' (as it is true when the 'sdkmain' factor is present).
# To overcome this, it's necessary to specify a different wheel build environment.
wheel_build_env =
!sdkmain: build_wheel
sdkmain: build_wheel_sdkmain
passenv = GLOBUS_SDK_PATH
# When testing against SDK main it's necessary to recreate the tox environment
# so that the SDK main tarball is re-downloaded and installed for each run.
recreate =
!sdkmain: false
sdkmain: true
dependency_groups =
!mindeps: test
mindeps: test-mindeps
# the 'localsdk' factor allows CLI tests to be run against a local repo copy of globus-sdk
# it requires that the GLOBUS_SDK_PATH env var is set
#
# usage example: GLOBUS_SDK_PATH=../globus-sdk tox -e py3.11-localsdk
deps =
sdkmain: https://github.com/globus/globus-sdk-python/archive/main.tar.gz
localsdk: {env:GLOBUS_SDK_PATH}
commands = coverage run -m pytest {posargs}
depends = cov-clean
[testenv:cov]
dependency_groups = coverage
skip_install = true
[testenv:cov-clean]
base = cov
commands = coverage erase
[testenv:cov-combine]
base = cov
commands = coverage combine
depends = py{3.13,3.12,3.11,3.10,3.9,3.8}{,-mindeps}
[testenv:cov-report]
base = cov
commands_pre = coverage html --fail-under=0
commands = coverage report
depends = cov-combine
[testenv:lint]
deps = pre-commit
recreate = true
skip_install = true
commands = pre-commit run --all-files
[testenv:mypy]
dependency_groups = typing
commands = mypy {posargs:src/}
[testenv:mypy-minpython]
base = mypy
commands = mypy --python-version "3.8" {posargs:src/}
[testenv:mypy-maxpython]
base = mypy
commands = mypy --python-version "3.13" {posargs:src/}
[testenv:reference]
allowlist_externals = find
commands_pre = find reference/ -name "*.adoc" -type f -delete
commands = python ./reference/_generate.py {posargs}
[testenv:twine-check]
skip_install = true
deps =
build
twine
globus_cli_rmtree = dist
# check that twine validating package data works
commands =
python -m build
twine check dist/*
[testenv:prepare-release]
skip_install = true
deps = scriv[toml]
commands =
scriv collect
python ./changelog.d/post-fix-changelog.py changelog.adoc