-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtox.ini
More file actions
86 lines (79 loc) · 2.57 KB
/
tox.ini
File metadata and controls
86 lines (79 loc) · 2.57 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
[tox]
min_version = 4
requires = tox-uv
[testenv]
package = editable
deps = {env:TOX_TESTENV_DEPS:-r requirements/test-python{py_dot_ver}.txt}
set_env =
# Workaround matplotlib on windows server 2012 and gitlab-runner,
# matplotlib cannot access a registry key and falls back to the WINDIR var
# https://matplotlib.org/stable/api/font_manager_api.html#matplotlib.font_manager.win32FontDirectory.
WINDIR = {env:WINDIR:C:\Windows}
# Use a non GUI rendering backend for matplotlib.
MPLBACKEND = AGG
# Define pytest options for using coverage.
coverage: __COVERAGE_POSARGS=--cov --cov-report=xml --cov-report=html --no-cov-on-fail
pass_env =
# See gemseo developers docs.
GEMSEO_KEEP_IMAGE_COMPARISONS
commands =
pytest {env:__COVERAGE_POSARGS:} {posargs}
[testenv:check]
description = run code formatting and checking
basepython = python3.13
deps = -r requirements/check.txt
skip_install = true
allowlist_externals = pre-commit
commands =
pre-commit install
pre-commit run --all-files
[testenv:doc]
description = build documentation
basepython = python3.13
deps = -r requirements/doc.txt
commands =
mkdocs serve
[testenv:dist]
description = create and check the pypi distribution
deps =
check-wheel-contents
uv
skip_install = true
allowlist_externals = rm
commands =
rm -rf dist build
uv build
# W002: ignore duplicated files.
check-wheel-contents dist --ignore W002
[testenv:dist-upload]
description = upload existing distribution files to a package repository
skip_install = true
deps = uv
pass_env =
UV_PUBLISH_TOKEN
UV_PUBLISH_URL
commands =
uv publish
[testenv:pypi-py{310,311,312,313}]
description = test the pypi distribution
deps =
gemseo-mma
pytest-xdist
skip_install = true
[testenv:update-deps]
description = update the envs dependencies
set_env =
__command = uv pip compile pyproject.toml --upgrade --python-platform linux {posargs:--constraint requirements/test-constraints.in}
pass_env =
deps =
pre-commit
uv
skip_install = true
commands =
{env:__command} --group dev --python-version 3.10 -o requirements/test-python3.10.txt
{env:__command} --group dev --python-version 3.11 -o requirements/test-python3.11.txt
{env:__command} --group dev --python-version 3.12 -o requirements/test-python3.12.txt
{env:__command} --group dev --python-version 3.13 -o requirements/test-python3.13.txt
{env:__command} --group doc --python-version 3.13 -o requirements/doc.txt
uv pip compile --upgrade --python-version 3.13 -o requirements/check.txt requirements/check.in
pre-commit autoupdate