-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathpyproject.toml
More file actions
215 lines (187 loc) · 4.86 KB
/
pyproject.toml
File metadata and controls
215 lines (187 loc) · 4.86 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
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
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
# This section defines the build system using Hatchling
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "basalt_sdk"
dynamic = ["version"]
description = "Basalt SDK for python"
readme = "README.md" # Replaces long_description
license = "MIT"
keywords = ["basalt", "ai", "sdk", "python"]
authors = [
{ name = "Basalt", email = "support@getbasalt.ai" },
]
requires-python = ">=3.10"
classifiers = [
"Programming Language :: Python :: 3",
"Operating System :: OS Independent",
]
dependencies = [
"jinja2>=3.1.6",
"opentelemetry-instrumentation~=0.59b0",
"opentelemetry-instrumentation-httpx~=0.59b0",
"opentelemetry-semantic-conventions~=0.59b0",
"opentelemetry-api~=1.39.1",
"opentelemetry-sdk~=1.39.1",
"opentelemetry-exporter-otlp~=1.39.1",
"wrapt~=1.17.3",
"httpx>=0.28.1",
"typing_extensions>=4.10.0",
]
# This section lists URLs, replacing the `url` parameter
[project.urls]
Homepage = "https://github.com/basalt-ai/basalt-python"
# This replaces dev-requirements.txt
[project.optional-dependencies]
# LLM Provider Instrumentations
openai = [
"opentelemetry-instrumentation-openai~=0.52.1",
]
anthropic = [
"opentelemetry-instrumentation-anthropic~=0.52.1",
]
google-generativeai = [
"opentelemetry-instrumentation-google-generativeai~=0.52.1",
]
# google-genai = [
# "opentelemetry-instrumentation-google-genai~=0.5b0",
# ]
bedrock = [
"opentelemetry-instrumentation-bedrock~=0.52.1",
]
vertex-ai = [
"opentelemetry-instrumentation-vertexai~=0.52.1",
]
mistralai = [
"opentelemetry-instrumentation-mistralai~=0.52.1",
]
ollama = [
"opentelemetry-instrumentation-ollama~=0.52.1",
]
# Vector Database Instrumentations
chromadb = [
"opentelemetry-instrumentation-chromadb~=0.52.1",
]
pinecone = [
"opentelemetry-instrumentation-pinecone~=0.52.1",
]
qdrant = [
"opentelemetry-instrumentation-qdrant~=0.52.1",
]
# Framework Instrumentations
langchain = [
"opentelemetry-instrumentation-langchain~=0.52.1",
]
llamaindex = [
"opentelemetry-instrumentation-llamaindex~=0.52.1",
]
# Mising Framework Instrumentation
# langgraph, litellm
# Convenience groups
llm-all = [
"basalt_sdk[openai,anthropic,google-generativeai,bedrock,vertex-ai,mistralai,ollama]",
]
vector-all = [
"basalt_sdk[chromadb,pinecone,qdrant]",
]
framework-all = [
"basalt_sdk[langchain,llamaindex]",
]
all = [
"basalt_sdk[llm-all,vector-all,framework-all]",
]
# Development dependencies
dev = [
# Build tools
"setuptools>=65.0.0",
"wheel>=0.40.0",
"twine>=5.0.0",
# Code quality tools
"black>=26.1.0",
"ruff>=0.14.0",
"mypy>=1.8.0",
# Test dependencies
"pytest>=9.0.0",
"pytest-cov>=4.0.0",
"pytest-asyncio>=0.23.0",
"parameterized>=0.8.0",
"requests>=2.31.0",
"coverage>=7.0.0",
# For testing integrations
"anthropic",
"openai",
"mistralai",
"google-genai",
]
# Pytest configuration
# A recommended configuration for Ruff, the modern linter/formatter
[tool.ruff]
line-length = 160
target-version = "py312"
# Enable lint + format in one tool
lint.select = ["E", "F", "I", "B", "UP", "ANN"]
lint.ignore = ["ANN101", "ANN102"] # example: ignore self/cls annotations
lint.fixable = ["ALL"]
lint.unfixable = []
[tool.ruff.lint.isort]
known-first-party = ["basalt"]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
line-ending = "lf"
docstring-code-format = true
# Hatch configuration
[tool.hatch.version]
path = "basalt/_version.py"
[tool.hatch.build.targets.wheel]
packages = ["basalt"]
[tool.hatch.build.targets.sdist]
include = [
"/basalt",
"/tests",
"/docs",
"/README.md",
"/pyproject.toml",
]
# Hatch environments for development and testing
[tool.hatch.envs.default]
dependencies = [
"pytest>=9.0.2",
"pytest-cov>=4.1.0",
"pytest-asyncio>=0.23.0",
"anyio>=4.12.1",
"ruff>=0.14.13",
"mypy>=1.8.0",
]
[tool.hatch.envs.default.scripts]
test = "pytest tests/ --cov=basalt --cov-report=term --cov-report=xml"
test-verbose = "pytest tests/ -v --cov=basalt --cov-report=term --cov-report=xml"
lint = "ruff check ."
lint-fix = "ruff check --fix ."
fmt = "ruff format ."
fmt-check = "ruff format --check ."
typecheck = "mypy basalt tests"
all = [
"fmt",
"lint-fix",
"typecheck",
"test",
]
# Matrix environments for testing across Python versions
[tool.hatch.envs.test]
dependencies = [
"pytest>=8.0.0",
"pytest-cov>=4.1.0",
"pytest-asyncio>=0.23.0",
"anyio>=4.0.0",
]
[[tool.hatch.envs.test.matrix]]
python = ["3.10", "3.11", "3.12", "3.13", "3.14"]
[tool.hatch.envs.test.scripts]
run = "pytest tests/ --cov=basalt --cov-report=term"
# Environment with all optional dependencies for comprehensive testing
[tool.hatch.envs.full]
features = ["all", "dev"]
[tool.hatch.envs.full.scripts]
test = "pytest tests/ --cov=basalt --cov-report=term --cov-report=xml"