forked from lab-cosmo/chemiscope
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
86 lines (68 loc) · 1.71 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
[tox]
# https://github.com/tox-dev/tox/issues/3238
requires = tox==4.14.0
envlist =
lint
tests
[testenv]
package = external
package_env = build
lint_folders = "{toxinidir}/python" "{toxinidir}/setup.py"
[testenv:build]
description = Build the wheel for chemiscope (internal)
deps =
jupyterlab
setuptools
wheel
commands =
pip wheel . --no-deps --no-build-isolation --check-build-dependencies --wheel-dir {envtmpdir}/dist
[testenv:tests]
description = Run Python unit tests
deps =
ase==3.22.1
commands =
python -m unittest discover -p "*.py" -s python/tests
[testenv:lint]
description = Lint Python code
package = skip
deps =
flake8
flake8-bugbear
black
blackdoc
isort
commands =
flake8 --extend-exclude "*/build/*" {[testenv]lint_folders}
black --check --diff {[testenv]lint_folders}
blackdoc --check --diff {[testenv]lint_folders}
isort --check-only --diff --extend-skip-glob "*/build/*" {[testenv]lint_folders}
[testenv:format]
description = Abuse tox to do actual formatting on all files
package = skip
deps =
black
blackdoc
isort
commands =
black {[testenv]lint_folders}
blackdoc {[testenv]lint_folders}
isort {[testenv]lint_folders}
[testenv:docs]
description = Build chemiscope documentation
deps =
-r docs/requirements.txt
allowlist_externals =
npm
commands =
npm run api-docs
sphinx-build --doctree-dir docs/build/doctrees -W --builder html docs/src docs/build/html
[testenv:generate-standalone]
description = Generate standalone HTML for chemiscope
deps =
beautifulsoup4
requests
commands =
python3 utils/generate_standalone.py -o chemiscope_standalone.html
[flake8]
max_line_length = 88
extend-ignore = E203