-
Notifications
You must be signed in to change notification settings - Fork 67
/
pyproject.toml
260 lines (239 loc) · 8.59 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
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
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
[project]
name = "weave"
description = "A toolkit for building composable interactive data driven applications."
readme = "README.md"
license = { file = "LICENSE" }
maintainers = [{ name = "W&B", email = "[email protected]" }]
authors = [
{ name = "Shawn Lewis", email = "[email protected]" },
{ name = "Tim Sweeney", email = "[email protected]" },
{ name = "Nick Peneranda", email = "[email protected]" },
{ name = "Jeff Raubitschek", email = "[email protected]" },
{ name = "Jamie Rasmussen", email = "[email protected]" },
{ name = "Griffin Tarpenning", email = "[email protected]" },
{ name = "Josiah Lee", email = "[email protected]" },
{ name = "Andrew Truong", email = "[email protected]" },
]
classifiers = [
"Development Status :: 4 - Beta",
"Environment :: Web Environment",
"Framework :: Flask",
"Framework :: Jupyter",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Topic :: Database :: Front-Ends",
"Topic :: Office/Business :: Financial :: Spreadsheet",
"Topic :: Scientific/Engineering :: Information Analysis",
"Topic :: Scientific/Engineering :: Visualization",
"Topic :: Software Development :: Libraries :: Application Frameworks",
"Topic :: Software Development :: Widget Sets",
]
requires-python = ">=3.9"
dynamic = ["version"]
dependencies = [
"pydantic>=2.0.0",
"wandb>=0.17.1",
"packaging>=21.0", # For version parsing in integrations
"tenacity>=8.3.0,!=8.4.0", # Excluding 8.4.0 because it had a bug on import of AsyncRetrying
"emoji>=2.12.1", # For emoji shortcode support in Feedback
"uuid-utils>=0.9.0", # Used for ID generation - remove once python's built-in uuid supports UUIDv7
"numpy>1.21.0", # Used in box.py and scorer.py (should be made optional)
"rich", # Used for special formatting of tables (should be made optional)
"gql[aiohttp,requests]", # Used exclusively in wandb_api.py
"jsonschema>=4.23.0", # Used by scorers for field validation
]
[project.optional-dependencies]
docs = ["playwright", "lazydocs", "nbformat", "nbconvert"]
anthropic = ["anthropic>=0.18.0"]
cerebras = ["cerebras-cloud-sdk"]
cohere = ["cohere>=5.9.1,<5.9.3"]
dspy = ["dspy>=0.1.5", "litellm<=1.49.1"]
google_ai_studio = ["google-generativeai>=0.8.3"]
groq = ["groq>=0.13.0"]
instructor = [
"instructor>=1.4.3,<1.7.0; python_version <= '3.9'",
"instructor>=1.4.3; python_version > '3.9'",
]
langchain = [
"langchain-core>=0.2.1",
"langchain-openai>=0.1.7",
"langchain-community>=0.2.1",
"chromadb>=0.5.0",
"pysqlite3",
"opentelemetry-exporter-otlp",
]
litellm = ["litellm>=1.36.1"]
llamaindex = ["llama-index>=0.10.35"]
mistral0 = ["mistralai>=0.1.8,<1.0.0"]
mistral1 = ["mistralai>=1.0.0"]
scorers = ["Levenshtein>=0.26.0", "instructor>=1.5.2"]
scorers_tests = [
"instructor>=1.5.2",
"Levenshtein>=0.26.0",
"openai>=1.0.0",
"google-generativeai>=0.8.0",
"mistralai>=1.0.3",
"anthropic>=0.30.0",
]
notdiamond = ["notdiamond>=0.3.21", "litellm<=1.49.1"]
openai = ["openai>=1.0.0"]
pandas-test = ["pandas>=2.2.3"]
modal = ["modal", "python-dotenv"]
vertexai = ["vertexai>=1.70.0"]
test = [
"nox",
"pytest>=8.2.0",
"pytest-asyncio>=0.23.6",
"pytest-cov>=5.0.0",
"pytest-xdist>=3.1.0",
"pytest-rerunfailures>=12.0",
"pytest-rerunfailures>=14.0",
"clickhouse_connect==0.7.0",
"fastapi>=0.110.0",
"sqlparse==0.5.0",
# Integration Tests
"pytest-recording>=0.13.2",
"vcrpy>=6.0.1",
# serving tests
"flask",
"uvicorn>=0.27.0",
"pillow",
"filelock",
"httpx",
]
[project.scripts]
weave = "weave.trace.cli:cli"
[project.urls]
Company = "https://wandb.com"
Documentation = "https://docs.wandb.com/"
Changes = "https://github.com/wandb/weave/releases"
"Source Code" = "https://github.com/wandb/weave"
"Issue Tracker" = "https://github.com/wandb/weave/issues/"
Twitter = "https://twitter.com/weights_biases"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.version]
path = "weave/version.py"
[tool.hatch.build]
include = ["weave"]
exclude = [
"weave_query",
"weave-js",
"examples",
"tests",
"docs",
"dev_docs",
"weave/clear_cache.py",
]
[tool.pytest.ini_options]
filterwarnings = [
# treat warnings as errors
# "error",
# ignore deprecation warnings from installed packages, they're printed at the
# bottom of test output, making it hard to find the actual errors.
"ignore::DeprecationWarning",
]
addopts = "-v"
markers = [
"skip_clickhouse_client: marks tests as requiring clickhouse client to be skipped",
"weave_client: alias for `client` fixture used for CI dispatching. Do not use directly in code.",
"disable_logging_error_check: means that the test expects logging errors (and the default assertion for no logging errors will fail)",
]
[tool.ruff.lint]
preview = true
select = [
"D200", # https://docs.astral.sh/ruff/rules/fits-on-one-line/
"D201", # https://docs.astral.sh/ruff/rules/no-blank-line-before-function/
"D202", # https://docs.astral.sh/ruff/rules/no-blank-line-after-function/
"D204", # https://docs.astral.sh/ruff/rules/one-blank-line-after-class/
"D210", # https://docs.astral.sh/ruff/rules/surrounding-whitespace/
"D211", # https://docs.astral.sh/ruff/rules/blank-line-before-class/
"D214", # https://docs.astral.sh/ruff/rules/section-not-over-indented/
"FIX001", # https://beta.ruff.rs/docs/rules/#flake8-fixme-fix
"FIX003", # https://docs.astral.sh/ruff/rules/line-contains-xxx/
"F541", # https://docs.astral.sh/ruff/rules/f-string-missing-placeholders/
"I", # https://docs.astral.sh/ruff/rules/#isort-i
"W", # https://docs.astral.sh/ruff/rules/#warning-w
"F401", # https://docs.astral.sh/ruff/rules/unused-import/
"TID252", # https://docs.astral.sh/ruff/rules/relative-imports/#relative-imports-tid252
"UP", # https://docs.astral.sh/ruff/rules/#pyupgrade-up
"TRY002", # https://docs.astral.sh/ruff/rules/raise-vanilla-class/
"TRY004", # https://docs.astral.sh/ruff/rules/type-check-without-type-error/
"TRY300", # https://docs.astral.sh/ruff/rules/try-consider-else/
"TRY400", # https://docs.astral.sh/ruff/rules/error-instead-of-exception/
"C", # https://docs.astral.sh/ruff/rules/#convention-c
]
ignore = [
# we use Google style
"D203", # https://docs.astral.sh/ruff/rules/one-blank-line-before-class/
"D213", # https://docs.astral.sh/ruff/rules/multi-line-summary-second-line/
"D215", # https://docs.astral.sh/ruff/rules/section-underline-not-over-indented/
# This is a more involved change, so disabling for now.
"C901", # https://docs.astral.sh/ruff/rules/complex-structure/
]
exclude = ["weave_query"]
[tool.ruff.lint.isort]
known-third-party = ["wandb", "weave_query"]
[tool.ruff]
line-length = 88
show-fixes = true
exclude = ["weave_query"]
[tool.pyright]
include = ["weave"]
exclude = ["weave_query", "tests", "examples", "docs", "noxfile.py"]
# In cases where we support multiple versions of an integration, some imports can be missing
reportMissingImports = false
# TODO: Gradually remove as we improve our code!
reportAttributeAccessIssue = false
reportPossiblyUnboundVariable = false
reportOptionalMemberAccess = false
reportArgumentType = false
reportCallIssue = false
[tool.mypy]
warn_unused_configs = true
# Note: You have to update .pre-commit-config.yaml too!
exclude = [".*pyi$", "weave_query", "tests", "examples"]
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "weave.*"
disallow_untyped_defs = true
disallow_untyped_calls = true
[[tool.mypy.overrides]]
module = "weave_query.*"
ignore_errors = true
[tool.bumpversion]
current_version = "0.51.26-dev0"
parse = """(?x)
(?P<major>0|[1-9]\\d*)\\.
(?P<minor>0|[1-9]\\d*)\\.
(?P<patch>0|[1-9]\\d*)
(?:
- # dash separator for pre-release section
(?P<pre_l>[a-zA-Z-]+) # pre-release label
(?P<pre_n>0|[1-9]\\d*) # pre-release version number
)? # pre-release section is optional
"""
serialize = [
"{major}.{minor}.{patch}-{pre_l}{pre_n}",
"{major}.{minor}.{patch}",
]
search = "{current_version}"
replace = "{new_version}"
regex = false
ignore_missing_version = false
ignore_missing_files = false
tag = false
sign_tags = false
tag_name = "v{new_version}"
tag_message = "Release version: {current_version} → {new_version}"
allow_dirty = false
commit = false
message = "Release version: {current_version} → {new_version}"
commit_args = ""
[tool.bumpversion.parts.pre_l]
values = ["dev", "final"]
optional_value = "final"