Skip to content

Commit 4f5a910

Browse files
authored
fix(py): address releasekit check warnings for metadata and grouping (#4595)
Fixes #4594. ## Summary Resolves all 7 releasekit check warnings: | Warning | Fix | |---------|-----| | ungrouped_packages | Added `genkit-plugin-fastapi` to `community_plugins`, `web-fastapi-bugbot` to `samples`, created `internal_tools` group | | type_markers | Added `py.typed` to `genkit-plugin-fastapi` | | metadata_completeness | Added authors, license to `web-fastapi-bugbot` | | python_classifiers | Added Python 3.10-3.14 classifiers to `web-fastapi-bugbot` | | readme_field | Added `readme = "README.md"` to `web-fastapi-bugbot` | | changelog_url | Added Changelog URL to `genkit`, `genkit-plugin-fastapi`, `web-fastapi-bugbot` | | publish_classifier_consistency | Added `internal_tools` to `exclude_publish` | ## Verification ``` releasekit check → 18/19 passed (only lockfile_staleness before uv lock) ```
1 parent f3ff86f commit 4f5a910

File tree

8 files changed

+168
-106
lines changed

8 files changed

+168
-106
lines changed

py/plugins/cohere/src/genkit/plugins/cohere/converters.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
AssistantChatMessageV2,
4747
AssistantMessageResponse,
4848
SystemChatMessageV2,
49-
TextAssistantMessageV2ContentItem,
49+
TextAssistantMessageV2ContentOneItem,
5050
ToolCallV2,
5151
ToolCallV2Function,
5252
ToolChatMessageV2,
@@ -195,7 +195,7 @@ def convert_response(response: V2ChatResponse) -> GenerateResponse:
195195
msg: AssistantMessageResponse | None = response.message if response else None
196196
if msg and msg.content:
197197
for block in msg.content:
198-
if isinstance(block, TextAssistantMessageV2ContentItem) and block.text:
198+
if isinstance(block, TextAssistantMessageV2ContentOneItem) and block.text:
199199
content.append(Part(root=TextPart(text=block.text)))
200200

201201
# Handle tool calls in the response.

py/plugins/cohere/tests/cohere_models_test.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
from unittest.mock import AsyncMock, MagicMock
2626

2727
import pytest
28-
from cohere.types import TextAssistantMessageV2ContentItem
28+
from cohere.types import TextAssistantMessageV2ContentOneItem
2929
from cohere.v2.types.v2chat_stream_response import (
3030
ContentDeltaV2ChatStreamResponse,
3131
MessageEndV2ChatStreamResponse,
@@ -62,9 +62,9 @@ def _make_mock_response(
6262
mock.id = 'resp-1'
6363
mock.finish_reason = finish_reason
6464

65-
# Message content — must pass isinstance(TextAssistantMessageV2ContentItem)
65+
# Message content — must pass isinstance(TextAssistantMessageV2ContentOneItem)
6666
content_item = MagicMock()
67-
content_item.__class__ = TextAssistantMessageV2ContentItem
67+
content_item.__class__ = TextAssistantMessageV2ContentOneItem
6868
content_item.type = 'text'
6969
content_item.text = text
7070
mock.message.content = [content_item]

py/plugins/fastapi/pyproject.toml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,8 @@ classifiers = [
3434
"Typing :: Typed",
3535
"License :: OSI Approved :: Apache Software License",
3636
]
37-
dependencies = [
38-
"genkit",
39-
"pydantic>=2.10.5",
40-
"fastapi>=0.100.0",
41-
]
37+
dependencies = ["genkit", "pydantic>=2.10.5", "fastapi>=0.100.0"]
4238
description = "Genkit FastAPI Plugin"
43-
license = "Apache-2.0"
4439
keywords = [
4540
"genkit",
4641
"ai",
@@ -53,16 +48,18 @@ keywords = [
5348
"server",
5449
"async",
5550
]
51+
license = "Apache-2.0"
5652
name = "genkit-plugin-fastapi"
5753
readme = "README.md"
5854
requires-python = ">=3.10"
5955
version = "0.5.0"
6056

6157
[project.urls]
62-
"Bug Tracker" = "https://github.com/firebase/genkit/issues"
58+
"Bug Tracker" = "https://github.com/firebase/genkit/issues"
59+
"Changelog" = "https://github.com/firebase/genkit/blob/main/py/plugins/fastapi/CHANGELOG.md"
6360
"Documentation" = "https://firebase.google.com/docs/genkit"
64-
"Homepage" = "https://github.com/firebase/genkit"
65-
"Repository" = "https://github.com/firebase/genkit/tree/main/py"
61+
"Homepage" = "https://github.com/firebase/genkit"
62+
"Repository" = "https://github.com/firebase/genkit/tree/main/py"
6663

6764
[build-system]
6865
build-backend = "hatchling.build"

py/plugins/fastapi/src/genkit/plugins/fastapi/py.typed

Whitespace-only changes.

py/releasekit.toml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,11 @@ umbrella_tag = "v{version}"
2121

2222
# Packages listed here are discovered, checked, and version-bumped
2323
# but skipped during publish. Use "group:<name>" to reference a group.
24-
exclude_publish = ["group:samples", "group:unreleased_plugins"]
24+
exclude_publish = [
25+
"group:samples",
26+
"group:unreleased_plugins",
27+
"group:internal_tools",
28+
]
2529

2630
[groups]
2731
community_plugins = [
@@ -30,6 +34,7 @@ community_plugins = [
3034
"genkit-plugin-compat-oai",
3135
"genkit-plugin-dev-local-vectorstore",
3236
"genkit-plugin-evaluators",
37+
"genkit-plugin-fastapi",
3338
"genkit-plugin-flask",
3439
"genkit-plugin-mcp",
3540
"genkit-plugin-observability",
@@ -42,6 +47,7 @@ google_plugins = [
4247
"genkit-plugin-google-genai",
4348
"genkit-plugin-vertex-ai",
4449
]
50+
internal_tools = []
4551
samples = [
4652
"dev-local-vectorstore-hello",
4753
"framework-context-demo",
@@ -78,6 +84,7 @@ samples = [
7884
"provider-vertex-ai-vector-search-firestore",
7985
"provider-xai-hello",
8086
"web-endpoints-hello",
87+
"web-fastapi-bugbot",
8188
"web-flask-hello",
8289
"web-multi-server",
8390
"web-short-n-long",
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Changelog
2+
3+
All notable changes to the web-fastapi-bugbot sample will be documented
4+
in this file.
5+
6+
## 0.1.0
7+
8+
- Initial release.
Lines changed: 47 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,56 @@
1+
# Copyright 2025 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
#
15+
# SPDX-License-Identifier: Apache-2.0
16+
117
[project]
2-
name = "web-fastapi-bugbot"
3-
version = "0.1.0"
4-
description = "BugBot: AI Code Reviewer with Genkit + FastAPI"
5-
requires-python = ">=3.10"
18+
authors = [{ name = "Google" }]
19+
classifiers = [
20+
"Private :: Do Not Upload",
21+
"Development Status :: 3 - Alpha",
22+
"Intended Audience :: Developers",
23+
"Programming Language :: Python :: 3.10",
24+
"Programming Language :: Python :: 3.11",
25+
"Programming Language :: Python :: 3.12",
26+
"Programming Language :: Python :: 3.13",
27+
"Programming Language :: Python :: 3.14",
28+
]
629
dependencies = [
7-
"genkit",
8-
"genkit-plugin-fastapi",
9-
"genkit-plugin-google-genai",
10-
"python-dotenv>=1.0.0",
11-
"uvicorn[standard]>=0.34.0",
30+
"genkit",
31+
"genkit-plugin-fastapi",
32+
"genkit-plugin-google-genai",
33+
"python-dotenv>=1.0.0",
34+
"uvicorn[standard]>=0.34.0",
1235
]
36+
description = "BugBot: AI Code Reviewer with Genkit + FastAPI"
37+
license = "Apache-2.0"
38+
name = "web-fastapi-bugbot"
39+
readme = "README.md"
40+
requires-python = ">=3.10"
41+
version = "0.1.0"
1342

1443
[project.optional-dependencies]
1544
dev = ["watchdog>=6.0.0"]
1645

46+
[project.urls]
47+
"Bug Tracker" = "https://github.com/firebase/genkit/issues"
48+
"Changelog" = "https://github.com/firebase/genkit/blob/main/py/samples/web-fastapi-bugbot/CHANGELOG.md"
49+
"Documentation" = "https://firebase.google.com/docs/genkit"
50+
"Homepage" = "https://github.com/firebase/genkit"
51+
"Repository" = "https://github.com/firebase/genkit/tree/main/py"
52+
1753
[tool.uv.sources]
18-
genkit = { workspace = true }
19-
genkit-plugin-fastapi = { workspace = true }
54+
genkit = { workspace = true }
55+
genkit-plugin-fastapi = { workspace = true }
2056
genkit-plugin-google-genai = { workspace = true }

0 commit comments

Comments
 (0)