[project]
name = "dataknobs-xization"
version = "1.3.0"
description = "Text normalization and tokenization tools"
readme = "README.md"
authors = [
    { name = "Spence Koehler", email = "KoehlerSB747@gmail.com" }
]
requires-python = ">=3.10"
dependencies = [
    "dataknobs-common>=1.0.0",
    "dataknobs-structures>=1.0.0",
    "dataknobs-utils>=1.0.0",
    "beautifulsoup4>=4.12.0",
    "nltk>=3.9.1",
    "more-itertools>=8.10.0",
    "numpy>=1.24.0",
    "pandas>=2.0.0",
]

[tool.uv.sources]
dataknobs-common = { workspace = true }
dataknobs-structures = { workspace = true }
dataknobs-utils = { workspace = true }

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

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

[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = []
asyncio_mode = "auto"

[tool.coverage.run]
source = ["src/dataknobs_xization"]
omit = [
    "*/tests/*",
    "*/__init__.py",
]

[tool.coverage.report]
exclude_lines = [
    "pragma: no cover",
    "def __repr__",
    "if __name__ == .__main__.:",
    "raise NotImplementedError",
    "if TYPE_CHECKING:",
    "@abstractmethod",
]

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

[[tool.mypy.overrides]]
module = [
    "bs4.*",
    "pandas.*",
    "numpy.*",
    "nltk.*",
    "lark.*",
]
ignore_missing_imports = true

[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
    "N",    # pep8-naming
    "UP",   # pyupgrade
    "B",    # flake8-bugbear
    "C4",   # flake8-comprehensions
    "SIM",  # flake8-simplify
    "RUF",  # Ruff-specific rules
]

ignore = [
    "D100", # Missing docstring in public module
    "D101", # Missing docstring in public class
    "D102", # Missing docstring in public method
    "D103", # Missing docstring in public function
    "D104", # Missing docstring in public package
    "D105", # Missing docstring in magic method
    "D107", # Missing docstring in __init__
    "D203", # 1 blank line required before class docstring
    "D205", # 1 blank line required between summary line and description
    "D213", # Multi-line docstring summary should start at the second line
    "D400", # First line should end with a period
    "D401", # First line should be in imperative mood
    "D404", # First word of the docstring should not be "This"
    "B905", # zip() without an explicit strict parameter
]

[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["D104", "F401"]
"tests/*" = ["D100", "D101", "D102", "D103", "S101"]

[tool.ruff.lint.isort]
known-first-party = ["dataknobs_xization", "dataknobs_common", "dataknobs_structures", "dataknobs_utils"]

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