-
Notifications
You must be signed in to change notification settings - Fork 2
/
pyproject.toml
235 lines (219 loc) · 4.54 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
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
[tool.poetry]
name = "rejx"
version = "0.0.1"
description = "Rej(spe)X - Deal with .rej file with minimal pain"
authors = ["Markus Sagen <Markus.John.Sagen@gmail.com>"]
license = "MIT"
readme = "README.md"
[tool.poetry.dependencies]
python = ">=3.8,<3.12"
typer = "^0.9.0"
rich = "^13.7.0"
tabulate = "^0.9.0"
[tool.poetry.group.dev.dependencies]
# cmd
pre-commit = "3.4.0"
# security
bandit = "^1.7.5"
# linter and formatter
black = "23.7.0"
isort = "5.12.0"
ruff = "0.1.6"
nbstripout = "0.6.1"
# testing
pytest = "^7.4.2"
pytest-cov = "^4.1.0"
pytest-mock = "^3.11.1"
# Debug
debugpy = "^1.8.0"
ptvsd = "^4.3.2"
mypy = "^1.7.0"
cruft = "^2.15.0"
cookiecutter = "^2.5.0"
[tool.ruff]
line-length = 120
target-version = "py310"
select = [
"F", # pyflakes
"E", # pycodestyle
"W", # pycodestyle
"C90", # mccabe
"I", # isort
"N", # pep8-naming
"D", # pydocstyle
"UP", # pyupgrade
"YTT", # flake8-2020
"ANN", # flake8-annotations
"ASYNC", # flake8-async
"S", # flake8-bandit
"BLE", # flake8-blind-except
"FBT", # flake8-boolean-trap
"A", # flake8-builtins
"COM", # flake8-commas
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"DTZ", # flake8-datetimez
"T10", # flake8-debugger
"EM", # flake8-errmsg
"EXE", # flake8-executable
"FA", # flake8-future-annotations
"ISC", # flake8-implicit-str-concat
"ICN", # flake8-import-conventions
"G", # flake8-logging-format
"INP", # flake8-no-pep420
"PIE", # flake8-pie
"T20", # flake8-print
"PYI", # flake8-pyi
"PT", # flake8-pytest-style
"Q", # flake8-quotes
"RSE", # flake8-raise
"RET", # flake8-return
"SLF", # flake8-self
"SLOT", # flake8-slots
"SIM", # flake8-simplify
"TID", # flake8-tidy-imports
"TCH", # flake8-type-checking
"INT", # flake8-gettext
"ARG", # flake8-unused-arguments
"PTH", # flake8-use-pathlib
"TD", # flake8-todos
"FIX", # flake8-fixme
"ERA", # eradicate
"PD", # pandas-vet
"PGH", # pygrep-hooks
"PL", # pylint
"TRY", # tryceratops
"NPY", # NumPy-specific rules
"AIR", # Airflow
"PERF", # Perflint
"LOG", # flake8-logging
"RUF", # Ruff-specific rules
]
ignore = [
"D101",
"D103",
"D203",
"D205",
"D213",
"D401",
"D404",
"C901",
"E203",
"E501",
"E741",
"G004",
"S104",
"UP006", # https://github.com/charliermarsh/ruff/pull/4427
"UP007",
"PLR0913",
"PTH123",
"PTH207",
"I001",
"N801",
"N803",
"N806",
"RET504", # Allow extra assignment before return
"PD901", # Pandas
"ANN002", # Missing type annotation for `*args`
"ANN003", # Missing type annotation for `**kwargs`
"ANN101", # Missing type annotation for `self`
"ANN102", # Missing type annotation for `cls`
"ANN204", # Missing return type annotation for special method `__init__`
"ARG001", # Unused function argument: `kwargs`
"ARG002", # Unused function argument: `args`
]
# Allow autofix for all enabled rules (when `--fix`) is provided.
fixable = [
"F",
"N",
"D",
"W",
"INP",
"PLC",
"PLR",
"PLW",
"RUF",
"SIM",
"Q",
"UP",
"TID",
"I",
"EM",
"FBT001",
"FBT002",
# Pandas
"PD002",
"PD015",
]
unfixable = []
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".hg",
".mypy_cache",
".nox",
".pants.d",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"venv",
]
[tool.ruff.mccabe]
max-complexity = 10
# Ignore import violations in all `__init__.py` files.
[tool.ruff.per-file-ignores]
"__init__.py" = ["D104", "E402", "F401", "F403", "F811", "W292"]
"test_*.py" = ["ANN201", "S101"]
[tool.isort]
include_trailing_comma = true
use_parentheses = true
ensure_newline_before_comments = true
profile = "black"
line_length = 120
[tool.black]
skip-string-normalization = true
line-length = 120
include = '\.pyi?$'
exclude = '''
/(
\.git
| \.mypy_cache
| \.ruff_cache
| \.pytest_cache
| \.tox
| \.venv
| _build
| buck-out
| build
| dist
| notebooks
)/
'''
[tool.pytest.ini_options]
addopts = """
--cov-report term-missing \
--cov src/mmm_prediction -ra"""
[tool.coverage.report]
fail_under = 0
show_missing = true
exclude_lines = ["pragma: no cover", "raise NotImplementedError"]
[[tool.mypy.overrides]]
module = []
follow_imports = "silent"
follow_imports_for_stubs = true
ignore_missing_imports = true
[tool.poetry.scripts]
rejx = "rejx.cli:app"
[build-system]
requires = ["poetry-core >= 1.0.0"]
build-backend = "poetry.core.masonry.api"