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

[tool.hatch.build.targets.wheel]
packages = ["src/gentrie"]
exclude = [
    ".trunk/",
    ".git/",
    ".gitignore",
    "coverage/",
    "MODULE.bazel",
    "BUILD.bazel",
    "WORKSPACE.bazel",
]
[tool.hatch.build.targets.sdist]
exclude = [
    ".trunk/",
    ".git/",
    ".gitignore",
    "coverage/",
]

[project]
name = "gen-tries"
authors = [
    {name = "Jerilyn Franz", email = "opensource@snowhare.com"}
]
maintainers = [
    {name = "Jerilyn Franz", email = "opensource@snowhare.com"}
]
description = "Generalized trie implementation"
readme = "README.md"
keywords = ["trie"]
license = { file = "LICENSE" }
version = "0.9.4"
classifiers = [
    "Development Status :: 2 - Pre-Alpha",
    "Intended Audience :: Developers",
    "License :: OSI Approved :: Apache Software License",
    "Operating System :: OS Independent",
    "Programming Language :: Python :: 3.10",
    "Programming Language :: Python :: 3.11",
    "Programming Language :: Python :: 3.12",
    "Programming Language :: Python :: 3.13",
    "Topic :: Software Development :: Libraries",
    "Topic :: Software Development :: Libraries :: Python Modules",
]

requires-python = ">=3.10"
dependencies = []

[project.optional-dependencies]
tests = [
    "pytest",
    "testplan",
    "coverage"
]
dev = [
    "flake8",
    "black",
    "pylint",
    "pytest",
    "pytest-cov",
    "pytest-mock",
    "pytest-xdist",
    "testplan",
    "coverage",
    "mypy"
]
docs = [
    "sphinx",
    "sphinx-rtd-theme",
    "sphinx-autodoc-typehints"
]

[project.urls]
Homepage = "https://github.com/JerilynFranz/python-gen-tries"
Documentation = "https://python-gen-tries.readthedocs.io/en/latest/"
Repository = "https://github.com/JerilynFranz/python-gen-tries.git"
Issues = "https://github.com/JerilynFranz/python-gen-tries/issues"
Changelog = "https://github.com/JerilynFranz/python-gen-tries/blob/main/CHANGELOG.md"

[tool.flake8]
max-line-length = 120
extend-ignore = ["E203"]
max-complexity = 10

[tool.black]
target-version = ['py310', 'py311', 'py312', 'py313']
line-length = 120
include_trailing_comma = false

[tool.pylint.format]
max-line-length = 120

[tool.pylint.MASTER]
suggestion-mode = 'yes'

[tool.pytest.ini_options]
filterwarnings = ["ignore:cannot collect test class 'TestSpec':UserWarning"]

[tool.coverage.run]
branch = true
omit = [
    'test_plan.py',
    'tests/testspec.py'
]

[tool.coverage.report]
# Regexes for lines to exclude from consideration
exclude_also = [
    # Don't complain about missing debug-only code:
    "def __repr__",
    "if self\\.debug",

    # Don't complain if tests don't hit defensive assertion code:
    "raise AssertionError",
    "raise NotImplementedError",

    # Don't complain if non-runnable code isn't run:
    "if 0:",
    "if __name__ == .__main__.:",

    # Don't complain about code only used by type checking tools:
    "if TYPE_CHECKING:",
    "def .*: \\.\\.\\.$",

    # Don't complain about abstract methods, they aren't run:
    "@(abc\\.)?abstractmethod",
    ]

ignore_errors = true

[tool.coverage.html]
directory = "coverage_html_report"