[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"