-
Notifications
You must be signed in to change notification settings - Fork 8
/
tox.ini
65 lines (55 loc) · 1.34 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
[tox]
isolated_build = True
envlist = py,fix
[testenv]
# means we'll run the equivalent of `pip install .[dev]`, also installing pytest
# and the linters from pyproject.toml
extras = dev
# Enable package caching
package_cache = .tox/cache
# Run both pytest and coverage since pytest was initialized with the --cov option in the pyproject.toml
commands =
pytest --doctest-modules src/nemos/
pytest --cov=nemos --cov-config=pyproject.toml --cov-report=xml
[testenv:fix]
commands=
black src
isort src --profile=black
isort docs/how_to_guide --profile=black
isort docs/background --profile=black
isort docs/tutorials --profile=black
[testenv:check]
commands=
black --check src
isort --check src --profile=black
isort --check docs/how_to_guide --profile=black
isort --check docs/background --profile=black
isort --check docs/tutorials --profile=black
flake8 --config={toxinidir}/tox.ini src
[gh-actions]
python =
3.10: py310
3.11: py311
3.12: py312
[flake8]
max-complexity = 10
max-line-length = 120
exclude = '''
((\.eggs
| \.git
| \.hg
| \.mypy_cache
| \.md
| \.toml
| \.cfg
| \.txt
| \.tox
| \.venv
| _build
| buck-out
| build
| dist
| examples
| __init__.py # Exclude __init__.py files
))'''
extend-ignore = W605, E203, DAR