-
Notifications
You must be signed in to change notification settings - Fork 28
Expand file tree
/
Copy pathtox.ini
More file actions
85 lines (76 loc) · 2.35 KB
/
tox.ini
File metadata and controls
85 lines (76 loc) · 2.35 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
[tox]
min_version = 4.0
env_list =
py{310,311,312}
dlclive-pypi
dlclive-github
lint
isolated_build = true
skip_missing_interpreters = true
[testenv]
description = Unit + smoke tests (exclude hardware) with coverage
package = wheel
extras = test
# Helpful defaults for headless CI runs (Qt/OpenCV):
setenv =
PYTHONWARNINGS = default
QT_QPA_PLATFORM = offscreen
QT_OPENGL = software
# Can help avoid some Windows/OpenCV capture backend flakiness when tests touch video I/O:
OPENCV_VIDEOIO_PRIORITY_MSMF = 0
COVERAGE_FILE = {toxinidir}/.coverage.{envname}
commands =
pytest -m "not hardware and not dlclive_compat" --maxfail=1 --disable-warnings \
--cov={envsitepackagesdir}/dlclivegui \
--cov-report=xml:{toxinidir}/.coverage.{envname}.xml \
--cov-report=term-missing \
{posargs}
# Let CI variables pass through (useful for debugging and some GUI/headless setups):
passenv =
CI
GITHUB_*
DISPLAY
WAYLAND_DISPLAY
XDG_RUNTIME_DIR
; Linting already covered by pre-commit hooks and format.yml workflow
; [testenv:lint]
; description = Ruff linting/format checks (matches pyproject.toml config)
; skip_install = true
; deps =
; ruff
; commands =
; ruff check .
; ruff format --check .
[testenv:dlclive]
passenv =
DLCLIVE_TEST_MODEL_PATH
DLCLIVE_TEST_MODEL_TYPE
# Run locally : tox -e dlclive-pypi
[testenv:dlclive-pypi]
description = DLCLive compatibility tests against specific PyPi release
passenv =
{[testenv:dlclive]passenv}
deps =
deeplabcut-live==1.1
commands =
pytest -m dlclive_compat tests/compat/test_dlclive_package_compat.py -q
# Run locally : tox -e dlclive-github
# These do not need live-GUI so to make sure it is the main version that is tested,
# we skip installing the package (and its DLCLive requirement)
[testenv:dlclive-github]
description = DLCLive compatibility tests against GitHub main
package = skip
passenv =
{[testenv:dlclive]passenv}
deps =
pytest
git+https://github.com/DeepLabCut/DeepLabCut-live.git@main
commands =
python -c "import dlclive, importlib.metadata; print('dlclive:', dlclive.__file__); print('version:', importlib.metadata.version('deeplabcut-live'))"
pytest --confcutdir=tests/compat tests/compat/test_dlclive_package_compat.py -q
[gh-actions]
python =
3.10: py310
3.11: py311
3.12: py312
; , lint