[build-system]
requires = ["setuptools>=83.0.0", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "britecore_sdk"
version = "2.2.0"
description = "Professional Python SDK for the BriteCore API — complete endpoint coverage, async support, OAuth/API key auth, and type hints."
readme = "README.md"
license = "Apache-2.0"
authors = [{ name = "sshimek" }]
requires-python = ">=3.11"
keywords = ["britecore", "api", "sdk", "insurance", "async", "oauth2", "rest-api"]
classifiers = [
    "Development Status :: 5 - Production/Stable",
    "Environment :: Web Environment",
    "Intended Audience :: Developers",
    "Natural Language :: English",
    "Operating System :: OS Independent",
    "Programming Language :: Python",
    "Programming Language :: Python :: 3",
    "Programming Language :: Python :: 3.11",
    "Programming Language :: Python :: 3.12",
    "Programming Language :: Python :: 3.13",
    "Programming Language :: Python :: 3.14",
    "Topic :: Software Development :: Libraries :: Python Modules",
    "Topic :: Internet :: WWW/HTTP",
    "Typing :: Typed",
]
dependencies = [
    "dynaconf>=3.3.3,<3.4.0",
    "urllib3>=2.7.0,<3.0.0",
    "tomli-w>=1.2.0,<2.0.0",
]

[project.scripts]
britecore-quick-check = "britecore_sdk.cli.quick_check:main"
britecore-config-wizard = "britecore_sdk.cli.config_wizard:main"
britecore-check-config = "britecore_sdk.cli.check_config:main"
britecore-healthcheck = "britecore_sdk.cli.healthcheck:main"

[project.urls]
Homepage = "https://github.com/sshimek42/britecore_sdk"
Documentation = "https://britecore-sdk.readthedocs.io/en/latest/"
Repository = "https://github.com/sshimek42/britecore_sdk"
Issues = "https://github.com/sshimek42/britecore_sdk/issues"
Changelog = "https://github.com/sshimek42/britecore_sdk/blob/master/CHANGELOG.md"

[project.optional-dependencies]
interactive = [
    "questionary~=2.1.1",
]
async-http = [
    "httpx>=0.28.1,<1.0.0",
]
typed-config = [
    "pydantic>=2.11.0,<3.0.0",
    "pydantic-settings>=2.11.0,<3.0.0",
]
all = [
    "britecore_sdk[interactive]",
    "britecore_sdk[async-http]",
    "britecore_sdk[typed-config]",
]
dev = [
    "setuptools>=83.0.0",
    "pytest>=9.1.1",
    "pytest-asyncio>=1.4.0",
    "pytest-mock>=3.15.1",
    "pytest-cov>=7.1.0",
    "pytest-randomly>=4.1.0",
    "hypothesis>=6.158.0",
    "python-dotenv>=1.2.2",
    "black>=26.5.1",
    "ruff>=0.15.22",
    "mypy>=2.3.0",
    "pre-commit>=4.6.0",
    "pymarkdownlnt>=0.9.39",
    "pip-audit>=2.10.1",
    "britecore_sdk[all]",
]
docs = [
    "sphinx>=9.0.4,<9.1",
    "myst-parser>=5.1.0",
    "sphinx-rtd-theme>=3.1.0",
]

[tool.setuptools.packages.find]
where = ["src"]

[tool.setuptools.package-data]
britecore_sdk = ["py.typed", "resources/*"]


[tool.coverage.run]
source = ["src/britecore_sdk"]
omit = [
    "*/tests/*",
    "*/site-packages/*",
    "*/__pycache__/*",
    "src/britecore_sdk/api/_compat.py",
    "src/britecore_sdk/api/iterators.py",
    "src/britecore_sdk/api/middleware.py",
    "src/britecore_sdk/api/responses.py",
    "src/britecore_sdk/api/api_calls/v1/*.py",
    "src/britecore_sdk/api/api_calls/v2/*.py",
    "src/britecore_sdk/api/bulk_operation_manager.py",
    "src/britecore_sdk/api/response_helpers.py",
    "src/britecore_sdk/api/timing_middleware.py",
    "src/britecore_sdk/utils/config_manager.py",
    "src/britecore_sdk/utils/error_hints.py",
    "src/britecore_sdk/utils/generate_spec_wrappers.py",
    "src/britecore_sdk/cli/*.py",
    "src/britecore_sdk/webhooks/*.py",
]

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

[tool.ruff]
line-length = 88
target-version = "py311"

[tool.black]
line-length = 88
target-version = ["py311"]

[tool.ruff.lint]
select = ["E", "F", "I", "B", "UP", "D202", "D209", "D300"]
ignore = ["E501"]

[tool.mypy]
python_version = "3.11"
ignore_missing_imports = true
warn_redundant_casts = true
warn_unused_ignores = true
pretty = true
exclude = [
    "build/",
    "dist/",
    "env/",
    ".venv/",
    ".*egg-info/",
    "htmlcov/",
    "src/britecore_sdk/build/",
]
