forked from Deltares/xugrid
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
49 lines (45 loc) · 1.17 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
# usage:
# tox -e format --> format the code and README
# tox -e lint --> check code formating and lint the code
# tox -e build --> runs tests and build docs
#
# TODO: disable conda for format and lint once this is resolved:
# https://github.com/tox-dev/tox-conda/issues/36
[tox]
requires = tox-conda
isolated_build = True
setenv =
CONDA_EXE=mamba
[testenv:format]
skip_install = True
basepython = python3.9
commands =
isort .
black .
blacken-docs README.rst
deps =
black
blacken-docs
isort
[testenv:lint]
skip_install = True
basepython = python3.9
commands =
isort --check .
black --check .
flake8 .
deps =
black
flake8
isort
[testenv:build]
description = run pytest and build docs
basepython = python3.9
conda_env = .github/workflows/requirements/environment.yml
extras = all
setenv =
NUMBA_DISABLE_JIT=1
commands =
pytest --cov=xugrid --cov-report xml --cov-report term
sphinx-build -d "{toxworkdir}/docs_doctree" docs "{toxworkdir}/docs_out" --color -bhtml
python -c 'import pathlib; print("documentation available under file://\{0\}".format(pathlib.Path(r"{toxworkdir}") / "docs_out" / "index.html"))'