-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtox.ini
61 lines (57 loc) · 1.65 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
[tox]
envlist =
py{38,39,310,311}
py38-oldestdeps
py311-figure
build_docs{,-dev}
codestyle
[testenv]
changedir = .tmp/{envname}
passenv =
MCALF_NO_EXTENSIONS
setenv =
PYTEST_COMMAND = pytest -vvv -s -ra --pyargs mcalf --cov-report=xml --cov=mcalf --cov-config={toxinidir}/setup.cfg
deps =
# Run tests in parallel
pytest-xdist
pytest-logger
# Set oldest versions of dependencies
oldestdeps: astropy==4.2.*
oldestdeps: matplotlib==3.1.*
oldestdeps: numpy==1.18.*
oldestdeps: pathos==0.2.5
oldestdeps: pyyaml==5.1.*
oldestdeps: scikit-learn==0.22.*
oldestdeps: scipy==1.4.*
# Pin the matplotlib version for figure tests
figure: matplotlib==3.6.2
extras = tests
commands =
!figure: {env:PYTEST_COMMAND} {posargs}
figure: python -c "import matplotlib as mpl; print(mpl.ft2font.__file__, mpl.ft2font.__freetype_version__, mpl.ft2font.__freetype_build_type__)"
figure: {env:PYTEST_COMMAND} -m "mpl_image_compare" --mpl {posargs}
[testenv:build_docs]
changedir = docs
description = invoke sphinx-build to build the HTML docs
extras = docs
commands =
pip install -r requirements.txt
sphinx-build -j auto -b html . _build/html
[testenv:build_docs-dev]
changedir = docs
description = invoke sphinx-build to build the HTML docs (using patched sphinx-automodapi)
deps =
-rdocs/requirements.txt
extras = docs
setenv = READTHEDOCS = True
commands =
sphinx-build -j auto -b html . _build/html
[testenv:codestyle]
changedir = src
description = verify that the code style is consistent
deps =
flake8
isort
commands =
flake8 . --count
isort . --check --diff --sp ../setup.cfg