[project]
name = "dynapydantic"
version = "0.1.0"
description = "Dyanmic pydantic models"
readme = "README.md"
authors = [
    { name = "Philip Salvaggio", email = "salvaggio.philip@gmail.com" }
]
requires-python = ">=3.10"
dependencies = [
    "pydantic>=2.0",
]

[dependency-groups]
dev = [
    "click>=8.2.1",
    "pip>=25.1.1",
    "pre-commit>=4.2.0",
    "pytest>=8.4.1",
    "pytest-cov>=6.2.1",
    "pytest-xdist>=3.8.0",
    "python-lsp-server>=1.13.0",
    "ruff>=0.12.3",
]

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.pytest.ini_options]
pythonpath = ["src"]
testpaths = ["tests"]
addopts = "--cov=dynapydantic --cov-report=html --cov-branch"

[tool.ruff]
target-version = "py310"

[tool.ruff.lint]
select = ["ALL"]
ignore = [
    "D400", # docstrings end in .
    "ANN002", # Annotations for *args
    "ANN003", # Annotations for *kwargs
]

[tool.ruff.lint.pydocstyle]
convention = "numpy"

[tool.ruff.lint.extend-per-file-ignores]
"tests/**/*.py" = [
    "S101", # asserts allowed in tests
    "ARG", # Unused function args -> (fixtures can be unused)
    "FBT", # Don't care about booleans as positional arguments in tests, e.g. via @pytest.mark.parametrize()
    "PLR2004", # Magic value used in comparison
]
"**/cli.py" = [
    "PLC0415", # imports in CLI functions improve load times
]
