forked from juftin/camply
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
105 lines (95 loc) · 2.14 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
[tox]
envlist =
py
flake8
commandline
yamllint
[testenv]
extras =
dev
passenv =
*
commands =
;FLAKE8 SYNTAX CHECK
flake8 {toxinidir}/camply {toxinidir}/tests --count --select=E9,F63,F7,F82 --show-source --statistics
;PYTEST UNITTESTS
coverage erase
coverage run -m pytest -rA tests/ {posargs}
;COVERAGE REPORT
coverage report -m \
--omit='{toxinidir}/.tox/*,{toxinidir}/tests/*'
[testenv:commandline]
commands =
;COMMAND LINE TESTS
{toxinidir}/tests/command_line_test.sh
[testenv:flake8]
changedir = {toxinidir}
skip_install = true
deps =
flake8
flake8-bugbear
flake8-docstrings
flake8-typing-imports
pep8-naming
commands =
flake8 camply/ tests/ setup.py
[flake8]
accept-encodings = utf-8
docstring-convention = numpy
exclude =
.git,
__pycache__,
docs,
build,
dist
max-complexity = 10
max-line-length = 100
ignore =
; D200 - One-line docstring should fit on one line with quotes [Whitespace Issues]
; D400 - First line should end with a period [Docstring Content Issues]
; D401 - First line should be in imperative mood; try rephrasing [Docstring Content Issues]
D200
D400
D401
per-file-ignores =
camply/config/api_config.py:E501
[testenv:mypy]
changedir = {toxinidir}
deps =
mypy
commands =
mypy \
--config-file {toxinidir}/tox.ini \
--install-types \
--strict-optional \
--non-interactive \
{toxinidir}/camply
[mypy]
;follow_imports = silent
;warn_redundant_casts = True
;warn_unused_ignores = True
;disallow_any_generics = True
;check_untyped_defs = True
;no_implicit_reexport = True
;disallow_untyped_defs = True
[mypy-camply.utils.camply_cli]
ignore_errors = True
[testenv:yamllint]
changedir = {toxinidir}
skip_install = true
deps =
yamllint
commands =
yamllint {toxinidir} -c {toxinidir}/.github/config/yamllint.yml
[testenv:sphinx]
changedir = {toxinidir}/docs
allowlist_externals =
make
rm
deps =
-r{toxinidir}/docs/requirements.txt
commands =
rm -rf {toxinidir}docs/build/ && rm -rf {toxinidir}/docs/source/_autosummary
rm -rf source/api/*
sphinx-apidoc -o source/api ../camply ../tests
make html