-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathtox.ini
More file actions
74 lines (68 loc) · 1.77 KB
/
Copy pathtox.ini
File metadata and controls
74 lines (68 loc) · 1.77 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
[tox]
requires =
tox>=4.26
tox-uv>=1.25
env_list =
lint
test
mypy
docs
pkg_meta
[testenv]
base_python = python3.14
pass_env =
CACHE_DEFAULT
DATABASE_URL
set_env =
PYTHONDONTWRITEBYTECODE = 1
SECRET_KEY = super-secret-key-just-for-testing
commands =
{posargs:pytest tests -rw --create-db --cov-report=xml --junit-xml=junit.xml -o junit_family=legacy --headless}
[testenv:lint]
description = run static analysis and style check using ruff
skip_install = true
deps =
pre-commit-uv>=4.1.1
commands =
pre-commit run --all-files --show-diff-on-failure
[testenv:test]
description = run tests
dependency_groups = dev
uv_sync_flags = --no-editable, --no-dev, --frozen
[testenv:mypy]
description = run mypy type checking
system_site_packages = false
skip_install = false
deps =
set_env =
SECRET_KEY = super-secret-key-just-for-testing
commands =
mypy --config-file mypy.ini {posargs:}
dependency_groups = mypy
uv_sync_flags = --no-editable, --no-dev, --frozen
[testenv:docs]
description = build mkdocs documentation
skip_install = false
deps =
set_env =
SECRET_KEY = super-secret-key-just-for-testing
commands =
mkdocs build {posargs:}
dependency_groups = docs
[testenv:pkg_meta]
runner = uv-venv-runner
description = check that python package
skip_install = true
deps =
check-wheel-contents>=0.6
twine>=5.1.1
uv>=0.5
commands =
uv build -q --sdist --wheel --out-dir {env_tmp_dir} .
twine check {env_tmp_dir}{/}*
check-wheel-contents --ignore W002,W004,W009,W004 {env_tmp_dir}
uv pip install --no-binary unicef-hope-aurora --find-links {env_tmp_dir} unicef-hope-aurora
aurora --version
uv pip uninstall unicef-hope-aurora
uv pip install --find-links {env_tmp_dir} unicef-hope-aurora
aurora --version