numpydantic/pyproject.toml

200 lines
4.4 KiB
TOML
Raw Normal View History

[project]
name = "numpydantic"
2024-09-27 03:11:03 +00:00
version = "1.6.3"
description = "Type and shape validation and serialization for arbitrary array types in pydantic models"
authors = [
{name = "sneakers-the-rat", email = "sneakers-the-rat@protonmail.com"},
]
dependencies = [
"pydantic>=2.3.0",
2024-04-09 01:36:47 +00:00
"numpy>=1.24.0",
"typing-extensions>=4.11.0;python_version<'3.11'"
]
requires-python = "<4.0,>=3.9"
readme = "README.md"
2024-05-23 07:27:00 +00:00
repository = "https://github.com/p2p-ld/numpydantic"
license = {text = "MIT"}
keywords = [
"arrays",
"validation",
"serialization",
"numpy",
"pydantic",
]
classifiers = [
"Framework :: Pydantic",
"Framework :: Pydantic :: 2",
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Operating System :: MacOS",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: File Formats :: JSON :: JSON Schema",
"Topic :: Utilities"
]
[project.urls]
homepage = "https://numpydantic.readthedocs.io"
documentation = "https://numpydantic.readthedocs.io"
repository = "https://github.com/p2p-ld/numpydantic"
changelog = "https://numpydantic.readthedocs.io/en/latest/changelog.html"
[project.optional-dependencies]
dask = [
2024-04-09 01:36:47 +00:00
"dask>=2024.4.0",
]
hdf5 = [
2024-09-27 02:58:27 +00:00
"h5py>=3.10.0",
]
2024-05-21 02:17:46 +00:00
video = [
"opencv-python>=4.9.0.80",
]
2024-05-21 04:16:16 +00:00
zarr = [
"zarr>=2.17.2",
]
arrays = [
2024-05-21 02:17:46 +00:00
"numpydantic[dask,hdf5,zarr,video]"
]
tests = [
"numpydantic[arrays]",
"pytest>=7.4.0",
"pytest-depends<2.0.0,>=1.0.1",
"coverage>=6.1.1",
"pytest-cov<5.0.0,>=4.1.0",
2024-04-23 03:23:24 +00:00
"coveralls<4.0.0,>=3.3.1",
]
docs = [
2024-09-21 11:18:22 +00:00
"numpydantic[arrays]",
"sphinx<8.0.0,>=7.2.6",
"furo>=2024.1.29",
"myst-parser<3.0.0,>=2.0.0",
"autodoc-pydantic<3.0.0,>=2.0.1",
"sphinx-design<1.0.0,>=0.5.0",
"sphinxcontrib-mermaid>=0.9.2",
2024-09-21 11:18:22 +00:00
"myst-nb>=1.1.1",
2024-09-21 11:22:20 +00:00
"rich>=13.8.1",
]
dev = [
"numpydantic[tests,docs]",
"sphinx-autobuild>=2021.3.14",
"black<25.0.0,>=24.1.1",
"ruff<1.0.0,>=0.2.0"
]
2024-05-21 02:17:46 +00:00
[tool.pdm]
distribution = true
[tool.pdm.build]
includes = []
2024-10-04 03:01:56 +00:00
[tool.pdm.scripts]
lint = "ruff check"
format = {shell = "ruff check --fix ; black ."}
test = "pytest"
[build-system]
requires = ["pdm-backend"]
build-backend = "pdm.backend"
[tool.pytest.ini_options]
addopts = [
"--cov=numpydantic",
"--cov-append",
]
testpaths = [
"tests"
]
filterwarnings = [
# nptyping's alias warnings
'ignore:.*deprecated alias.*Deprecated NumPy 1\.24.*'
]
markers = [
"dtype: mark test related to dtype validation",
"shape: mark test related to shape validation",
"json_schema: mark test related to json schema generation",
2024-09-23 20:28:38 +00:00
"serialization: mark test related to serialization",
"proxy: test for proxy class in any interface",
"dask: dask interface",
"hdf5: hdf5 interface",
"numpy: numpy interface",
"video: video interface",
"zarr: zarr interface",
]
2024-10-04 06:18:18 +00:00
[tool.black]
target-version = ["py39", "py310", "py311", "py312"]
[tool.ruff]
target-version = "py39"
2024-10-04 02:57:54 +00:00
include = ["src/numpydantic/**/*.py", "tests/**/*.py", "pyproject.toml"]
[tool.ruff.lint]
select = [
# pycodestyle
"E",
# Pyflakes
"F",
# pyupgrade
"UP",
# flake8-bugbear
"B",
# flake8-simplify
"SIM",
# isort
"I",
# annotations
"ANN",
# perf
"PERF",
# numpy
"NPY",
## ----------
# pydocstyle
# undocumented public objects
"D100", "D101", "D102", "D103", "D104", "D106", "D107",
# indentation
"D207", "D208",
# whitespace
"D210", "D211",
# emptiness
"D419",
2024-09-04 00:43:11 +00:00
# no pdb
"T100",
]
ignore = [
2024-04-09 01:36:47 +00:00
"ANN101", "ANN102", "ANN401", "ANN204",
2024-04-23 03:27:11 +00:00
# explicit strict arg for zip
"B905",
# builtin type annotations
"UP006", "UP035",
2024-04-09 01:36:47 +00:00
# | for Union types (only supported >=3.10
"UP007", "UP038",
# docstrings for __init__
"D107",
]
fixable = ["ALL"]
2024-10-04 02:57:54 +00:00
[tool.ruff.lint.per-file-ignores]
"src/numpydantic/testing/*" = ["D", "F722"]
"tests/*" = ["D", "F403", "F722", "ANN", ]
[tool.mypy]
plugins = [
"pydantic.mypy"
2024-07-31 20:06:10 +00:00
]
[tool.coverage.run]
omit = [
"src/numpydantic/vendor/*"
]