Skip to content
This repository has been archived by the owner on Sep 5, 2023. It is now read-only.

docs(samples): add samples from docs & reorganize all samples for testing #78

Merged
merged 34 commits into from Aug 11, 2021

Conversation

steffnay
Copy link
Contributor

@steffnay steffnay commented Dec 1, 2020

  • Adds samples from cloud.google.com documentation.

  • Updates samples.

  • Adds tests.

  • Ensure the tests and linter pass

  • Code coverage does not decrease (if any source code was changed)

  • Appropriate docs were updated (if necessary)

🦕

@steffnay steffnay requested review from a team as code owners December 1, 2020 02:47
@steffnay steffnay requested a review from tmatsuo December 1, 2020 02:47
@product-auto-label product-auto-label bot added api: datacatalog Issues related to the googleapis/python-datacatalog API. samples Issues that are directly related to samples. labels Dec 1, 2020
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Dec 1, 2020
@snippet-bot
Copy link

snippet-bot bot commented Dec 1, 2020

Here is the summary of changes.

You are about to add 18 region tags.
You are about to delete 7 region tags.

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment

@tswast tswast self-requested a review December 1, 2020 17:19
samples/snippets/README.rst Outdated Show resolved Hide resolved
samples/snippets/conftest.py Outdated Show resolved Hide resolved
samples/snippets/conftest.py Outdated Show resolved Hide resolved
samples/snippets/conftest.py Outdated Show resolved Hide resolved
samples/snippets/create_custom_entry.py Outdated Show resolved Hide resolved
samples/snippets/create_fileset.py Outdated Show resolved Hide resolved
samples/snippets/create_fileset.py Outdated Show resolved Hide resolved
samples/snippets/grant_tag_template_user_role.py Outdated Show resolved Hide resolved
samples/snippets/lookup_entry.py Outdated Show resolved Hide resolved
samples/snippets/quickstart.py Outdated Show resolved Hide resolved
@steffnay steffnay changed the title docs(samples): add samples from documentation docs(samples): add samples from docs & reorganize all samples for testing Dec 5, 2020
samples/v1beta1/conftest.py Outdated Show resolved Hide resolved
samples/v1beta1/create_fileset_entry.py Outdated Show resolved Hide resolved
samples/v1beta1/get_entry.py Outdated Show resolved Hide resolved
samples/v1beta1/lookup_entry.py Outdated Show resolved Hide resolved
@steffnay steffnay added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Dec 21, 2020
@steffnay steffnay requested a review from tmatsuo February 2, 2021 19:11
@tmatsuo
Copy link
Contributor

tmatsuo commented Feb 22, 2021

@steffnay snippet-bot thinks this PR will delete a region tag which is currently used. This means it will break devsite. Can you try to fix it? Let me know if it's a false positive.

@steffnay
Copy link
Contributor Author

@tmatsuo I replaced the deleted tags. It now appears the bot doesn't recognize them as a valid prefix since they were created prior to that standard, I believe.

@tmatsuo
Copy link
Contributor

tmatsuo commented Jul 26, 2021

@steffnay It seems like the region tag prefix for Data Catalog is data_catalog. Can you change them to data_catalog?
If you can not change them, maybe you can add snippet-bot:no-prefix-req label for ignoring those violations.

  1. Add that label
  2. Then check the refresh checkbox in the snippet-bot comment

Copy link

@shollyman shollyman left a comment

Choose a reason for hiding this comment

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

The samples themselves look good, mostly my comments are my thinking about developer friction because this API has so many implicit dependencies between resources.

My other meta-comment is about the v1beta1 samples as a whole: can we simply remove them in favor of the GA endpoint?

samples/snippets/create_custom_entry.py Show resolved Hide resolved
samples/snippets/create_custom_entry.py Outdated Show resolved Hide resolved
samples/snippets/create_fileset.py Show resolved Hide resolved
samples/snippets/noxfile.py Show resolved Hide resolved
@steffnay steffnay requested a review from shollyman July 30, 2021 21:07
@steffnay
Copy link
Contributor Author

@shollyman I'd like to remove the v1beta1 samples, but I was thinking I will wait to do that until the documentation on c.g.c is updated.

@steffnay steffnay requested a review from leahecole August 3, 2021 17:43
samples/v1beta1/requirements.txt Outdated Show resolved Hide resolved
Copy link
Contributor

@leahecole leahecole left a comment

Choose a reason for hiding this comment

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

I added a couple of lil nits to the requirements and also wanted to check - these noxfiles aren't modified at all, correct? (if they are, your changes will be overwritten by owlbot at some point and you should add a noxfile_config to signal what's different from base noxfile)

samples/quickstart/requirements-test.txt Outdated Show resolved Hide resolved
samples/quickstart/requirements.txt Outdated Show resolved Hide resolved
@steffnay steffnay merged commit d34aca0 into googleapis:master Aug 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api: datacatalog Issues related to the googleapis/python-datacatalog API. cla: yes This human has signed the Contributor License Agreement. samples Issues that are directly related to samples.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants