# Copyright 2025 Softwell S.r.l.
# Licensed under the Apache License, Version 2.0

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

[project]
name = "genro-builders"
version = "0.10.1"
description = "Builder system for genro-bag - grammar, validation, compilation"
readme = "README.md"
license = "Apache-2.0"
requires-python = ">=3.10"
authors = [
    {name = "Genropy Team"}
]
keywords = [
    "builder",
    "compiler",
    "grammar",
    "validation",
    "genro",
    "genropy"
]
classifiers = [
    "Development Status :: 3 - Alpha",
    "Intended Audience :: Developers",
    "Operating System :: OS Independent",
    "Programming Language :: Python :: 3",
    "Programming Language :: Python :: 3.10",
    "Programming Language :: Python :: 3.11",
    "Programming Language :: Python :: 3.12",
    "Programming Language :: Python :: 3.13",
    "Topic :: Software Development :: Libraries :: Python Modules",
    "Typing :: Typed",
]
dependencies = [
    "genro-bag>=0.11.0",
    "genro-toolbox>=0.6.1",
]

[project.optional-dependencies]
dev = [
    "pytest>=7.0",
    "pytest-cov>=4.0",
    "ruff>=0.1.0",
    "mypy>=1.0",
]
docs = [
    "sphinx>=8.0.0",
    "sphinx-rtd-theme>=3.0.0",
    "sphinx-autodoc-typehints>=3.0.0",
    "myst-parser>=4.0.0",
    "sphinxcontrib-mermaid>=1.0.0",
]
xsd-validate = [
    "xmlschema>=3.0",
]
all = [
    "genro-builders[dev,docs,xsd-validate]",
]

[project.urls]
Homepage = "https://github.com/genropy/genro-builders"
Repository = "https://github.com/genropy/genro-builders"

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

[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = "-v --cov=genro_builders --cov-report=term-missing"

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

[tool.ruff.lint]
select = [
    "E",      # pycodestyle errors
    "W",      # pycodestyle warnings
    "F",      # Pyflakes
    "I",      # isort
    "B",      # flake8-bugbear
    "C4",     # flake8-comprehensions
    "UP",     # pyupgrade
    "SIM",    # flake8-simplify
]
ignore = [
    "E501",   # line too long
    "B008",   # no function calls in arg defaults
]

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

[tool.mypy]
python_version = "3.10"
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = false
files = ["src/genro_builders"]

[tool.coverage.run]
source = ["src/genro_builders"]
branch = true
