forked from aai-institute/pyDVL
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
154 lines (141 loc) · 3.58 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
[tox]
envlist = base, report
wheel = true
[testenv]
deps =
pytest
pytest-cov
pytest-lazy-fixture
pytest-timeout
pytest-mock
pytest-docker==0.12.0
-r requirements.txt
setenv =
COVERAGE_FILE = {env:COVERAGE_FILE:{toxinidir}/.coverage.{envname}}
[testenv:base]
description = Tests base modules
commands =
pytest --cov "{envsitepackagesdir}/pydvl" -m "not torch" {posargs}
[testenv:torch]
description = Tests modules that rely on pytorch
commands =
pytest --cov "{envsitepackagesdir}/pydvl" -m torch {posargs}
extras =
influence
[testenv:notebooks]
description = Tests notebooks
commands =
pytest notebooks/ --cov "{envsitepackagesdir}/pydvl"
deps =
{[testenv]deps}
jupyter==1.0.0
nbconvert==6.4.5
datasets==2.6.1
extras =
influence
passenv =
CI
[testenv:report]
setenv =
skip_install = true
commands =
coverage combine --debug=trace
coverage html
coverage-badge -o badges/coverage.svg -f
coverage erase
deps =
coverage[toml]
coverage-badge
[testenv:linting]
skip_install = true
setenv =
PYLINTHOME = .pylint.d
commands =
pre-commit run --all --show-diff-on-failure
bash -c \'python build_scripts/run_pylint.py >>>(pylint-json2html -f jsonextended -o pylint.html) \'
deps =
pylint == 2.12.0
anybadge
pylint-json2html
pre-commit
-r requirements.txt
extras:
torch
whitelist_externals =
bash
[testenv:type-checking]
skip_install = true
setenv =
MYPY_FORCE_COLOR=1
passenv =
TERM
deps =
mypy == 0.982
types-tqdm
pandas-stubs
-r requirements.txt
commands =
mypy {posargs:src/}
[testenv:docs]
; NOTE: we don't use pytest for running the doctest, even though with pytest no
; imports have to be written in them. The reason is that we want to be running
; doctest during the docs build (which might happen on a remote machine, like
; read_the_docs does) with possibly fewer external dependencies and use sphinx'
; ability to automock the missing ones.
commands =
python build_scripts/update_docs.py --clean
sphinx-build -v --color -W -b html -d "{envtmpdir}/doctrees" docs "docs/_build/html"
sphinx-build -v --color -b doctest -d "{envtmpdir}/doctrees" docs "docs/_build/doctest"
deps =
sphinx==5.3.0
sphinxcontrib-websupport==1.2.4
sphinx-rtd-theme
sphinx-design
sphinx-math-dollar
sphinx-hoverxref
sphinxcontrib-bibtex
nbsphinx
furo
ipython
extras =
influence
[testenv:docs-dev]
description = This is a development environment for the docs that supports hot-reloading of the docs
commands =
python build_scripts/update_docs.py --clean
sphinx-autobuild -W -b html -d "{envtmpdir}/doctrees" docs "docs/_build/html" --ignore "*.ipynb"
deps =
{[testenv:docs]deps}
sphinx-autobuild
extras =
influence
[testenv:publish-test-package]
description = Publish package to TestPyPI
skip_install = true
passenv =
TWINE_*
deps =
wheel
twine
commands =
python setup.py sdist bdist_wheel
twine upload -r testpypi --verbose --non-interactive dist/*
[testenv:publish-release-package]
description = Publish package to PyPI
skip_install = true
passenv =
TWINE_*
deps =
{[testenv:publish-test-package]deps}
commands =
python setup.py sdist bdist_wheel
twine upload --verbose --non-interactive dist/*
[testenv:bump-dev-version]
description = Bumps the build part of the version using the given number
skip_install = true
passenv =
BUILD_NUMBER
deps =
bump2version
commands =
bump2version --no-tag --no-commit --verbose --serialize '\{major\}.\{minor\}.\{patch\}.\{release\}\{$BUILD_NUMBER\}' boguspart