-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathtox.ini
More file actions
131 lines (112 loc) · 3.22 KB
/
Copy pathtox.ini
File metadata and controls
131 lines (112 loc) · 3.22 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
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
122
123
124
125
126
127
128
129
130
131
[tox]
envlist =
style,
docstyle,
check-manifest,
check-testdir,
check-headers,
check-apidocsdir,
mkdocs,
py310,
py311,
py312,
py313,
coverage
# =============================================================================
# ENVS
# =============================================================================
[testenv]
description = "Run pytest"
labels = dynamic
deps =
ipdb
pytest
pytest-randomly
pytest-cov
usedevelop = True
setenv =
COVERAGE_FILE = {toxworkdir}/.coverage.{envname}
commands =
pytest tests/ --cov-report= --cov=skneuromsi --cov-append -m '' {posargs}
[testenv:coverage]
description = "Run pytest with coverage"
labels = dynamic
deps =
{[testenv]deps} # Esto instala las mismas dependencias que [testenv]
coverage
setenv =
COVERAGE_FILE = {toxworkdir}/.coverage
commands =
- coverage erase
pytest tests/ --cov=skneuromsi --cov-append --cov-report= -m '' {posargs}
coverage report --fail-under=86 -m
# =============================================================================
# STATIC
# =============================================================================
[testenv:style]
description = "Run flake8 on the source code"
labels = static
skip_install = True
usedevelop = False
deps = flake8
flake8-import-order
flake8-black
flake8-builtins
commands =
flake8 setup.py tests skneuromsi {posargs: --count}
[testenv:docstyle]
description = "Run pydocstyle on the docstrings"
labels = static
skip_install = True
deps =
pydocstyle
tomli
commands =
pydocstyle skneuromsi --ignore-decorators=doc_inherit --convention=numpy --add-ignore=D401 {posargs: --count}
[testenv:check-manifest]
description = "Check if the manifest is up to date"
labels = static
skip_install = True
deps = check-manifest
commands =
check-manifest
[testenv:check-headers]
description = "Check if the headers match the header template"
labels = static
skip_install = True
usedevelop = False
deps =
https://github.com/quatrope/qafan/archive/refs/heads/master.zip
commands =
check-headers check skneuromsi/ tests/ setup.py --header-template .header-template {posargs}
[testenv:check-testdir]
description = "Check if the test directory matches the code structure"
labels = static
skip_install = True
usedevelop = False
deps =
https://github.com/quatrope/qafan/archive/refs/heads/master.zip
commands =
check-testdir check tests/ --reference-dir skneuromsi/ {posargs}
[testenv:check-apidocsdir]
description = "Check if the API docs directory matches the code structure"
labels = static
skip_install = True
usedevelop = False
deps =
https://github.com/quatrope/qafan/archive/refs/heads/master.zip
commands =
check-apidocsdir check docs/source/api/ --reference-dir skneuromsi/ {posargs}
# =============================================================================
# DOCS
# =============================================================================
[testenv:mkdocs]
labels = docs
description = "Invoke sphinx-build to build the HTML docs"
usedevelop = True
skip_install = False
changedir = docs
deps =
-r {toxinidir}/docs/requirements.txt
commands =
sphinx-build -b html -d {envtmpdir}/doctrees source {envtmpdir}/html