-
Notifications
You must be signed in to change notification settings - Fork 260
Expand file tree
/
Copy pathpyproject.toml
More file actions
131 lines (118 loc) · 3.08 KB
/
pyproject.toml
File metadata and controls
131 lines (118 loc) · 3.08 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
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
[project]
name = "langfuse"
version = "4.2.0"
description = "A client library for accessing langfuse"
readme = "README.md"
authors = [{ name = "langfuse", email = "developers@langfuse.com" }]
license = "MIT"
license-files = ["LICENSE"]
requires-python = ">=3.10,<4.0"
dependencies = [
"httpx>=0.15.4,<1.0",
"pydantic>=2,<3",
"backoff>=1.10.0",
"wrapt>=1.14,<2",
"packaging>=23.2,<27.0",
"opentelemetry-api>=1.33.1,<2",
"opentelemetry-sdk>=1.33.1,<2",
"opentelemetry-exporter-otlp-proto-http>=1.33.1,<2",
]
[dependency-groups]
dev = [
"pytest>=7.4,<9.0",
"pytest-timeout>=2.1.0,<3",
"pytest-xdist>=3.3.1,<4",
"pre-commit>=3.2.2,<4",
"pytest-asyncio>=0.21.1,<1.2.0",
"pytest-httpserver>=1.0.8,<2",
"ruff>=0.15.2,<0.16",
"mypy>=1.0.0,<2",
"openai>=0.27.8",
"langchain-openai>=0.0.5,<0.4",
"langchain>=1,<2",
"langgraph>=1,<2",
"autoevals>=0.0.130,<0.1",
"opentelemetry-instrumentation-threading>=0.59b0,<1",
"tenacity>=9.1.4",
]
docs = [
"pdoc>=15.0.4,<16",
]
[build-system]
requires = ["uv_build>=0.11.2,<0.12.0"]
build-backend = "uv_build"
[tool.uv]
# Basic protection against supply chain attacks
exclude-newer = "7 days"
[tool.uv.build-backend]
module-root = ""
[tool.pytest.ini_options]
log_cli = true
markers = [
"unit: deterministic tests that run without a Langfuse server",
"e2e: tests that require a real Langfuse server or persisted backend behaviour",
"serial_e2e: e2e tests that must not share server concurrency with the rest of the suite",
"live_provider: tests that call live model providers and run as a dedicated CI suite",
]
[tool.mypy]
python_version = "3.12"
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true
disallow_untyped_decorators = true
no_implicit_optional = true
warn_redundant_casts = true
warn_unused_ignores = false
warn_no_return = true
warn_unreachable = true
strict_equality = true
show_error_codes = true
# Performance optimizations for CI
cache_dir = ".mypy_cache"
sqlite_cache = true
incremental = true
show_column_numbers = true
[[tool.mypy.overrides]]
module = [
"langchain.*",
"openai.*",
"chromadb.*",
"tiktoken.*",
"google.*",
"anthropic.*",
"cohere.*",
"dashscope.*",
"pymongo.*",
"bson.*",
"boto3.*",
"llama_index.*",
"respx.*",
"bs4.*",
"lark.*",
"huggingface_hub.*",
"backoff.*",
"wrapt.*",
"packaging.*",
"requests.*",
"opentelemetry.*"
]
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "langfuse.api.*"
disable_error_code = ["redundant-cast", "no-untyped-def"]
[tool.ruff]
target-version = "py310"
[tool.ruff.lint]
extend-select = [
"I", # Import formatting
# These used to be enabled in the "local ruff.toml",
# which was never enforced; hence, enabling these will
# cause a large number of linting errors.
# "D", # Docstring lints
# "D401", # Enforce imperative mood in docstrings
]
exclude = ["langfuse/api/**/*.py"]
[tool.ruff.lint.pydocstyle]
convention = "google"