-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
95 lines (84 loc) · 2.55 KB
/
Copy pathpyproject.toml
File metadata and controls
95 lines (84 loc) · 2.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
[project]
name = "mypackage"
version = "0.1.0"
description = "A short description of your project"
readme = "README.md"
requires-python = ">=3.11"
dependencies = [
# --- Core runtime dependencies ---
# Add project-specific dependencies here.
# Examples:
# "httpx>=0.27.0",
"fastapi>=0.110.0",
"uvicorn[standard]>=0.29.0",
"typer>=0.12.0",
"pydantic-settings>=2.0.0",
"loguru>=0.7.0",
"rich>=13.0.0",
]
[dependency-groups]
dev = [
"pytest>=8.0.0",
"pytest-cov>=5.0.0",
"httpx>=0.27.0", # for FastAPI TestClient
"ruff>=0.4.0",
"mypy>=1.10.0",
]
# Expose a CLI entry point once you have a real command.
# [project.scripts]
# mypackage = "mypackage.main:app"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["src/mypackage"]
# ---------------------------------------------------------------------------
# pytest
# ---------------------------------------------------------------------------
[tool.pytest.ini_options]
pythonpath = ["src"]
testpaths = ["tests"]
addopts = "-ra -q"
markers = [
"integration: marks tests as slow integration tests requiring real I/O",
"e2e: marks end-to-end tests that spin up the full stack",
]
# ---------------------------------------------------------------------------
# ruff — lint + format (replaces black, isort, flake8)
# ---------------------------------------------------------------------------
[tool.ruff]
line-length = 88
target-version = "py311"
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"UP", # pyupgrade
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"SIM", # flake8-simplify
]
ignore = [
"E501", # line length — handled by formatter
]
[tool.ruff.lint.isort]
known-first-party = ["mypackage"]
# ---------------------------------------------------------------------------
# mypy — static type checking
# ---------------------------------------------------------------------------
[tool.mypy]
python_version = "3.11"
strict = true
ignore_missing_imports = true
# If you add inline stubs later, remove the line above and add per-module overrides.
# ---------------------------------------------------------------------------
# coverage
# ---------------------------------------------------------------------------
[tool.coverage.run]
source = ["src"]
branch = true
[tool.coverage.report]
show_missing = true
fail_under = 0 # raise once you have a baseline