Debian Codegraph @

pyproject.toml

raw
1 [build-system]
2 requires = ["setuptools>=61.0.0"]
3 build-backend = "setuptools.build_meta"
4
5
6 [project]
7 name = "bpack"
8 authors = [
9 {name = "Antonio Valentino", email = "[email protected]"},
10 ]
11 description = "Binary data structures (un-)packing library"
12 readme = {file = "README.rst", content-type = "text/x-rst"}
13 requires-python = ">=3.9"
14 keywords = [
15 "binary",
16 "struct",
17 "descriptor",
18 "declarative",
19 "bit",
20 "unpack",
21 "pack"
22 ]
23 license = {text = "Apache-2.0"}
24 classifiers = [
25 "Development Status :: 4 - Beta",
26 "Intended Audience :: Science/Research",
27 "License :: OSI Approved :: Apache Software License",
28 "Operating System :: OS Independent",
29 "Programming Language :: Python :: 3",
30 "Programming Language :: Python :: 3 :: Only",
31 "Topic :: Scientific/Engineering",
32 "Topic :: Utilities",
33 ]
34 dynamic = ["version"]
35
36
37 [project.optional-dependencies]
38 bs = ["bitstruct"]
39 ba = ["bitarray>=1.5.1"]
40 np = ["numpy"]
41 codegen = ["black"]
42 test = ["pytest", "bpack[bs]", "bpack[ba]", "bpack[np]"]
43 full = ["bpack[bs]", "bpack[ba]", "bpack[np]", "bpack[codegen]", "bpack[test]"]
44
45
46 [project.urls]
47 Homepage = "https://github.com/avalentino/bpack"
48 Documentation = "https://bpack.readthedocs.io"
49 Repository = "https://github.com/avalentino/bpack.git"
50 Changelog = "https://github.com/avalentino/bpack/blob/main/docs/release_notes.rst"
51 Issues = "https://github.com/avalentino/bpack/issues"
52
53
54 [tool.setuptools]
55 packages = [
56 "bpack",
57 "bpack.tests",
58 "bpack.tools",
59 "bpack.tools.tests",
60 "bpack.tools.tests.data",
61 ]
62 # zip-safe = true
63 # license-files = ["LICENSE"]
64
65
66 [tool.setuptools.dynamic]
67 version = {attr = "bpack.__version__"}
68
69
70 [tool.pytest.ini_options]
71 addopts = "--ignore=examples/"
72
73
74 [tool.black]
75 line-length = 79
76 # target-version = ['py311']
77 extend-exclude = "bpack/tools/tests/data"
78
79
80 [tool.isort]
81 profile = "black"
82 length_sort = true
83 no_inline_sort = true
84 include_trailing_comma = true
85 use_parentheses = true
86 line_length = 79
87
88
89 [tool.pydocstyle]
90 match-dir='bpack|tools'
91 match='(?!test_).*\.py'
92 # add-ignore = ["D105", "D107"]
93
94
95 [tool.mypy]
96 plugins = ["numpy.typing.mypy_plugin"]
97
98
99 [tool.ruff]
100 line-length = 79
101 # indent-width = 4
102 # target-version = "py39"
103 extend-exclude = ["docs/conf.py", "examples"]
104
105
106 [tool.ruff.lint]
107 preview = true
108 select = [
109 # Updated to ruff v0.7.1
110 "F", # F Pyflakes
111 "E", # E/W pycodestyle
112 "W", # E/W pycodestyle
113 "C90", # C90 mccabe
114 "I", # I isort
115 "N", # N pep8-naming
116 "D", # D pydocstyle
117 "UP", # UP pyupgrade
118 "YTT", # YTT flake8-2020
119 # "ANN", # ANN flake8-annotations
120 # "ASYNC", # ANYNC flake8-async
121 # "S", # S flake8-bandit # TODO
122 "BLE", # BLE flake8-blind-except
123 "FBT", # FBT flake8-boolean-trap
124 "B", # B flake8-bugbear
125 "A", # A flake8-builtins
126 # "COM", # COM flake8-commas
127 # "CPY", # CPY flake8-copyright # --preview
128 "C4", # C4 flake8-comprehensions
129 "DTZ", # DTZ flake8-datetimez
130 "T10", # T10 flake8-debugger
131 "DJ", # DJ flake8-django
132 # "EM", # EM flake8-errmsg # TODO
133 "EXE", # EXE flake8-executable
134 "FA", # FA flake8-future-annotations
135 "ISC", # ISC flake8-implicit-str-concat
136 "ICN", # ICN flake8-import-conventions
137 # "LOG", # LOG flake8-logging
138 "G", # G flake8-logging-format
139 "INP", # INP flake8-no-pep420
140 "PIE", # PIE flake8-pie
141 "T20", # T20 flake8-print
142 "PYI", # PYI flake8-pyi
143 # "PT", # PT flake8-pytest-style # manual
144 "Q", # Q flake8-quotes
145 "RSE", # RSE flake8-raise
146 "RET", # RET flake8-return
147 "SLF", # SLF flake8-self
148 "SLOT", # SLOT flake8-slots
149 "SIM", # SIM flake8-simplify
150 "TID", # TID flake8-tidy-imports
151 # "TCH", # TCH flake8-type-checking
152 # "INT", # INT flake8-gettext
153 "ARG", # ARG flake8-unused-arguments
154 "PTH", # PTH flake8-use-pathlib
155 # "TD", # TD flake8-todos
156 # "FIX", # FIX flake8-fixme # manual
157 # "ERA", # ERA eradicate # manual
158 # "PD", # PD pandas-vet
159 "PGH", # PGH pygrep-hooks
160 "PL", # PL Pylint
161 # "TRY", # TRY tryceratops # manual
162 "FLY", # FLY flynt
163 "NPY", # NPY NumPy-specific rules
164 # "FAST", # FAST FastAPI
165 # "AIR", # AIR Airflow
166 "PERF", # PERF Perflint
167 # "FURB", # FURB refurb # --preview
168 # "DOC", # DOC pydoclint
169 "RUF", # RUF Ruff-specific rules
170 ]
171 extend-ignore = [
172 "D105", # D105 Missing docstring in magic method
173 "D107", # D107 Missing docstring in `__init__`
174 "D203", # D203 1 blank line required before class docstring
175 "D213", # D213 Multi-line docstring summary should start at the second line
176 "ISC001", # ISC001 Implicitly concatenated string literals on one line
177 "PLR2004", # PLR2004 Magic value used in comparison, consider replacing 2 with a constant variable
178 "PLR0913", # PLR0913 Too many arguments in function definition
179 "PLW1514", # PLW1514 `open` in text mode without explicit `encoding` argument
180 "RET504", # RET504 Unnecessary assignment before `return` statement
181 "RET505", # RET505 Unnecessary `elif` after `return` statement
182 ]
183
184
185 [tool.ruff.format]
186 preview = true
187 docstring-code-format = true
188
189
190 [tool.ruff.lint.per-file-ignores]
191 "**/{tests}/*" = ["D"]
192 "notebooks/*" = ["D"]
193
194
195 [tool.ruff.lint.isort]
196 length-sort = true
197
198
199 [tool.ruff.lint.flake8-import-conventions.extend-aliases]
200 "xml.etree.ElementTree" = "etree"