[project]
name = "diracx-routers"
description = "TODO"
readme = "README.md"
requires-python = ">=3.11"
keywords = []
license = { text = "GPL-3.0-only" }
classifiers = [
    "Intended Audience :: Science/Research",
    "License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
    "Programming Language :: Python :: 3",
    "Topic :: Scientific/Engineering",
    "Topic :: System :: Distributed Computing",
]
dependencies = [
    "cachetools",
    "diracx-core",
    "diracx-logic",
    "diracx-db",
    "python-dotenv",    # TODO: We might not need this
    "python-multipart",
    "fastapi",
    "httpx",
    "joserfc",
    "pydantic >=2.10",
    "uvicorn",
    "opentelemetry-api",
    "opentelemetry-exporter-otlp",
    "opentelemetry-instrumentation-fastapi",
    "opentelemetry-instrumentation-logging",
    "opentelemetry-sdk",
]
dynamic = ["version"]

[project.optional-dependencies]
testing = ["diracx-testing", "moto[server]", "pytest-httpx", "freezegun", "pyjwt"]
types = [
    "types-cachetools",
    "types-python-dateutil",
    "types-PyYAML",
]

[project.entry-points."diracx.services"]
".well-known" = "diracx.routers.auth.well_known:router"
auth = "diracx.routers.auth:router"
config = "diracx.routers.configuration:router"
health = "diracx.routers.health:router"
jobs = "diracx.routers.jobs:router"

[project.entry-points."diracx.access_policies"]
WMSAccessPolicy = "diracx.routers.jobs.access_policies:WMSAccessPolicy"
SandboxAccessPolicy = "diracx.routers.jobs.access_policies:SandboxAccessPolicy"

# Minimum version of the client supported
[project.entry-points."diracx.min_client_version"]
diracx = "diracx.routers:DIRACX_MIN_CLIENT_VERSION"

[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"

[tool.hatch.version]
source = "vcs"

[tool.hatch.version.raw-options]
root = ".."

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

[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = [
    "-v",
    "--cov=diracx.routers",
    "--cov-report=term-missing",
    "-pdiracx.testing",
    "-pdiracx.testing.osdb",
    "--import-mode=importlib",
]
asyncio_mode = "auto"
markers = [
    "enabled_dependencies: List of dependencies which should be available to the FastAPI test client",
]


asyncio_default_fixture_loop_scope = "function"
