Skip to content

feat(google-backstory): new library google-backstory #17374

Merged
suztomo merged 5 commits into
googleapis:mainfrom
suztomo:onboard-new-library-2026-06-03-backstory
Jun 4, 2026
Merged

feat(google-backstory): new library google-backstory #17374
suztomo merged 5 commits into
googleapis:mainfrom
suztomo:onboard-new-library-2026-06-03-backstory

Conversation

@suztomo
Copy link
Copy Markdown
Member

@suztomo suztomo commented Jun 4, 2026

I manually edit librarian.yaml and librarian.state file and ran $ docker run -u $(id -u):$(id -g) -v .:/repo -v ~/.cache:/.cache -w /repo docker.io/library/librarian-python:${V} generate -v google-backstory.

I referenced the google-cloud-common declaration in librarian.yaml. At first, I hit 2026/06/04 14:33:45 librarian: generate library "google-backstory" (python): error creating metadata for google-backstory: default version must be specified for every library with generated APIs error but this was resolved by declaring default_version: apiVersion.

Unit Test Failure and Fix

The CI check failed because google-backstory is a type-only library and had no unit tests, causing pytest to exit with code 5 (no tests collected).

To fix this, I added:

  • test_packaging.py to verify namespace package compatibility.
  • test_backstory.py to verify that backstory types can be imported.

This follows the pattern of google-cloud-common which also has a dummy test to avoid empty test suite failures. I also updated librarian.yaml (keep) and .librarian/state.yaml (preserve_regex) to preserve these tests during regeneration.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces the new google-backstory Python client library, adding configuration files, documentation, and generated API types, as well as registering the package in the librarian configuration. The code review feedback highlights several critical issues and improvement opportunities: potential circular imports in collection.py and entity.py that should be resolved with relative imports; a bug in parse_version_to_tuple within __init__.py that incorrectly handles non-numeric version suffixes; a missing f-string prefix in a warning message; an unescaped dot in a version-parsing regular expression in setup.py; and overlapping dependency ranges in setup.py that would benefit from mutually exclusive environment markers.

Comment thread packages/google-backstory/google/backstory/types/collection.py
Comment thread packages/google-backstory/google/backstory/types/entity.py
Comment thread packages/google-backstory/google/backstory/__init__.py
Comment thread packages/google-backstory/google/backstory/__init__.py
Comment thread packages/google-backstory/setup.py
Comment thread packages/google-backstory/setup.py
@suztomo suztomo changed the title onboard new library 2026 06 03 backstory feat(google-backstory): new library google-backstory Jun 4, 2026
@suztomo suztomo marked this pull request as ready for review June 4, 2026 15:17
@suztomo suztomo requested review from a team as code owners June 4, 2026 15:17
@suztomo suztomo enabled auto-merge (squash) June 4, 2026 15:19
@suztomo suztomo merged commit 65f059e into googleapis:main Jun 4, 2026
32 checks passed
@suztomo suztomo deleted the onboard-new-library-2026-06-03-backstory branch June 4, 2026 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants