Repository navigation
Expand file tree
/
Copy pathtox.ini
More file actions
54 lines (49 loc) · 1.73 KB
/
Copy pathtox.ini
File metadata and controls
54 lines (49 loc) · 1.73 KB
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
# 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{310,311,312,313,314}
py{310,311,312,313,314}-plain
[gh-actions]
python =
3.10: py310, py310-plain
3.11: py311, py311-plain
3.12: py312, py312-plain
3.13: py313, py313-plain
3.14: py314, py314-plain
[testenv:py{310,311,312,313,314}-plain]
extras =
deps =
change_dir = {envtmpdir}
commands =
python -c "import piquasso"
[testenv]
extras =
py{310,311,312}: jax,dev,tensorflow,matplotlib,dask,qiskit
py{313,314}: jax,dev,matplotlib,dask,qiskit
deps =
pytest-cov
pytest-xdist
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 --ignore=docs/tutorials/dense-subgraph-gbs.ipynb -n auto
# 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`.
py{310,311,312}: pytest --import-mode=append -vvv -s --cov={envsitepackagesdir}/piquasso tests -n auto
py{313,314}: pytest --import-mode=append -vvv -s --cov={envsitepackagesdir}/piquasso --skip-tensorflow tests -n auto
coverage xml
coverage report
[tox:.package]
basepython = python3