-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
154 lines (131 loc) · 2.99 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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
# This is the setup file for the tox tool
[tox]
description = tox environments list
envlist =
clean
py310
py311
coverage
build_docs
linkcheck
codestyle
reformat
# skips packaging
skipsdist = True
# Switch to conda based (rather than pip based) environment
requires = tox-conda
[testenv]
description = run tests
whitelist_externals=
/bin/bash
/usr/bin/bash
sphinx-build
deps =
pytest
pytest-xdist
; -rrequirements.txt
conda_env = environment.yml
conda_install_args=
--override-channels
commands =
pytest {posargs:-vv --junitxml=test-results/test_output.xml}
[testenv:clean]
deps = coverage
skip_install = true
commands = coverage erase
[testenv:coverage]
description = checks coverage
deps =
pytest
coverage
skip_install = true
commands =
coverage run --source satkit -m pytest
coverage xml
coverage report -m
[coverage:report]
omit =
ci-helpers/*
*/tests/*
*/plots/*
*/temp/*
*__init__.py
exclude_lines =
def __repr__
def __str__
[testenv:reformat]
description = reformats the code using black and isort
deps =
black
isort
skip_install = true
commands =
isort --project satkit --section-default THIRDPARTY satkit tests
black satkit tests
[testenv:codestyle]
description = this environments checks for flake8, black, isort code style
deps =
black
docutils
isort
flake8
# mypy
pygments
skip_install = true
commands =
flake8 satkit tests --count
isort --check-only --diff --project satkit --section-default THIRDPARTY satkit tests
black --check satkit tests
# mypy check static type hints
# mypy --ignore-missing-imports --check-untyped-defs --no-strict-optional satkit
[testenv:build_docs]
changedir = docs
description = invoke sphinx-build to build the HTML docs
setenv =
READTHEDOCS_PROJECT = satkit
READTHEDOCS_VERSION = latest
extras = docs
commands =
pip freeze
sphinx-build -W --color -b html . _build/html
[testenv:linkcheck]
changedir = docs
description = check the links in the HTML docs
extras = docs
commands =
pip freeze
sphinx-build -W -b linkcheck . _build/html
[pytest]
;addopts =
; # Force multiprocessing (auto: attempt to detect physical CPU count)
; -n auto
filterwarnings =
# Ignore deprecation warnings due to Java
ignore::DeprecationWarning
[flake8]
ignore = E203, E266, E501, W503
exclude =
# No need to traverse our git directory
.git,
# There's no value in checking cache directories
__pycache__,
# The conf file is mostly autogenerated, ignore it
docs/source/conf.py,
# The old directory contains Flake8 2.0
old,
# This contains our built documentation
build,
# This contains builds of flake8 that we don't want to check
dist,
# This contains some temp files
temp
max-line-length = 80
max-complexity = 18
select = B,C,E,F,W,T4,B9
[isort]
profile = black
multi_line_output=3
include_trailing_comma=True
force_grid_wrap=0
use_parentheses=True
line_length=88