-
Notifications
You must be signed in to change notification settings - Fork 5
/
tox.ini
46 lines (42 loc) · 916 Bytes
/
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
[tox]
;See link below for available options
;https://tox.readthedocs.io/en/latest/config.html
requires =
tox-ltt >= 0.4
isolated_build = True
envlist = lint, tests
[testenv:lint]
requires =
pre-commit
allowlist_externals =
pre-commit
skip_install = True
commands_pre = pre-commit install-hooks
commands = pre-commit run --all-files
[testenv:tests]
passenv =
GITHUB_ACTIONS
pytorch_force_cpu = True
deps =
pytest >= 6
pytest-mock >= 3.1
torch >= 1.9
# PyTorch's test suite requires numpy and scipy, but they are no dependencies of torch
numpy
scipy
commands =
pytest -c pytest.ini {posargs}
[testenv:publishable]
allowlist_externals =
rm
skip_install = True
deps =
check-wheel-contents
build
twine
commands =
# TODO: Make this work on Windows
rm -rf build dist pytest_pytorch.egg-info
python -m build --sdist --wheel .
twine check --strict dist/*
check-wheel-contents dist