-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs(samples): add samples for IN, NOT_IN, and != operators. #312
Conversation
Here is the summary of changes. You are about to add 4 region tags.
This comment is generated by snippet-bot.
|
Depends on #287 |
e3837f9
to
3bd844f
Compare
3bd844f
to
1fc08eb
Compare
Now that #287 merged, this is ready for review/merge, too. |
The project used for testing requires the indexes in samples/index.yaml. Can someone help me add that index to the testing project?
|
Ok looks like the samples tests are now running, and there are some errors. |
I saw errors like this one for the unit tests: details = "Datastore-Native databases do not support IN filters. Upgrade to Datastore-Mode to enable this." Looks like the testing project is on the legacy Cloud Datastore backend. The new query features are only available for Firestore in Datastore mode. I'm not sure how to resolve this without creating a new testing project. |
Looks like it's just python-docs-samples-tests that is on the legacy back-end. The build-specific projects look to be on Firestore in Datastore mode. Opting into those in the noxfile to use them for testing. The other projects will also require the new index: python-docs-samples-tests-py36 indexes:
|
Added a test fixture to set up the required index if it doesn't already exist. However, I'm now getting this error when attempting to create that index: "google.api_core.exceptions.PermissionDenied: 403 The caller does not have permission" Either I didn't set things up quite right or the service account doesn't have index creation permissions on the build-specific test projects. |
I removed the snippets that require an index for now. I'd like to submit the remaining snippets as that will allow me to update the documentation. I can figure out the other two snippets in a follow-up PR. I'm still failing two checks, but I'm not sure why. Any insights appreciated. Kokoro — Build failed error: nox > * docs: failed Kokoro Prerelease Dependencies error: ERROR collecting samples/snippets/snippets_test.py |
PR should be good to go and ready to merge. Thank you. |
if name in ("main", "_preamble", "defaultdict") or not callable(function): | ||
continue | ||
|
||
print(name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just wondering what is the purpose of the prints here?
One of the output is for the pprint
:
pprint
<google.cloud.datastore.client.Client object at 0x1096a7820>
None
Perhaps we don't need these prints?
The pre-release dependencies CI is not needed so it's good to merge. Thank you! |
docs: add samples for IN, NOT_IN, and != operators.
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
Fixes #311 🦕