-
Notifications
You must be signed in to change notification settings - Fork 1
/
tox.ini
60 lines (53 loc) · 1.5 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
[tox]
min_version = 4
env_list =
format,
lint,
py3{10,11,12}-test
coverage
requires =
tox-ignore-env-name-mismatch
[testenv:.pkg]
pass_env = SETUPTOOLS_SCM_PRETEND_VERSION
[testenv]
package = wheel
wheel_build_env = .pkg
[testenv:format]
base_python = py310
envdir = {toxworkdir}/format-lint
runner = ignore_env_name_mismatch
extras = tests
commands =
isort eurocropsml tests
black eurocropsml tests
[testenv:lint]
base_python = py310
envdir = {toxworkdir}/format-lint
runner = ignore_env_name_mismatch
extras = tests
commands =
mypy eurocropsml tests
flake8 eurocropsml tests
[testenv:py3{10,11,12}-test]
extras = tests
set_env =
COVERAGE_PROCESS_START={toxinidir}/pyproject.toml
commands_pre = python -c 'import pathlib; pathlib.Path("{env_site_packages_dir}/cov.pth").write_text("import coverage; coverage.process_startup()")'
commands = coverage run -m pytest -v {posargs:-n auto}
[testenv:coverage]
base_python = py310
depends = py3{10,11,12}-test
skip_install = true
deps = coverage[toml]>=5.3
commands =
coverage combine
coverage xml -o report.xml
coverage report
[testenv:docs]
base_python = py310
extras = docs
commands =
typer eurocropsml/cli.py utils docs --name eurocropsml-cli --output docs/cli.md
sphinx-build -n -T -W -b html -d {envtmpdir}/doctrees docs docs/_build/html
sphinx-build -n -T -W -b doctest -d {envtmpdir}/doctrees docs docs/_build/html
sphinx-build -n -T -W -b linkcheck -d {envtmpdir}/doctrees docs docs/_build/html