-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
138 lines (126 loc) · 2.36 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
[build-system]
requires = ["setuptools>=61"]
build-backend = "setuptools.build_meta"
[project]
name = "eai-rtk-athena"
readme = "README.md"
license = { file = "LICENSE" }
version = "1.0.0"
requires-python = ">=3.8"
dependencies = [
"eai-repair-toolkit >= 1, < 2",
]
[project.optional-dependencies]
dev = [
"ruff ~= 1.1"
]
test = [
"pytest >= 7.4",
"pytest-cov >= 4.1",
]
[tool.ruff]
line-length = 100
ignore-init-module-imports = true
src = ["src"]
extend-exclude = [
"__init__.py",
]
select = [
# pyflakes
"F",
# pycodestyle
"E", "W",
# pydocstyle
"D",
# isort
"I",
# pyupgrade
"UP",
# pep8-naming
"N",
# flake8-2020
"YTT",
# flake8-bandit
# should not ignore exception without logging
"S110", "S112",
# flake8-blind-except
"BLE",
# flake8-bugbear
"B",
# flake8-builtins
"A",
# flake8-errmsg
"EM103",
# flake8-quotes
"Q",
# flake8-type-checking
"TCH",
# flake8-return
"RET",
# flake8-use-pathlib
"PTH",
# pylint
"PLE", "PLR", "PLW",
# numpy
"NPY",
# tryceptor
"TRY",
]
ignore = [
# too much
"D203",
"D213",
# false positive
"D401",
# too much
"D406",
"D407",
# only works for python>=3.10
"B905",
# too many returns
"PLR0911",
# too many args
"PLR0913",
# too many statements
"PLR0915",
# controversal
"PLR5501",
"PLW0603",
# too much
"PTH123",
# too much
"RET504",
"RET505",
# too much
"TRY003",
]
[tool.ruff.per-file-ignores]
"conftest.py" = ["D"]
"tests/**/*.py" = [
# allow tests to just write description
"D100",
"D101",
"D102",
"D103",
"D205",
# test uses assert
"B011",
"B015",
# magic value are useful in case of test
"PLR2004",
]
[tool.ruff.pydocstyle]
convention = "numpy"
[tool.ruff.isort]
section-order = ["future", "standard-library", "science", "third-party", "first-party", "local-folder"]
known-first-party = ["src"]
[tool.ruff.isort.sections]
"science" = ["numpy", "pandas", "tensorflow", "keras", "pytorch", "h5py"]
[tool.ruff.flake8-builtins]
# tensorflow has "compile" method
builtins-ignorelist = ["compile"]
[tool.pytest.ini_options]
testpaths = ["tests"]
python_classes = ["*Test"]
python_files = ["test_*.py"]
filterwarnings = ["ignore::DeprecationWarning"]