[build-system]
requires = ["py-cpuinfo==9.0.0", "setuptools>=77.0.0", "wheel>=0.34.0"]
build-backend = "setuptools.build_meta"

[project]
name = "hdf5plugin"
authors = [
    {name = "ESRF", email = "silx@esrf.fr"}
]
description = "HDF5 Plugins for Windows, MacOS, and Linux"
readme = "README.rst"
requires-python = ">=3.9"
license-files = ["LICENSE"]
classifiers = [
    "Development Status :: 5 - Production/Stable",
    "Environment :: Console",
    "Environment :: MacOS X",
    "Environment :: Win32 (MS Windows)",
    "Intended Audience :: Education",
    "Intended Audience :: Science/Research",
    "Natural Language :: English",
    "Operating System :: POSIX :: Linux",
    "Operating System :: MacOS",
    "Operating System :: Microsoft :: Windows",
    "Programming Language :: Python :: 3",
    "Topic :: Software Development :: Libraries :: Python Modules",
]
dependencies = ["h5py>=3.0.0"]
dynamic = ["version"]

[project.urls]
Homepage = "https://github.com/silx-kit/hdf5plugin"
Documentation = "http://www.silx.org/doc/hdf5plugin/latest/"
Repository = "https://github.com/silx-kit/hdf5plugin"

[project.optional-dependencies]
doc = [
    "ipython",
    "nbsphinx",
    "sphinx",
    "sphinx-autodoc-typehints",
    "sphinx_rtd_theme",
]
test = [
    "numpy<2 ; python_version == '3.9'",
    "blosc2>=2.5.1",
    "blosc2-grok>=0.2.2",
]
dev = [
    "hdf5plugin[doc,test]",
    "bandit",
    "black",
    "flake8",
    "isort",
]

[tool.setuptools]
packages = ["hdf5plugin"]
package-dir = {"" = "src"}

[tool.setuptools.dynamic]
version = {attr = "hdf5plugin._version.version"}

[tool.bandit]
exclude_dirs = [
    "build",
    "doc/hdf5plugin_EuropeanHUG2023",
    "lib",
]

[tool.bandit.assert_used]
skips = ["*test.py"]

[tool.black]
extend-exclude = '''
(
    lib
    | .*\.ipynb
)
'''

[tool.isort]
profile = "black"
skip_glob = ["lib"]

[tool.mypy]
mypy_path = ["src"]
packages = ["hdf5plugin"]
strict = true
implicit_optional = true
warn_unused_configs = true

[[tool.mypy.overrides]]
module = ["hdf5plugin.test"]
disable_error_code = [
    "attr-defined",
    "no-untyped-def",
]

[[tool.mypy.overrides]]
module = [
    "blosc2",
    "hdf5plugin._config",
]
ignore_missing_imports = true
