-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
101 lines (90 loc) · 2.77 KB
/
pyproject.toml
File metadata and controls
101 lines (90 loc) · 2.77 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
96
97
98
99
100
101
[project]
name = "django-postgres-otel"
version = "1.0.0"
description = "Django REST API with OpenTelemetry instrumentation"
readme = "README.md"
requires-python = ">=3.14"
license = { text = "MIT" }
authors = [{ name = "base14", email = "[email protected]" }]
keywords = ["django", "opentelemetry", "observability", "rest-api"]
classifiers = [
"Development Status :: 4 - Beta",
"Environment :: Web Environment",
"Framework :: Django :: 5.2",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.14",
"Topic :: Internet :: WWW/HTTP :: HTTP Servers",
"Topic :: System :: Monitoring",
]
dependencies = [
"django>=5.2.11,<5.3",
"djangorestframework>=3.16.1,<4.0",
"psycopg[binary]>=3.3.3",
"dj-database-url>=3.0.1",
"celery>=5.6,<6.0",
"redis>=7.1.1,<8.0",
"PyJWT>=2.11,<3.0",
"python-dotenv>=1.2.1",
"gunicorn>=25.1",
"opentelemetry-sdk>=1.39.1",
"opentelemetry-exporter-otlp>=1.39.1",
"opentelemetry-instrumentation-django>=0.60b1",
"opentelemetry-instrumentation-psycopg>=0.60b1",
"opentelemetry-instrumentation-celery>=0.60b1",
"opentelemetry-instrumentation-redis>=0.60b1",
"opentelemetry-instrumentation-logging>=0.60b1",
]
[project.optional-dependencies]
dev = [
"pytest>=9.0.2",
"pytest-django>=4.11.1",
"pytest-cov>=7.0",
"ruff>=0.15.4",
"mypy>=1.19.1",
"django-stubs>=5.2.9",
"djangorestframework-stubs>=3.16.8",
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["apps", "config"]
[tool.ruff]
target-version = "py314"
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
"B904", # raise without from in except
"ARG001", # unused function argument (Django handlers, pytest fixtures)
"ARG002", # unused method argument (pytest fixtures as method params)
]
[tool.ruff.lint.isort]
known-first-party = ["apps", "config"]
[tool.mypy]
python_version = "3.14"
strict = true
plugins = ["mypy_django_plugin.main", "mypy_drf_plugin.main"]
[[tool.mypy.overrides]]
module = ["celery.*", "opentelemetry.*"]
ignore_missing_imports = true
[tool.django-stubs]
django_settings_module = "config.settings"
[tool.pytest.ini_options]
DJANGO_SETTINGS_MODULE = "config.settings"
python_files = ["test_*.py"]
addopts = "-v --tb=short"