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

[project]
name = "lccalib"
dynamic = ["version"]
description = "SNe calibration package for the Lemaitre pipeline"
readme = "README.md"
requires-python = ">=3.8"
license = "MIT"
keywords = []
authors = [
  {name="Marc Betoule", email="marc.betoule@lpnhe.in2p3.fr" },
  {name="Maude Le Jeune", email="lejeune@apc.in2p3.fr"},
]
classifiers = [
  "Development Status :: 4 - Beta",
  "Programming Language :: Python",
  "Programming Language :: Python :: 3.8",
  "Programming Language :: Python :: 3.9",
  "Programming Language :: Python :: 3.10",
  "Programming Language :: Python :: 3.11",
  "Programming Language :: Python :: 3.12",
  "Programming Language :: Python :: Implementation :: CPython",
  "Programming Language :: Python :: Implementation :: PyPy",
]
dependencies = []

[project.urls]
Documentation = "https://gitlab.in2p3.fr/lemaitre/lccalib#readme"
Issues = "https://gitlab.in2p3.fr/lemaitre/lccalib/issues"
Source = "https://gitlab.in2p3.fr/lemaitre/lccalib"

[tool.hatch.version]
path = "src/lccalib/__about__.py"

[tool.hatch.envs.default]
dependencies = [
  "coverage[toml]>=6.5",
  "pytest",
]
[tool.hatch.envs.default.scripts]
test = "pytest {args:tests}"
test-cov = "coverage run -m pytest {args:tests}"
cov-report = [
  "- coverage combine",
  "coverage report",
]
cov = [
  "test-cov",
  "cov-report",
]

[[tool.hatch.envs.all.matrix]]
python = ["3.8", "3.9", "3.10", "3.11", "3.12"]

[tool.hatch.envs.types]
dependencies = [
  "mypy>=1.0.0",
]
[tool.hatch.envs.types.scripts]
check = "mypy --install-types --non-interactive {args:src/lccalib tests}"

[tool.coverage.run]
source_pkgs = ["lccalib", "tests"]
branch = true
parallel = true
omit = [
  "src/lccalib/__about__.py",
]

[tool.coverage.paths]
lccalib = ["src/lccalib", "*/lccalib/src/lccalib"]
tests = ["tests", "*/lccalib/tests"]

[tool.coverage.report]
exclude_lines = [
  "no cov",
  "if __name__ == .__main__.:",
  "if TYPE_CHECKING:",
]
