-
Notifications
You must be signed in to change notification settings - Fork 92
/
tox.ini
59 lines (53 loc) · 1.53 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
# tox (https://tox.readthedocs.io/) is a tool for running tests
# in multiple virtualenvs. This configuration file will run the
# test suite on all supported python versions. To use it, "pip install tox"
# and then run "tox" from this directory.
[tox]
min_version = 4.13.0
skip_missing_interpreters = true
envlist =
lint
notebooks-test
py310
py311
py312
[gh-actions]
python =
3.10: py310
3.11: py311, lint, notebooks-test
3.12: py312
[testenv]
description = run tests
allowlist_externals = env, poetry
parallel_show_output = true
commands_pre =
poetry install --with test
commands =
env
poetry run coverage run --source=hypernetx -m pytest tests --junitxml=pytest.xml
poetry run coverage report -m
[testenv:notebooks-tests]
description = run tests on jupyter notebooks
basepython = python3.11
commands_pre =
poetry install --with test,tutorials,widget
commands =
poetry run pytest --nbmake "tutorials/" --junitxml=pytest_notebooks.xml -n=auto --nbmake-timeout=300 --nbmake-find-import-errors
[testenv:lint]
description = run linters
basepython = python3.11
commands_pre =
poetry install --with lint
commands =
poetry run pylint --recursive=y --exit-zero --persistent=n hypernetx
poetry run flake8 hypernetx --exit-zero
poetry run pre-commit install
poetry run pre-commit run --all-files
[testenv:build-docs]
description = build documentation
basepython = python3.11
allowlist_externals = make, poetry
commands_pre =
poetry install --with docs
commands =
poetry run make html -C docs