-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
230 lines (194 loc) · 6.25 KB
/
pyproject.toml
File metadata and controls
230 lines (194 loc) · 6.25 KB
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
[build-system]
requires = ["setuptools>=61.0.0"]
build-backend = "setuptools.build_meta"
[project]
name = "bpack"
authors = [
{name = "Antonio Valentino", email = "antonio.valentino@tiscali.it"},
]
description = "Binary data structures (un-)packing library"
readme = {file = "README.rst", content-type = "text/x-rst"}
requires-python = ">=3.10"
keywords = [
"binary",
"struct",
"descriptor",
"declarative",
"bit",
"unpack",
"pack"
]
license = {text = "Apache-2.0"}
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Topic :: Scientific/Engineering",
"Topic :: Utilities",
]
dynamic = ["version"]
[project.optional-dependencies]
bs = ["bitstruct"]
ba = ["bitarray>=1.5.1"]
np = ["numpy"]
codegen = ["black"]
test = ["pytest", "bpack[bs]", "bpack[ba]", "bpack[np]"]
full = ["bpack[bs]", "bpack[ba]", "bpack[np]", "bpack[codegen]", "bpack[test]"]
[project.urls]
Homepage = "https://github.com/avalentino/bpack"
Documentation = "https://bpack.readthedocs.io"
Repository = "https://github.com/avalentino/bpack.git"
Changelog = "https://github.com/avalentino/bpack/blob/main/docs/release_notes.rst"
Issues = "https://github.com/avalentino/bpack/issues"
[tool.setuptools]
packages = [
"bpack",
"bpack.tests",
"bpack.tools",
"bpack.tools.tests",
"bpack.tools.tests.data",
]
# zip-safe = true
# license-files = ["LICENSE"]
[tool.setuptools.dynamic]
version = {attr = "bpack.__version__"}
[tool.pytest.ini_options]
addopts = [
"--ignore=examples/",
"--import-mode=importlib",
]
[tool.black]
line-length = 79
preview = true
enable-unstable-feature = [
"hug_parens_with_braces_and_square_brackets",
"multiline_string_handling",
"string_processing",
"wrap_long_dict_values_in_parens",
]
# target-version = ['py311']
extend-exclude = "bpack/tools/tests/data"
[tool.isort]
profile = "black"
length_sort = true
multi_line_output = 3
no_inline_sort = true
include_trailing_comma = true
use_parentheses = true
line_length = 79
# force_grid_wrap = 0
# ensure_newline_before_comments = true
known_first_party = ["my_module1", "my_module2"]
# skip_glob = ["packagename/parse/*"]
[tool.pydocstyle]
convention = "numpy"
# add-ignore = ["D105", "D107"]
match-dir='bpack|tools'
match='(?!test_).*\.py'
[tool.codespell]
skip = "*.pdf,*.pp,*.ipynb,./docs/spelling_wordlist.txt"
count = true
quiet-level = 3
ignore-words-list = "nd"
# [tool.mypy]
# plugins = ["numpy.typing.mypy_plugin"]. # deprecated
[tool.ruff]
line-length = 79
# indent-width = 4
# target-version = "py39"
extend-exclude = ["docs/conf.py", "examples"]
[tool.ruff.lint]
preview = true
select = [
# ruff --version # ruff 0.11.6
"E", # E/W pycodestyle
"W", # E/W pycodestyle
"F", # F Pyflakes
"D", # D pydocstyle
"N", # N pep8-naming
# "I", # I isort
"C90", # C90 mccabe
"UP", # UP pyupgrade
# --- flake8 ---
"YTT", # YTT flake8-2020
# "ANN", # ANN flake8-annotations
# "ASYNC", #ASYNC flake8-async
# "S", # S flake8-bandit
"BLE", # BLE flake8-blind-except
# "FBT", # FBT flake8-boolean-trap
"B", # B flake8-bugbear
"A", # A flake8-builtins
# "COM", # COM flake8-commas
"C4", # C4 flake8-comprehensions
# "CPY", # CPY flake8-copyright
"DTZ", # DTZ flake8-datetimez
# "T10", # T10 flake8-debugger
# "DJ", # DJ flake8-django
# "EM", # EM flake8-errmsg
"EXE", # EXE flake8-executable
"FIX", # FIX flake8-fixme
# "FA", # FA flake8-future-annotations
# "INT", # INT flake8-gettext
"ISC", # ISC flake8-implicit-str-concat
"ICN", # ICN flake8-import-conventions
# "LOG", # LOG flake8-logging
"G", # G flake8-logging-format
"INP", # INP flake8-no-pep420
"PIE", # PIE flake8-pie
"T20", # T20 flake8-print
# "PYI", # PYI flake8-pyi
# "PT", # PT flake8-pytest-style
"Q", # Q flake8-quotes
"RSE", # RSE flake8-raise
"RET", # RET flake8-return
# "SLF", # SLF flake8-self
# "SIM", # SIM flake8-simplify
#"SLOT", # SLOT flake8-slots
# "TID", # TID flake8-tidy-imports
# "TD", # TD flake8-todos
# "TC", # TC flake8-type-checking
# "ARG", # ARG flake8-unused-arguments
# "PTH", # PTH flake8-use-pathlib
# --- misc ---
# "AIR", # AIR Airflow
# "ERA", # ERA eradicate
# "FAST", # FAST FastAPI
# "FLY", # FLY flynt
"NPY", # NPY NumPy-specific rules
# "PD", # PD pandas-vet
# "PERF", # PERF Perflint
# "DOC", # DOC pydoclint
# "PGH", # PGH pygrep-hooks
# "PL", # PL Pylint
# "FURB", # FURB refurb
# "RUF", # RUF Ruff-specific rules
# "TRY", # TRY tryceratops
]
extend-ignore = [
"D105", # D105 Missing docstring in magic method
"D107", # D107 Missing docstring in `__init__`
"D203", # D203 1 blank line required before class docstring
"D213", # D213 Multi-line docstring summary should start at the second line
"ISC001", # ISC001 Implicitly concatenated string literals on one line
"PLR2004", # PLR2004 Magic value used in comparison, consider replacing 2 with a constant variable
"PLR0913", # PLR0913 Too many arguments in function definition
"PLW1514", # PLW1514 `open` in text mode without explicit `encoding` argument
"RET504", # RET504 Unnecessary assignment before `return` statement
"RET505", # RET505 Unnecessary `elif` after `return` statement
]
[tool.ruff.format]
preview = true
docstring-code-format = true
[tool.ruff.lint.per-file-ignores]
"**/{tests}/*" = ["D"]
"**/{notebooks}/*.ipynb" = ["D"]
"docs/conf.py" = ["D"]
[tool.ruff.lint.isort]
length-sort = true
[tool.ruff.lint.flake8-import-conventions.extend-aliases]
"xml.etree.ElementTree" = "etree"
# [tool.ruff.lint.pydocstyle]
# convention = "numpy" # Accepts: "google", "numpy", or "pep257".