-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
200 lines (168 loc) · 5.75 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
[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.9"
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/"
[tool.black]
line-length = 79
# target-version = ['py311']
extend-exclude = "bpack/tools/tests/data"
[tool.isort]
profile = "black"
length_sort = true
no_inline_sort = true
include_trailing_comma = true
use_parentheses = true
line_length = 79
[tool.pydocstyle]
match-dir='bpack|tools'
match='(?!test_).*\.py'
# add-ignore = ["D105", "D107"]
[tool.mypy]
plugins = ["numpy.typing.mypy_plugin"]
[tool.ruff]
line-length = 79
# indent-width = 4
# target-version = "py39"
extend-exclude = ["docs/conf.py", "examples"]
[tool.ruff.lint]
preview = true
select = [
# Updated to ruff v0.7.1
"F", # F Pyflakes
"E", # E/W pycodestyle
"W", # E/W pycodestyle
"C90", # C90 mccabe
"I", # I isort
"N", # N pep8-naming
"D", # D pydocstyle
"UP", # UP pyupgrade
"YTT", # YTT flake8-2020
# "ANN", # ANN flake8-annotations
# "ASYNC", # ANYNC flake8-async
# "S", # S flake8-bandit # TODO
"BLE", # BLE flake8-blind-except
"FBT", # FBT flake8-boolean-trap
"B", # B flake8-bugbear
"A", # A flake8-builtins
# "COM", # COM flake8-commas
# "CPY", # CPY flake8-copyright # --preview
"C4", # C4 flake8-comprehensions
"DTZ", # DTZ flake8-datetimez
"T10", # T10 flake8-debugger
"DJ", # DJ flake8-django
# "EM", # EM flake8-errmsg # TODO
"EXE", # EXE flake8-executable
"FA", # FA flake8-future-annotations
"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 # manual
"Q", # Q flake8-quotes
"RSE", # RSE flake8-raise
"RET", # RET flake8-return
"SLF", # SLF flake8-self
"SLOT", # SLOT flake8-slots
"SIM", # SIM flake8-simplify
"TID", # TID flake8-tidy-imports
# "TCH", # TCH flake8-type-checking
# "INT", # INT flake8-gettext
"ARG", # ARG flake8-unused-arguments
"PTH", # PTH flake8-use-pathlib
# "TD", # TD flake8-todos
# "FIX", # FIX flake8-fixme # manual
# "ERA", # ERA eradicate # manual
# "PD", # PD pandas-vet
"PGH", # PGH pygrep-hooks
"PL", # PL Pylint
# "TRY", # TRY tryceratops # manual
"FLY", # FLY flynt
"NPY", # NPY NumPy-specific rules
# "FAST", # FAST FastAPI
# "AIR", # AIR Airflow
"PERF", # PERF Perflint
# "FURB", # FURB refurb # --preview
# "DOC", # DOC pydoclint
"RUF", # RUF Ruff-specific rules
]
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/*" = ["D"]
[tool.ruff.lint.isort]
length-sort = true
[tool.ruff.lint.flake8-import-conventions.extend-aliases]
"xml.etree.ElementTree" = "etree"