generated from gilles/template-webapp
claude code
This commit is contained in:
142
backend/pyproject.toml
Normal file
142
backend/pyproject.toml
Normal file
@@ -0,0 +1,142 @@
|
||||
[project]
|
||||
name = "homestock-backend"
|
||||
version = "0.1.0"
|
||||
description = "HomeStock - Backend API pour gestion d'inventaire domestique"
|
||||
authors = [
|
||||
{ name = "Gilles", email = "gilles@example.com" }
|
||||
]
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.11"
|
||||
license = { text = "MIT" }
|
||||
|
||||
dependencies = [
|
||||
# FastAPI
|
||||
"fastapi>=0.109.0",
|
||||
"uvicorn[standard]>=0.27.0",
|
||||
"python-multipart>=0.0.6", # Pour upload fichiers
|
||||
|
||||
# Database
|
||||
"sqlalchemy>=2.0.25",
|
||||
"alembic>=1.13.1",
|
||||
"aiosqlite>=0.19.0", # Async SQLite
|
||||
|
||||
# Validation
|
||||
"pydantic>=2.5.3",
|
||||
"pydantic-settings>=2.1.0",
|
||||
"email-validator>=2.1.0",
|
||||
|
||||
# Logging
|
||||
"loguru>=0.7.2",
|
||||
|
||||
# Utils
|
||||
"python-dotenv>=1.0.0",
|
||||
"httpx>=0.26.0", # Pour tests API
|
||||
]
|
||||
|
||||
[project.optional-dependencies]
|
||||
dev = [
|
||||
# Testing
|
||||
"pytest>=7.4.4",
|
||||
"pytest-asyncio>=0.23.3",
|
||||
"pytest-cov>=4.1.0",
|
||||
"pytest-mock>=3.12.0",
|
||||
|
||||
# Linting & Formatting
|
||||
"ruff>=0.1.14",
|
||||
"mypy>=1.8.0",
|
||||
]
|
||||
|
||||
[build-system]
|
||||
requires = ["hatchling"]
|
||||
build-backend = "hatchling.build"
|
||||
|
||||
[tool.hatch.build.targets.wheel]
|
||||
packages = ["app"]
|
||||
|
||||
# === Ruff Configuration ===
|
||||
[tool.ruff]
|
||||
target-version = "py311"
|
||||
line-length = 100
|
||||
select = [
|
||||
"E", # pycodestyle errors
|
||||
"W", # pycodestyle warnings
|
||||
"F", # pyflakes
|
||||
"I", # isort
|
||||
"B", # flake8-bugbear
|
||||
"C4", # flake8-comprehensions
|
||||
"UP", # pyupgrade
|
||||
]
|
||||
ignore = [
|
||||
"E501", # line too long (handled by formatter)
|
||||
"B008", # do not perform function calls in argument defaults
|
||||
"C901", # too complex
|
||||
]
|
||||
|
||||
[tool.ruff.per-file-ignores]
|
||||
"__init__.py" = ["F401"] # unused imports in __init__
|
||||
|
||||
[tool.ruff.isort]
|
||||
known-first-party = ["app"]
|
||||
|
||||
# === MyPy Configuration ===
|
||||
[tool.mypy]
|
||||
python_version = "3.11"
|
||||
strict = true
|
||||
warn_return_any = true
|
||||
warn_unused_configs = true
|
||||
disallow_untyped_defs = true
|
||||
disallow_any_generics = true
|
||||
disallow_subclassing_any = true
|
||||
disallow_untyped_calls = true
|
||||
disallow_incomplete_defs = true
|
||||
check_untyped_defs = true
|
||||
no_implicit_optional = true
|
||||
warn_redundant_casts = true
|
||||
warn_unused_ignores = true
|
||||
warn_no_return = true
|
||||
warn_unreachable = true
|
||||
strict_equality = true
|
||||
|
||||
[[tool.mypy.overrides]]
|
||||
module = [
|
||||
"sqlalchemy.*",
|
||||
"alembic.*",
|
||||
"loguru.*",
|
||||
]
|
||||
ignore_missing_imports = true
|
||||
|
||||
# === Pytest Configuration ===
|
||||
[tool.pytest.ini_options]
|
||||
minversion = "7.0"
|
||||
addopts = [
|
||||
"-ra",
|
||||
"--strict-markers",
|
||||
"--cov=app",
|
||||
"--cov-report=term-missing",
|
||||
"--cov-report=html",
|
||||
]
|
||||
testpaths = ["tests"]
|
||||
pythonpath = ["."]
|
||||
asyncio_mode = "auto"
|
||||
|
||||
# === Coverage Configuration ===
|
||||
[tool.coverage.run]
|
||||
source = ["app"]
|
||||
omit = [
|
||||
"*/tests/*",
|
||||
"*/__init__.py",
|
||||
"*/alembic/*",
|
||||
]
|
||||
|
||||
[tool.coverage.report]
|
||||
precision = 2
|
||||
show_missing = true
|
||||
skip_covered = false
|
||||
exclude_lines = [
|
||||
"pragma: no cover",
|
||||
"def __repr__",
|
||||
"if TYPE_CHECKING:",
|
||||
"raise AssertionError",
|
||||
"raise NotImplementedError",
|
||||
"if __name__ == .__main__.:",
|
||||
]
|
||||
Reference in New Issue
Block a user