forked from scverse/squidpy_notebooks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
102 lines (91 loc) · 2.96 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
[flake8]
per-file-ignores =
tests/*: D
docs/source/*: D
.scripts/download/download_data.py: D100,D103
examples/*: D100,D101,D205,D400
tutorials/*: D100,D101,D205,D400
# D100 Missing docstring in public module
# D101 Missing docstring in public class
# D103 Missing docstring in public function
# D205 1 blank line required between summary line and description
# D400 First line should end with a period
max_line_length = 120
filename = *.py
[pytest]
python_files = test*.py
testpaths = tests/
xfail_strict = true
[gh-actions]
python =
3.8: py38
3.9: py39
[gh-actions:env]
PLATFORM =
ubuntu-latest: linux
macos-latest: macos
[tox]
isolated_build = True
envlist =
lint
# bit redundant since the docs shouldn't be built without the examples
py{37,38,39}-{linux,macos}
check-docs
docs
skip_missing_interpreters=true
[testenv]
platform =
linux: linux
macos: (osx|darwin)
install_command = pip install -q {opts} {packages}
deps =
-r{toxinidir}/requirements.txt
pytest
passenv = TOXENV CI GITHUB_ACTIONS
skip_install = true
commands = pytest --ignore docs/ {posargs:-vv}
[testenv:lint]
description = Perform linting.
basepython = python3.9
deps = pre-commit>=2.9.3
skip_install = true
commands = pre-commit run --all-files --show-diff-on-failure {posargs:}
[testenv:clean-docs]
description = Clean the documentation artifacts.
basepython = python3.9
deps =
skip_install = true
changedir = {toxinidir}/docs
whitelist_externals = make
commands = make clean
[testenv:check-docs]
description = Check the links in the docs.
basepython = python3.9
deps = -r{toxinidir}/docs/requirements.txt
skip_install = true
whitelist_externals = sphinx-build
commands =
sphinx-build -W --keep-going -D plot_gallery=0 -b spelling {toxinidir}/docs/source {toxinidir}/docs/build/spellcheck
sphinx-build -q -W --keep-going -D plot_gallery=0 -b linkcheck {toxinidir}/docs/source {toxinidir}/docs/build/linkcheck
[testenv:docs]
description = Build the documentation.
basepython = python3.9
deps = -r{toxinidir}/docs/requirements.txt
whitelist_externals = sphinx-build
commands =
sphinx-build --color -b html {toxinidir}/docs/source {toxinidir}/docs/build/html
python -c 'import pathlib; print(f"Documentation is available under:", pathlib.Path(f"{toxinidir}") / "docs" / "build" / "html" / "index.html")'
[testenv:shallow-docs]
description = Build the documentation without running the examples.
basepython = python3.9
deps = -r{toxinidir}/docs/requirements.txt
whitelist_externals = sphinx-build
commands =
sphinx-build --color -D plot_gallery=0 -b html {toxinidir}/docs/source {toxinidir}/docs/build/html
python -c 'import pathlib; print(f"Documentation is available under:", pathlib.Path(f"{toxinidir}") / "docs" / "build" / "html" / "index.html")'
[testenv:download-data]
description = Build the documentation.
basepython = python3.9
skip_install = true
deps = -r{toxinidir}/requirements.txt
commands = python ./.scripts/download/download_data.py {posargs}