-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtox.ini
83 lines (71 loc) · 2.32 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
[tox]
minversion = 2.0
envlist =
py{37,38,39}-{linux,windows}
py{37,38,39}-{linux,windows}-requirements
check
[testenv:py{37,38,39}-{linux,windows}]
platform =
linux: linux
windows: win32
deps =
-r{toxinidir}{/}requirements{/}{envname}-requirements.txt
# https://github.com/pytorch/pytorch/issues/69894
setuptools==59.5.0
pytest
pytest-cov
commands =
pytest --cov={envsitepackagesdir}{/}verydeepvae --cov-append {posargs:-vv tests}
depends =
py{37,38,39}-{linux,windows}: clean
report: py{37,38,39}-{linux,windows}
[testenv:py{37,38,39}-{linux,windows}-requirements]
platform =
linux: linux
windows: win32
deps =
pip-tools
skip_install = true
commands=
pip-compile --output-file {toxinidir}{/}requirements{/}{envname}.txt
[testenv:check]
platform = linux
deps =
check-manifest
twine
flake8
black==22.3.0
jsonschema
jsonschema2md@git+https://github.com/matt-graham/jsonschema2md.git@all-new-keywords
allowlist_externals = cmp
skip_install = true
commands =
python setup.py sdist --formats=gztar
twine check dist{/}*.tar.gz
check-manifest {toxinidir}
flake8 --extend-ignore "E203 E501"
black --check --diff --target-version py37 {toxinidir}
# Check example configurations valid according to JSON schema
jsonschema model_configuration.schema.json --instance example_configurations{/}VeryDeepVAE_32x32x32.json
jsonschema model_configuration.schema.json --instance example_configurations{/}VeryDeepVAE_64x64x64.json
jsonschema model_configuration.schema.json --instance example_configurations{/}VeryDeepVAE_128x128x128.json
# Regenerate Markdown rendering of JSON schema and check if different to current file
jsonschema2md model_configuration.schema.json {envtmpdir}{/}model_configuration_schema.md
cmp model_configuration_schema.md {envtmpdir}{/}model_configuration_schema.md
[testenv:report]
deps = coverage
skip_install = true
commands =
coverage report
coverage html
[testenv:clean]
deps = coverage
skip_install = true
allowlist_externals = rm
commands =
coverage erase
rm -rf htmlcov
[testenv:docs]
deps = jsonschema2md@git+https://github.com/matt-graham/jsonschema2md.git@all-new-keywords
skip_install = true
commands = jsonschema2md model_configuration.schema.json model_configuration_schema.md