-
Notifications
You must be signed in to change notification settings - Fork 688
Expand file tree
/
Copy pathpyproject.toml
More file actions
266 lines (245 loc) · 6.98 KB
/
pyproject.toml
File metadata and controls
266 lines (245 loc) · 6.98 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
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
261
262
263
264
265
266
# Copyright 2025 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
[project]
authors = [{ name = "Google" }]
dependencies = [
"dotpromptz==0.1.4",
"genkit",
"genkit-plugin-anthropic",
"genkit-plugin-compat-oai",
"genkit-plugin-deepseek",
"genkit-plugin-dev-local-vectorstore",
"genkit-plugin-evaluators",
"genkit-plugin-firebase",
"genkit-plugin-flask",
"genkit-plugin-google-cloud",
"genkit-plugin-google-genai",
"genkit-plugin-ollama",
"genkit-plugin-vertex-ai",
"genkit-plugin-xai",
"liccheck>=0.9.2",
"mcp>=1.25.0",
"strenum>=0.4.15; python_version < '3.11'",
]
description = "Workspace for Genkit packages"
license = "Apache-2.0"
name = "genkit-workspace"
readme = "README.md"
requires-python = ">=3.10"
version = "0.1.0"
[dependency-groups]
dev = [
"bpython>=0.25",
"ipython~=8.22; python_version <= '3.10'",
"ipython~=9.0.2; python_version >= '3.11'",
"jupyter>=1.1.1",
"pytest-asyncio>=0.25.3",
"pytest>=8.3.4",
"pytest-cov>=6.0.0",
"datamodel-code-generator>=0.27.3",
"pytest-watcher>=0.4.3",
"pytest-mock>=3.14.0",
"twine>=6.1.0",
"poethepoet>=0.33.1",
"pip>=25.0.1",
"tox>=4.25.0",
"tox-uv>=1.25.0",
"nox>=2025.2.9",
"nox-uv>=0.2.2",
]
lint = ["ty>=0.0.1", "ruff>=0.9"]
[tool.hatch.build.targets.wheel]
packages = []
[tool.setuptools]
py-modules = []
# Pytest for unit testing and coverage.
[tool.pytest]
[tool.pytest.ini_options]
addopts = [
"--cov",
#"--cov-report=", # Disable terminal report generation by pytest-cov
"-ra",
"-vv",
]
asyncio_default_fixture_loop_scope = "session"
python_files = ["test_*.py", "*_test.py"]
testpaths = ["packages", "plugins", "samples", "tests"]
#asyncio_mode = "auto"
asyncio_mode = "strict"
[tool.coverage.report]
fail_under = 78
[tool.coverage.run]
omit = [
"**/__init__.py", # Often contains just imports
"**/testing.py", # Test utilities
"**/constants.py", # Typically just constants
"**/typing.py", # Often auto-generated or complex types
"**/types.py", # Often auto-generated or complex types
]
source = ["packages", "plugins"]
# uv based package management.
[tool.uv]
default-groups = ["dev", "lint"]
[tool.uv.sources]
evaluator-demo = { workspace = true }
genkit = { workspace = true }
genkit-plugin-anthropic = { workspace = true }
genkit-plugin-compat-oai = { workspace = true }
genkit-plugin-deepseek = { workspace = true }
genkit-plugin-dev-local-vectorstore = { workspace = true }
genkit-plugin-evaluators = { workspace = true }
genkit-plugin-firebase = { workspace = true }
genkit-plugin-flask = { workspace = true }
genkit-plugin-google-cloud = { workspace = true }
genkit-plugin-google-genai = { workspace = true }
genkit-plugin-ollama = { workspace = true }
genkit-plugin-vertex-ai = { workspace = true }
genkit-plugin-xai = { workspace = true }
google-genai-hello = { workspace = true }
google-genai-image = { workspace = true }
prompt-demo = { workspace = true }
[tool.uv.workspace]
members = ["packages/*", "plugins/*", "samples/*"]
# Ruff checks and formatting.
[tool.ruff]
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".ipynb_checkpoints",
".mypy_cache",
".nox",
".pants.d",
".pyenv",
".pytest_cache",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
".vscode",
"__pypackages__",
"_build",
"bazel-*",
"buck-out",
"build",
"dist",
"node_modules",
"site-packages",
"venv",
]
indent-width = 4
line-length = 120
preview = true
target-version = "py311" # NOTE: Keep this at 3.11 not 3.10. We use backported libs for enums.
unsafe-fixes = true
[tool.ruff.lint]
fixable = ["ALL"]
select = [
"E", # pycodestyle (errors)
"W", # pycodestyle (warnings)
"F", # pyflakes
"I", # isort (import sorting)
"UP", # pyupgrade (Python version upgrades)
"B", # flake8-bugbear (common bugs)
"N", # pep8-naming (naming conventions)
"D", # pydocstyle
"F401", # unused imports
"F403", # wildcard imports
"F841", # unused variables
]
[tool.ruff.lint.isort]
combine-as-imports = true
force-single-line = false
known-first-party = ["genkit"]
section-order = [
"future",
"standard-library",
"third-party",
"first-party",
"local-folder",
]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.format]
docstring-code-format = true
docstring-code-line-length = 120
indent-style = "space"
line-ending = "lf"
quote-style = "single"
skip-magic-trailing-comma = false
[tool.datamodel-codegen]
#collapse-root-models = true # Don't use; produces Any as types.
#strict-types = ["str", "int", "float", "bool", "bytes"] # Don't use; produces StrictStr, StrictInt, etc.
#use-subclass-enum = true
capitalize-enum-members = true
disable-timestamp = true
enable-version-header = true
field-constraints = true
input = "../genkit-tools/genkit-schema.json"
input-file-type = "jsonschema"
output = "packages/genkit/src/genkit/core/typing.py"
output-model-type = "pydantic_v2.BaseModel"
snake-case-field = true
strict-nullable = true
target-python-version = "3.11"
use-default = false
use-schema-description = true
use-standard-collections = true
use-subclass-enum = true
use-union-operator = true
use-unique-items-as-set = true
[tool.liccheck]
authorized_licenses = [
"3-clause bsd",
"apache 2.0",
"apache software license",
"apache software",
"apache",
"apache-2.0",
"bsd license",
"bsd-3-clause",
"bsd",
"cmu license (mit-cmu)",
"isc license (iscl)",
"isc license",
"mit license",
"mit",
"mit-cmu",
"new bsd license",
"new bsd",
"psf-2.0",
"python software foundation license",
"simplified bsd",
"the unlicense (unlicense)", # TODO: verify.
]
dependencies = true
unauthorized_licenses = [
"gnu lgpl",
"gpl v3",
"lgpl with exceptions or zpl",
"zpl 2.1",
"mpl",
]
[tool.liccheck.authorized_packages]
aiohappyeyeballs = "2.6.1" # Python Software Foundation (transitive dep of xai-sdk)
aiohttp = "3.13.2" # Apache-2.0 AND MIT (transitive dep of xai-sdk)
certifi = "2025.4.26" # TODO: Verify.
dependencies = true
ollama = "0.5.1" # MIT "https://github.com/ollama/ollama-python/blob/main/LICENSE"