-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathtox.ini
41 lines (37 loc) · 1.19 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
# 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]
requires =
tox>=4
env_list = py{38,39,310,311,312}
[gh-actions]
python =
3.8: py38
3.9: py39
3.10: py310
3.11: py311
3.12: py312
[testenv]
extras = tensorflow,jax,dev
deps =
pytest-cov
commands =
flake8
nbqa flake8 --ignore=E402 docs/tutorials
black --version
black --check .
mypy piquasso
pytest --nbmake docs/tutorials --ignore=docs/tutorials/cvqnn-with-tensorflow.ipynb
# NOTE: `coverage run -m pytest` imports the piquasso module from path, instead
# of the installed piquasso. To remedy this, one usually uses the
# `--import-mode=append` flag in case of pytest, but it fails to work with
# `coverage`, because coverage already appends the pwd into `sys.path` that `pytest`
# cannot delete.
# Therefore, I had to use `pytest-cov`.
pytest --import-mode=append -vvv -s --cov={envsitepackagesdir}/piquasso tests
coverage xml
coverage report
[tox:.package]
basepython = python3