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

[project]
name = "nanocli"
version = "0.1.0"
description = "Recursive hierarchical CLI framework with typed configs and YAML synthesis"
readme = "README.md"
license = "MIT"
requires-python = ">=3.10"
authors = [{ name = "Author", email = "author@example.com" }]
keywords = ["cli", "config", "yaml", "typer"]
classifiers = [
    "Development Status :: 3 - Alpha",
    "Environment :: Console",
    "Intended Audience :: Developers",
    "License :: OSI Approved :: MIT License",
    "Programming Language :: Python :: 3",
    "Programming Language :: Python :: 3.10",
    "Programming Language :: Python :: 3.11",
    "Programming Language :: Python :: 3.12",
    "Typing :: Typed",
]

dependencies = ["rich>=13.0.0", "omegaconf>=2.3.0"]

[project.optional-dependencies]
dev = [
    "pytest>=9.0.0",
    "pytest-cov>=4.1.0",
    "pytest-xdist>=3.5.0",
    "mypy>=1.8.0",
    "ruff>=0.14.8",
    "pre-commit>=3.6.0",
    "mkdocs-material>=9.5.0",
    "mkdocstrings[python]>=0.24.0",
]

[project.urls]
Homepage = "https://github.com/example/nanocli"
Repository = "https://github.com/example/nanocli"

[tool.hatch.build.targets.wheel]
packages = ["src/nanocli"]

[tool.ruff]
target-version = "py310"
line-length = 100
src = ["src", "tests"]

[tool.ruff.lint]
select = [
    "E",   # pycodestyle errors
    "W",   # pycodestyle warnings
    "F",   # Pyflakes
    "I",   # isort
    "B",   # flake8-bugbear
    "C4",  # flake8-comprehensions
    "UP",  # pyupgrade
    "ARG", # flake8-unused-arguments
    "SIM", # flake8-simplify
]
ignore = [
    "E501", # line too long (handled by formatter)
]

[tool.ruff.lint.isort]
known-first-party = ["nanocli"]

[tool.mypy]
python_version = "3.10"
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true
disallow_untyped_decorators = false
no_implicit_optional = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_no_return = true
strict_equality = true
ignore_missing_imports = true

[[tool.mypy.overrides]]
module = ["omegaconf.*"]
disallow_untyped_defs = false

[tool.pytest.ini_options]
minversion = "8.0"
testpaths = ["tests", "src"]
pythonpath = ["src"]
addopts = [
    "-ra",
    "-q",
    "--strict-markers",
    "--doctest-modules",
    "--cov=nanocli",
    "--cov-report=term-missing",
    "--cov-report=html",
    "--cov-report=xml",
    "-n4",
    "--cov-fail-under=92",
]
filterwarnings = ["ignore::DeprecationWarning:onnx.helper"]

[tool.coverage.run]
source = ["src/nanocli"]
branch = true
omit = ["*/tests/*", "*/__pycache__/*"]

[tool.coverage.report]
exclude_lines = [
    "pragma: no cover",
    "if TYPE_CHECKING:",
    "if __name__ == .__main__.:",
]

[dependency-groups]
dev = [
    "mkdocs>=1.6.1",
    "mkdocs-material>=9.7.1",
    "mkdocstrings>=1.0.0",
    "mkdocstrings-python>=2.0.1",
    "pre-commit>=4.5.1",
]
