Repository navigation
Conversation
Problem: review of the Spanner sample set asked for stricter tests and a single source of truth for dependencies. Those changes were applied to the open pull requests, but the search_and_ai and observability packages were already merged, so their scaffolding and first tests still used the old form: dependencies pinned in both pyproject.toml and requirements.txt, a README install step that skipped the package itself, client mocks without a spec, and live tests that did not say which environment variables they need. Solution: read dependencies from requirements.txt in both pyproject.toml files, update the README setup step to `pip install -e .`, patch the client class with autospec=True in vector_search_knn_test, and document the required environment variables above the live tests. No sample code changes.
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates the installation instructions in the README files for both spanner/observability and spanner/search_and_ai to use 'pip install -e .' instead of installing directly from requirements.txt. Correspondingly, the pyproject.toml files have been updated to dynamically load dependencies from requirements.txt. Additionally, unused variables were cleaned up in disable_builtin_metrics_test.py, and autospec=True was added to the Spanner client mocks in vector_search_knn_test.py along with an explanatory comment for live integration tests. I have no feedback to provide as there are no review comments.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Applies review feedback from the Spanner sample set to the two packages whose first samples are already merged (
spanner/search_and_aifrom #14836 andspanner/observabilityfrom #14857). The same changes were made on the open pull requests; these files had no open pull request to carry them.pyproject.toml(both packages): read dependencies fromrequirements.txtso the pins live in one place.README.md(both packages): the setup step now usespip install -e ..vector_search_knn_test.py: patch the client class withautospec=Trueand document the environment variables the live test needs.disable_builtin_metrics_test.py: remove an unused mock assignment.No sample code changes.
Checklist
black,flake8andmypyare clean on both packages