-
Notifications
You must be signed in to change notification settings - Fork 83
/
Copy pathpyproject.toml
179 lines (166 loc) · 6.43 KB
/
pyproject.toml
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
# TODO revert this file to hatchling using https://github.com/pydantic/platform/pull/264/commits/01e4d2258776f98284d019d5040eceeb5e9af42f
# when we move it to a new repo
[tool.poetry]
name = "logfire"
version = "0.26.0"
description = "Coming soon..."
authors = [
"Pydantic Team <[email protected]>",
"Samuel Colvin <[email protected]>",
"Hasan Ramezani <[email protected]>",
"Adrian Garcia Badaracco <[email protected]>",
"David Montague <[email protected]>",
"Marcelo Trylesinski <[email protected]>",
"David Hewitt <[email protected]>",
"Alex Hall <[email protected]>",
]
license = "MIT"
readme = "README.md"
[tool.poetry.dependencies]
python = ">=3.8"
opentelemetry-sdk = ">=1.21.0"
opentelemetry-exporter-otlp-proto-http = ">=1.21.0"
opentelemetry-instrumentation = ">=0.41b0"
rich = ">=13.4.2"
protobuf = ">=4.23.4"
typing-extensions = ">=4.0.0"
tomli = { version = ">=2.0.1", python = "<3.11" }
# Extras
anyio = { version = ">=4.2.0", optional = true }
httpx = { version = ">=0.22.0", optional = true }
pydantic = { version = ">=2.5.3", optional = true }
starlette = { version = ">=0.27.0", optional = true }
fastapi = { version = ">=0.68.0", optional = true }
django = { version = ">=3.2.0", optional = true }
Flask = { version = ">=3.0.0", optional = true }
dirty-equals = { version = ">=0.6.0", optional = true }
pytest = { version = ">=7.4.2", optional = true }
opentelemetry-instrumentation-aiohttp-client = { version = ">=0.42b0", optional = true }
opentelemetry-instrumentation-asgi = { version = ">=0.42b0", optional = true }
opentelemetry-instrumentation-wsgi = { version = ">=0.42b0", optional = true }
opentelemetry-instrumentation-celery = { version = ">=0.42b0", optional = true }
opentelemetry-instrumentation-django = { version = ">=0.42b0", optional = true }
opentelemetry-instrumentation-fastapi = { version = ">=0.42b0", optional = true }
opentelemetry-instrumentation-flask = { version = ">=0.42b0", optional = true }
opentelemetry-instrumentation-starlette = { version = ">=0.42b0", optional = true }
opentelemetry-instrumentation-httpx = { version = ">=0.42b0", optional = true }
opentelemetry-instrumentation-requests = { version = ">=0.42b0", optional = true }
opentelemetry-instrumentation-sqlalchemy = { version = ">=0.42b0", optional = true }
opentelemetry-instrumentation-pymongo = { version = ">=0.42b0", optional = true }
opentelemetry-instrumentation-psycopg2 = { version = ">=0.42b0", optional = true }
opentelemetry-instrumentation-redis = { version = ">=0.42b0", optional = true }
opentelemetry-instrumentation-system-metrics = { version = ">=0.42b0", optional = true }
requests = { version = ">=2.31.0", optional = true }
sqlalchemy = { version = ">=2.0.22", optional = true }
pandas = { version = "*", optional = true }
attrs = { version = ">=23.1.0", optional = true }
# gitpython is optionally used to get the current git commit hash without a subprocess call
gitpython = { version = ">=3.1.40", optional = true }
devtools = { version = "^0.12.2", optional = true }
requests-mock = { version = "*", optional = true }
inline-snapshot = { version = ">=0", optional = true }
eval-type-backport = { version = "^0.1.3", optional = true }
pytest-django = { version = "^4.8.0", optional = true }
openai = { version = ">=1.17.0", optional = true }
structlog = { version = ">=21.1.0", optional = true }
loguru = { version = "*", optional = true }
[tool.poetry.extras]
system-metrics = ["opentelemetry-instrumentation-system-metrics"]
aiohttp = ["opentelemetry-instrumentation-aiohttp-client"]
celery = ["opentelemetry-instrumentation-celery"]
django = ["opentelemetry-instrumentation-django"]
fastapi = ["opentelemetry-instrumentation-fastapi"]
flask = ["opentelemetry-instrumentation-flask"]
httpx = ["opentelemetry-instrumentation-httpx"]
starlette = ["opentelemetry-instrumentation-starlette"]
sqlalchemy = ["opentelemetry-instrumentation-sqlalchemy"]
psycopg2 = ["opentelemetry-instrumentation-psycopg2"]
pymongo = ["opentelemetry-instrumentation-pymongo"]
redis = ["opentelemetry-instrumentation-redis"]
requests = ["opentelemetry-instrumentation-requests"]
test = [
"anyio",
"httpx",
"starlette",
"fastapi",
"Flask",
"django",
"dirty-equals",
"pytest",
"pytest-django",
"pydantic",
"requests",
"sqlalchemy",
"pandas",
"attrs",
"openai",
"opentelemetry-instrumentation-aiohttp-client",
"opentelemetry-instrumentation-asgi",
"opentelemetry-instrumentation-wsgi",
"opentelemetry-instrumentation-fastapi",
"opentelemetry-instrumentation-starlette",
"opentelemetry-instrumentation-flask",
"opentelemetry-instrumentation-django",
"opentelemetry-instrumentation-httpx",
"opentelemetry-instrumentation-requests",
"opentelemetry-instrumentation-sqlalchemy",
"opentelemetry-instrumentation-system-metrics",
"gitpython",
"devtools",
"eval-type-backport",
"requests-mock",
"inline-snapshot",
"structlog",
"loguru",
]
lint = ["ruff"]
type-check = ["pyright"]
[tool.poetry.scripts]
logfire = "logfire.cli:main"
[tool.poetry.plugins."pydantic"]
logfire-plugin = "logfire.integrations.pydantic:plugin"
[tool.poetry.plugins."pytest11"]
logfire = "logfire.testing"
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
# https://beta.ruff.rs/docs/configuration/
[tool.ruff]
line-length = 120
[tool.ruff.lint]
extend-select = [
'Q',
'RUF100',
'C90',
'UP',
'I',
'D',
'DTZ005', # https://docs.astral.sh/ruff/rules/call-datetime-now-without-tzinfo/
] # add 'T' to disallow prints
flake8-quotes = { inline-quotes = 'single', multiline-quotes = 'double' }
isort = { combine-as-imports = true, known-first-party = ['logfire'] }
mccabe = { max-complexity = 14 }
ignore = [
'D107', # ignore missing docstring in __init__ methods
'D100', # ignore missing docstring in module
'D104', # ignore missing docstring in public package
'D105', # ignore missing docstring in magic methods
'C901', # ignore too complex functions, doesn't seem to be worth it
]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.per-file-ignores]
"tests/**/*.py" = ['D']
"docs/**/*.py" = ['D']
[tool.ruff.format]
docstring-code-format = true
quote-style = 'single'
[tool.pyright]
typeCheckingMode = 'strict'
reportUnnecessaryTypeIgnoreComment = true
reportMissingTypeStubs = false
exclude = [
'src/packages/logfire/docs/**/*.py',
'src/packages/logfire/site/**/*.py',
]
venvPath = '.venv'