-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.cfg
129 lines (113 loc) · 2.26 KB
/
setup.cfg
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
[metadata]
long_description = file: README.md
long_description_content_type = text/markdown
[options]
include_package_data = True
zip_safe = False
packages = find:
[options.packages.find]
exclude =
tests*
docs*
################### pytest ####################
[tool:pytest]
testpaths =
tests
addopts =
--cov
--strict-markers
xfail_strict = True
[coverage:run]
branch = True
source = yt_libyt
[coverage:paths]
source =
yt_libyt/
*/site-packages/yt_libyt/
[coverage:report]
show_missing = True
skip_covered = True
;fail_under = 0 # increase later when we start implementing tests
################### mypy ######################
;[mypy]
;python_version = 3.7
;warn_unused_configs = True
;show_error_context = True
;pretty = True
;namespace_packages = True
;check_untyped_defs = True
################### flake8 ####################
[flake8]
max-line-length = 100
exclude =
docs,
# avoid spurious "unused import"
*/__init__.py,
*/api.py,
ignore =
# Whitespace before ':' (black compatibility)
E203,
# Too many leading '#' for block comment
E266,
# Expected 2 blank lines, found 0
E302,
# Line too long (let Black deal with line-lenght)
E501,
# Do not use variables named 'I', 'O', or 'l'
E741,
# Line break occurred before a binary operator (black compatibility)
W503,
################### tox env ###################
# Test -- pytest (Default)
[tox:tox]
isolated_build = True
env_list =
py37
py38
py39
py310
py311
py312
[testenv]
deps =
pytest
pytest-html
pytest-cov
pytest-randomly
commands =
pytest {posargs}
# Type Check -- mypy
;[testenv:typecheck]
;deps =
; pytest
; mypy
;commands =
; mypy --ignore-missing-imports {posargs:yt_libyt tests}
# String Formatting -- flynt
[testenv:fstring]
skip_install = True
deps =
flynt
commands =
flynt {posargs: yt_libyt tests}
# Code Formatting -- black
[testenv:format]
skip_install = True
deps =
black
commands =
black {posargs: -- yt_libyt tests}
# Sort Import -- isort
[testenv:sort_import]
skip_install = True
deps =
isort
commands =
isort {posargs: yt_libyt tests}
# Linting -- flake8
[testenv:lint]
deps =
flake8
flake8-bugbear
commands =
flake8 {posargs: yt_libyt tests}