Files
ENI-projet-piscine/ml/pyproject.toml
T

90 lines
1.9 KiB
TOML

[project]
name = "enervision-ml"
version = "0.1.0"
description = "Pipeline d'entrainement et de scoring du modele de prediction EnerVision (LightGBM)"
requires-python = ">=3.14,<3.15"
dependencies = [
"pandas>=3.0.5",
"sqlalchemy>=2.0.52",
"psycopg[binary]>=3.2",
"lightgbm>=4.6",
"scikit-learn>=1.7",
"mlflow>=3.0",
]
[dependency-groups]
dev = [
"ruff>=0.16.7",
"mypy>=2.3.1",
"pytest>=9.1.1",
"pytest-cov>=7.1.0",
"pandas-stubs>=3.0.5.260914",
]
[build-system]
requires = ["hatchling>=1.32.0"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["enervision_ml"]
[tool.ruff]
line-length = 100
target-version = "py314"
src = ["enervision_ml", "tests"]
[tool.ruff.lint]
select = [
"E", "W",
"F",
"I",
"N",
"UP",
"B",
"C4",
"SIM",
"TID",
"RUF",
"S",
"PT",
]
# N806/N803 : `X`/`y` (donnees/cible) est la convention scikit-learn/LightGBM, pas une variable
# ou un argument mal nomme.
ignore = ["B008", "N806", "N803"]
[tool.ruff.lint.per-file-ignores]
"tests/**/*.py" = ["S101"]
[tool.ruff.lint.isort]
known-first-party = ["enervision_ml"]
[tool.ruff.format]
quote-style = "double"
[tool.mypy]
python_version = "3.14"
strict = true
warn_unreachable = true
[[tool.mypy.overrides]]
module = ["tests.*"]
disallow_untyped_defs = false
[[tool.mypy.overrides]]
module = ["lightgbm.*", "mlflow.*", "sklearn.*"]
ignore_missing_imports = true
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = "-q --strict-markers -m 'not integration' --cov=enervision_ml --cov-report=term-missing"
markers = ["integration: requiert une base PostgreSQL joignable"]
# Rapport lu par SonarCloud (`ml/coverage.xml`, cf. sonar-project.properties), meme mecanisme que
# apps/backend. Pas de seuil ici : celui de la quality gate porte sur le code nouveau.
[tool.coverage.run]
source = ["enervision_ml"]
branch = true
[tool.coverage.report]
show_missing = true