-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathtox.ini
162 lines (147 loc) · 3.26 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
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
[tox]
;See link below for available options
;https://tox.readthedocs.io/en/latest/config.html
requires =
tox-factor
tox-ltt >= 0.4.2
envlist = lint-{style, typing}, tests-{integration, cli, galleries, docs}
isolated_build = True
[tests-common]
deps =
pytest >= 6
pytest-cov
pytest-mock >= 3.1
dill
igittigitt
# TODO: move to a released version
git+https://github.com/pmeier/pytorch_testing_utils
commands = pytest -c pytest.ini --durations=25
[testenv:tests-integration]
pytorch_force_cpu = True
passenv =
GITHUB_ACTIONS
deps =
{[tests-common]deps}
pyimagetest >= 0.3
pillow_affine
pyimagetest >= 0.3
pillow_affine
# we need to include these here to be able to override the specific version with
# --force-dep
torch
torchvision
commands =
{[tests-common]commands} \
--cov=pystiche \
--cov-report=xml \
--cov-config=.coveragerc \
tests/integration \
{posargs}
[testenv:tests-cli]
pytorch_force_cpu = True
deps =
{[tests-common]deps}
commands =
{[tests-common]commands} \
--cov=pystiche \
--cov-report=xml \
--cov-config=.coveragerc \
tests/cli \
{posargs}
[testenv:tests-galleries]
pytorch_force_cpu = True
deps =
{[tests-common]deps}
{[docs-common]deps}
commands =
{[tests-common]commands} \
tests/galleries \
{posargs}
[testenv:tests-download]
passenv =
PYSTICHE_HUB_GITHUB
GITHUB_ACTIONS
GITHUB_CONTEXT
deps = {[tests-common]deps}
pytorch_force_cpu = True
commands =
{[tests-common]commands} \
tests/download \
{posargs}
[testenv:lint-style]
allowlist_externals =
pre-commit
skip_install = True
commands =
pre-commit run --all-files
[testenv:lint-typing]
passenv =
TERM
pytorch_force_cpu = True
deps =
mypy==0.920
git+https://github.com/numpy/numpy-stubs
commands =
mypy --config-file=mypy.ini
[sphinx-gallery]
deps =
sphinx-gallery >=0.8, <0.10
# Additional sphinx-gallery dependencies
# https://sphinx-gallery.github.io/stable/index.html#install-via-pip
matplotlib
memory_profiler
[docs-common]
passenv =
HOME
READTHEDOCS
GITHUB_ACTIONS
CI
PYSTICHE_PLOT_GALLERY
PYSTICHE_DOWNLOAD_GALLERY
# Remember to re-run docs/generate_requirements_rtd.py if you change the dependencies
deps =
sphinx >= 3
importlib-metadata
sphinxcontrib-bibtex == 2
sphinx_autodoc_typehints >= 1.11
{[sphinx-gallery]deps}
pydata_sphinx_theme
jinja2
changedir = docs
[testenv:docs-html]
passenv = {[docs-common]passenv}
deps = {[docs-common]deps}
changedir = {[docs-common]changedir}
commands =
sphinx-build -M html source build
[testenv:docs-latex]
passenv = {[docs-common]passenv}
deps = {[docs-common]deps}
changedir = {[docs-common]changedir}
commands =
sphinx-build -M latexpdf source build
[testenv:tests-docs]
passenv =
{[docs-common]passenv}
setenv =
PYSTICHE_PLOT_GALLERY = False
PYSTICHE_DOWNLOAD_GALLERY = False
pytorch_force_cpu = True
deps = {[docs-common]deps}
commands =
sphinx-build -b doctest docs/source docs/build
python scripts/check_docs_references.py docs/source
[testenv:publishable]
allowlist_externals =
rm
skip_install = True
disable_light_the_torch = True
deps =
build
check-wheel-contents
twine
commands =
rm -rf build dist pystiche_papers.egg-info
python -m build --sdist --wheel .
twine check dist/*
check-wheel-contents dist