-
Notifications
You must be signed in to change notification settings - Fork 2
/
pyproject.toml
170 lines (155 loc) · 4.23 KB
/
pyproject.toml
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
167
168
169
170
[build-system]
requires = [
"setuptools>=45",
"setuptools_scm[toml]>=6.2",
]
build-backend = "setuptools.build_meta"
[tool.setuptools_scm]
[tool.black]
line-length = 100
target-version = [
"py310",
"py311",
"py312",
]
[tool.pydocstyle]
# ignore the following:
# - D102: Missing docstring in public method
# - D107: Missing docstring in __init__
add-ignore = [
"D102",
"D107",
]
convention = "google"
[tool.isort]
profile = "black"
line_length = 100
force_single_line = true
[tool.pytest.ini_options]
testpaths = [
"tests",
]
filterwarnings = [
"ignore::DeprecationWarning:luigi",
"ignore::DeprecationWarning:xarray",
"ignore::DeprecationWarning:matplotlib",
"ignore::DeprecationWarning:neurom.morphmath",
"ignore::DeprecationWarning:neuror.unravel",
"ignore::DeprecationWarning:setuptools",
"ignore::DeprecationWarning:sphinx.util.docutil",
"ignore::DeprecationWarning:sphinx.util.rst",
"ignore::urllib3.exceptions.InsecureRequestWarning:urllib3",
"ignore:Config file does not exist. luigi\\.cfg:UserWarning:luigi",
]
[tool.ruff]
# Enable the pycodestyle (`E`) and Pyflakes (`F`) rules by default.
# Unlike Flake8, Ruff doesn't enable pycodestyle warnings (`W`) or
# McCabe complexity (`C901`) by default.
# lint.select = ["ALL"]
# lint.ignore = [
# "ANN",
# "D401",
# "N803",
# ]
lint.select = ["ALL"]
lint.ignore = [
# ignore the following flake8-annotations errors:
"ANN",
# ignore the following flake8-unused-arguments errors:
"ARG005",
# ignore the following mccabe errors:
"C901",
# ignore the following flake8-commas errors:
"COM812", # TODO: Enable this check and fix errors
# ignore the following pydocstyle errors:
"D102", # - D102: Missing docstring in public method
"D107", # - D107: Missing docstring in __init__
# ignore the following flake8-errmsg errors:
"EM101",
"EM102",
# ignore the following eradicate errors:
"ERA001",
# ignore the following flake8-executable errors:
"EXE",
# ignore the following flake8-future-annotations errors:
"FA",
# ignore the following flake8-blind-except errors:
"FBT",
# ignore the following flake8-fixme errors:
"FIX002",
# ignore the following pep8-naming errors:
"N801",
"N802",
"N803",
# ignore the following Numpy errors:
"NPY002",
# ignore the following pandas-vet errors:
"PD002", # TODO: Enable this check and fix errors
"PD003", # TODO: Enable this check and fix errors
"PD011", # TODO: Enable this check and fix errors
"PD013", # TODO: Enable this check and fix errors
"PD901",
# ignore the following Pylint errors:
"PLR2004",
# ignore the following flake8-use-pathlib errors:
"PTH123",
# ignore the following flake8-return errors:
"RET505",
# ignore the following Ruff errors:
"RUF012",
# ignore the following flake8-bandit errors:
"S",
# ignore the following flake8-simplify errors:
"SIM105",
"SIM108",
"SIM110",
# ignore the following flake8-todos errors:
"TD002",
"TD003",
# ignore the following pyupgrades errors:
"UP015",
]
# Allow autofix for all enabled rules (when `--fix`) is provided.
lint.fixable = ["ALL"]
lint.unfixable = []
# Exclude a variety of commonly ignored directories.
lint.exclude = [
".eggs",
".git",
".mypy_cache",
".pytype",
".ruff_cache",
".tox",
".venv",
"__pypackages__",
"_build",
"build",
"dist",
"venv",
]
lint.per-file-ignores = {}
# Same as Black.
line-length = 100
# Allow unused variables when underscore-prefixed.
# dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
# Assume Python 3.8
target-version = "py38"
# [tool.ruff.flake8-bandit]
# skips = [
# "*_test.py",
# "*test_*.py",
# ]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.isort]
force-single-line = true
known-first-party = ["morphology_workflows"]
[tool.ruff.lint.pylint]
# Maximum number of arguments for function / method
max-args=8
# Maximum number of return / yield for function / method body
max-returns=6
# Maximum number of branch for function / method body
max-branches=12
# Maximum number of statements in function / method body
max-statements=50