feat(google-backstory): new library google-backstory #17374
Conversation
I manually edit librarian.yaml and state.yaml.
There was a problem hiding this comment.
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.
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 APIserror but this was resolved by declaringdefault_version: apiVersion.Unit Test Failure and Fix
The CI check failed because
google-backstoryis a type-only library and had no unit tests, causingpytestto exit with code 5 (no tests collected).To fix this, I added:
test_packaging.pyto verify namespace package compatibility.test_backstory.pyto verify that backstory types can be imported.This follows the pattern of
google-cloud-commonwhich also has a dummy test to avoid empty test suite failures. I also updatedlibrarian.yaml(keep) and.librarian/state.yaml(preserve_regex) to preserve these tests during regeneration.