forked from eyeonus/Trade-Dangerous
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
166 lines (152 loc) · 3.97 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
155
156
157
158
159
160
161
162
163
164
165
166
[tox]
envlist = flake8,pylint,py37,py38,py39,py310,py311,py312
skipsdist = true # avoid installation
skip_missing_interpreters = true
[testenv]
deps = -r requirements-dev.txt
passenv =
SYSTEMDRIVE, PROGRAMFILES
platform =
linux|linux2|darwin|nt|win32|win64
# changedir = {toxinidir}/tradedangerous # ?
[testenv:py{37,38,39,310,311,312}]
deps = -r requirements-dev.txt
commands =
coverage run --source=tradedangerous -m pytest {posargs}
coverage report --show-missing
coverage erase
setenv=
TD_DATA = ./test-data/{envname}-data
TD_CSV = ./test-data/{envname}-data
TD_TMP = ./test-data/{envname}-tmp
[flake8]
include = tradedangerous tests
exclude =
.git,
__pycache__,
.eggs,
.pytest_cache,
.tox,
venv,
build,
dist,
data,
test-data,
setup.py,
tradedangerous/commands/TEMPLATE.py,
tradedangerous/gui.py,
tradedangerous/submit-distances.py,
ignore =
# Not sure if these are correct.
E201, E202, E225, E131, E128, E121, E122, E123, E124, E125, E126, E127,
E226,
# Definitely unsure of this one
E251,
# These should be eliminated
E722,
E228,
E502,
W503,
W504,
# Trailing whitespace - I don't know of anything that requires that
# blank lines have indentation-matching whitespace
W291,
E221,
# Missing whitespace after :
E231,
E241,
E266,
E302,
E303,
W292,
W293,
# Blank line at eof
W391,
; this one needs research
E731,
per-file-ignores =
tests/test_bootstrap_commands.py:F401
tests/test_bootstrap_plugins.py:F401
tradedangerous/commands/__init__.py:F401,E402
tradedangerous/mfd/saitek/directoutput.py:E501,E203,E401,E722,E265
max-line-length = 180
[testenv:flake8]
deps = flake8
commands = flake8 tradedangerous/ tests/
[pylint]
disable =
too-many-lines,
too-many-instance-attributes,
too-few-public-methods,
too-many-public-methods,
invalid-name, # TODO: pythonize names
too-many-arguments,
too-many-locals,
missing-class-docstring, # TODO: docstr all the things
missing-function-docstring, # TODO: docstr all the things
missing-module-docstring, # TODO: docstr all the things
trailing-whitespace,
fixme,
trailing-newlines,
missing-final-newline,
wrong-import-order,
too-many-return-statements,
# it would be nice if these weren't disabled
consider-using-f-string,
consider-alternative-union-syntax, # sure, when it's properly supported
unused-argument,
unnecessary-pass,
broad-exception-raised,
consider-using-with, # eliminate
attribute-defined-outside-init,
too-many-branches,
too-many-statements,
R0801,
max-line-length = 180
runtime-typing = no
load-plugins =
pylint.extensions.bad_builtin,
pylint.extensions.overlapping_exceptions,
pylint.extensions.check_elif,
pylint.extensions.redefined_variable_type,
pylint.extensions.typing,
ignore =
edscupdate.py edsmupdate.py gui.py submit-distances.py
[testenv:pylint]
deps =
pylint
-r requirements-dev.txt
commands =
pylint --rcfile {toxinidir}/tox.ini \
trade.py \
tradegui.py \
tradedangerous/__init__.py \
tradedangerous/cache.py \
tradedangerous/cli.py \
tradedangerous/corrections.py \
tradedangerous/csvexport.py \
tradedangerous/formatting.py \
tradedangerous/fs.py \
tradedangerous/prices.py \
tradedangerous/tools.py \
tradedangerous/tradecalc.py \
tradedangerous/tradedb.py \
tradedangerous/tradeenv.py \
tradedangerous/transfers.py \
tradedangerous/utils.py \
tradedangerous/version.py \
tradedangerous/misc/progress.py \
tradedangerous/plugins/eddblink_plug.py \
tradedangerous/plugins/spansh_plug.py
[pytest]
markers =
slow: marks tests as slow (deselect with '-m "not slow"')
superslow: marks tests as superslow (deselect with '-m "not superslow"')
[gh-actions]
python =
3.7: py37
3.8: py38
3.9: py39
3.10: py310
3.11: py311
3.12: py312