-
Notifications
You must be signed in to change notification settings - Fork 11
/
tox.ini
121 lines (112 loc) · 3 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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
# ==================================================================================================
# To run a single environment:
# tox -e py39
# To recreate environment:
# tox -r
#
# NOTE: github 'actions' (e.g. continuous integration tests) are setup in '.github/workflows/build-status.yaml'
#
# Currently the configuration is setup to run FULL tests on py39 and basic tests on other envs.
# Full tests means to also run: flake8, coverage, and convert and run notebooks as tests.
# ==================================================================================================
[tox]
requires = tox-conda
isolated_build = true
use_develop = true
conda_channels = conda-forge
deps =
-r requirements.txt
-r requirements-dev.txt
parallel_show_output = true
envlist =
py39
py310
py311
py312
[testenv]
allowlist_externals =
which
python
pytest
flake8
cat
commands =
which python
python --version
which pytest
pytest --version
# run `pytest`, in general: ignore converted-notebooks (py39 will handle this)
pytest --ignore=holodeck/tests/converted_notebooks/
[testenv:py39]
commands =
python {toxinidir}/scripts/convert_notebook_tests.py
pytest holodeck/tests/converted_notebooks/
which flake8
flake8 --version
flake8
[flake8]
max-line-length=140
docstring-convention=all
max-complexity = 15
exclude =
.git
.tox
__pycache__
build
converted_notebooks
dist
data
docs
notebooks
notebooks/dev
scripts
venv
pyproject.toml
ignore=
F401 # imported but unused
W293 # blank line contains whitespace
E226 # missing whitespace around arithmetic operator
E241 # multiple spaces after ','
E722 # do not use bare 'except'
E731 # do not assign a lambda expression, use a def
C901 # is too complex (17)
W605 # invalid escape sequence [e.g. '\s'] :: can be caused by inline sphinx latex math
# E262 # inline comment should start with '# '
# E302 # expected 2 blank lines, found 1
# W391 # blank line at end of file
# P102,B311,W503,E226,S311,
# # Missing Docstrings
# D100,D104,D105,D107,
# # Docstring Whitespace
# D203,D212,D214,D215,
# # Docstring Quotes
# D301,D302,
# # Docstring Content
# D400,D401,D402,D404,D405,D406,D407,D408,D409,D410,D411,D412,D413,D414,D416,D417,
# # Type Annotations
# ANN002,ANN003,ANN101,ANN102,ANN204,ANN206,
# # pep8-naming
# N802,N806,N815,
[coverage:run]
; branch = true
parallel = true
[coverage:report]
show_missing = True
omit =
./holodeck/tests/*
./scripts/*
setup.py
exclude_lines =
\#\s*pragma: no cover
\#\s*\bnocov\b
^\s*raise NotImplementedError\b
^\s*return NotImplemented\b
^\s*raise$
@abstractmethod
@abc.abstractmethod
[pytest]
filterwarnings =
; action:message:category:module:line
; ignore:<REGEX>:<TYPE>
ignore:overflow encountered in exp:RuntimeWarning
ignore:invalid escape sequence:DeprecationWarning