Repository navigation
docs(genai-util): fix the docstring that breaks the docs build - #295
pylaterreur wants to merge 2 commits into
Conversation
alibaba#294 added extended_types to the API docs. Napoleon reads the first line of an attribute docstring written as "Name: text" as "type: description", so the "Streaming:" prefix of InvokeAgentInvocation.monotonic_first_token_s became a py:class reference to "Streaming". Nitpicky mode reports it and -W makes it an error, so the docs job fails on every pull request since alibaba#294. Reword the docstring. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GwUvhmzgfkiZ6vo4uGyesN
|
@sipercai @ralf0131 this fixes the 🤖 Generated with Claude Code |
google-genai 2.34.0 (2026-10-29) adds automatic continuation to interactions.create. The public create now merges the hops it sends, even a single one, into a copy of the interaction made with model_copy(update=...), for the interaction and for its usage. The tests return MagicMock interactions from the generated create, and MagicMock().model_copy() is a new mock without the configured fields, so test_instrumentation_does_not_break_core_functionality got a mock id. The instrumentation is unaffected: it wraps the generated create and reads each hop's response, as before. With real objects over a mocked HTTP API, a single-hop interaction gives the same object and span on 2.33.0 and 2.34.0, and an interaction continued over two hops gives one span per request. Mock the interaction and its usage as pydantic-like models whose model_copy keeps their fields. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GwUvhmzgfkiZ6vo4uGyesN
|
Thanks for the approval. Each of #295 and #296 failed on the other's problem (docs here, google-genai there), so neither could go green alone. I added #296's commit here and this PR's commit to #296 (same content). Merging either one makes the other's duplicate commit empty, so either order works. 🤖 Generated with Claude Code |
|
@ralf0131 all checks pass here now (278), and on #296. My push that added the other PR's commit dismissed your approvals; the content you approved is unchanged. Could you approve #295 and #296 again? Merging either one makes the other's duplicate commit empty, and 🤖 Generated with Claude Code |
Description
Since #294, the
docsjob fails on every pull request.sphinx-build -Wstops ondocstring of opentelemetry.util.genai.extended_types.InvokeAgentInvocation.monotonic_first_token_s:3: py:class reference target not found: Streaming. It failed on #294 itself as well. The job only runs on pull requests, somainshows green.#294 added
extended_typesto the API docs. Napoleon reads the first line of an attribute docstring written asName: textastype: description, so theStreaming:prefix became a reference to aStreamingclass, which nitpicky mode reports. This PR rewords the docstring.Type of change
How Has This Been Tested?
Full docs build,
sphinx-build -E -a -W --keep-going -b html -T . _build/html, with the docs env's packages on GitHub CPython 3.11:main: 2 warnings, theStreamingone andNo module named 'MySQLdb';MySQLdbone.The
MySQLdbwarning is local: mysqlclient can't be built without the MySQL client headers, which my machine lacks and CI has.tox -e precommitpasses.Does This PR Require a Core Repo Change?
Checklist:
🤖 Generated with Claude Code
https://claude.ai/code/session_01GwUvhmzgfkiZ6vo4uGyesN
🤖 Generated with Claude Code
https://claude.ai/code/session_01GwUvhmzgfkiZ6vo4uGyesN