-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
93 lines (83 loc) · 2.26 KB
/
pyproject.toml
File metadata and controls
93 lines (83 loc) · 2.26 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
[project]
name = "fastapi-celery-postgres"
version = "0.1.0"
description = "FastAPI + Celery + PostgreSQL OpenTelemetry example"
authors = [
{name = "Irfan Shah",email = "irfns@protonmail.com"}
]
readme = "README.md"
requires-python = ">=3.13"
dependencies = [
"uvicorn[standard]>=0.41.0,<1.0.0",
"fastapi>=0.133.1,<1.0.0",
"celery>=5.6.0,<6.0.0",
"redis>=7.1.0,<8.0.0",
"psycopg2-binary>=2.9.11,<3.0.0",
"sqlalchemy>=2.0.47,<3.0.0",
"pydantic>=2.12.5,<3.0.0",
"python-dotenv>=1.2.1,<2.0.0",
"opentelemetry-distro>=0.61b0",
"opentelemetry-exporter-otlp>=1.40.0,<2.0.0",
"opentelemetry-instrumentation-celery>=0.61b0",
"opentelemetry-instrumentation-fastapi>=0.61b0",
"opentelemetry-instrumentation-sqlalchemy>=0.61b0",
"opentelemetry-instrumentation-redis>=0.61b0",
"opentelemetry-instrumentation-logging>=0.61b0",
]
[project.optional-dependencies]
dev = [
"pytest>=9.0,<10.0",
"pytest-cov>=7.0,<8.0",
"httpx>=0.28,<1.0",
"ruff>=0.9",
"mypy>=1.14",
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.ruff]
target-version = "py313"
line-length = 100
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
"ARG", # flake8-unused-arguments
"SIM", # flake8-simplify
]
ignore = [
"E501", # line too long (handled by formatter)
"B008", # function call in default argument (FastAPI Depends)
"ARG001", # unused function argument (FastAPI/Celery handlers)
"ARG002", # unused method argument (pytest fixtures)
]
[tool.ruff.lint.isort]
known-first-party = ["app"]
[tool.mypy]
python_version = "3.13"
warn_unused_configs = true
warn_redundant_casts = true
check_untyped_defs = true
show_error_codes = true
pretty = true
[[tool.mypy.overrides]]
module = [
"celery.*",
"redis.*",
"opentelemetry.*",
"sqlalchemy.*",
"environ.*",
]
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = ["app.telemetry.*", "app.config", "app.tasks"]
ignore_errors = true
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
addopts = "-v --tb=short"