- Notifications
You must be signed in to change notification settings - Fork 6.6k
Access Display Names of enum fields via enum object #1738
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
Merged
Merged
Conversation
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
Requires updating google-cloud-language to 1.1.0
alixhami reviewed Oct 9, 2018
BUCKET = os.environ['CLOUD_STORAGE_BUCKET'] | ||
| ||
| ||
# Videos used for these tests can be found in the gs://demomaker/ public bucket |
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.
I'm going to send a PR to update these tests to explicitly use the demomaker bucket to save future contributor friction, so this comment will no longer be necessary. Please remove so we can avoid merge conflicts.
This reverts commit 39d9bff.
…ogleCloudPlatform/python-docs-samples into use-IntEnum-to-get-enum-display-names
alixhami approved these changes Oct 10, 2018
…ogleCloudPlatform/python-docs-samples into use-IntEnum-to-get-enum-display-names
busunkim96 pushed a commit to googleapis/python-texttospeech that referenced this pull request Apr 9, 2020
…loudPlatform/python-docs-samples#1738) * Get display name of enums using IntEnum Requires updating google-cloud-language to 1.1.0 * Add note about gs://demomaker for video test files * Get display name of enums using IntEnum * Get display name of enums using IntEnum * Revert "Add note about gs://demomaker for video test files" This reverts commit 39d9bfff03201f7c6dcb38fee3856dd537ab4b62.
busunkim96 pushed a commit to googleapis/python-texttospeech that referenced this pull request May 13, 2020
…loudPlatform/python-docs-samples#1738) * Get display name of enums using IntEnum Requires updating google-cloud-language to 1.1.0 * Add note about gs://demomaker for video test files * Get display name of enums using IntEnum * Get display name of enums using IntEnum * Revert "Add note about gs://demomaker for video test files" This reverts commit 39d9bfff03201f7c6dcb38fee3856dd537ab4b62.
busunkim96 pushed a commit to googleapis/python-texttospeech that referenced this pull request May 13, 2020
…loudPlatform/python-docs-samples#1738) * Get display name of enums using IntEnum Requires updating google-cloud-language to 1.1.0 * Add note about gs://demomaker for video test files * Get display name of enums using IntEnum * Get display name of enums using IntEnum * Revert "Add note about gs://demomaker for video test files" This reverts commit 39d9bfff03201f7c6dcb38fee3856dd537ab4b62.
busunkim96 pushed a commit to googleapis/python-texttospeech that referenced this pull request May 13, 2020
…loudPlatform/python-docs-samples#1738) * Get display name of enums using IntEnum Requires updating google-cloud-language to 1.1.0 * Add note about gs://demomaker for video test files * Get display name of enums using IntEnum * Get display name of enums using IntEnum * Revert "Add note about gs://demomaker for video test files" This reverts commit 39d9bfff03201f7c6dcb38fee3856dd537ab4b62.
busunkim96 pushed a commit to busunkim96/python-language that referenced this pull request May 20, 2020
…loudPlatform/python-docs-samples#1738) * Get display name of enums using IntEnum Requires updating google-cloud-language to 1.1.0 * Add note about gs://demomaker for video test files * Get display name of enums using IntEnum * Get display name of enums using IntEnum * Revert "Add note about gs://demomaker for video test files" This reverts commit 39d9bfff03201f7c6dcb38fee3856dd537ab4b62.
busunkim96 pushed a commit to busunkim96/python-videointelligence that referenced this pull request May 20, 2020
…loudPlatform/python-docs-samples#1738) * Get display name of enums using IntEnum Requires updating google-cloud-language to 1.1.0 * Add note about gs://demomaker for video test files * Get display name of enums using IntEnum * Get display name of enums using IntEnum * Revert "Add note about gs://demomaker for video test files" This reverts commit 39d9bfff03201f7c6dcb38fee3856dd537ab4b62.
busunkim96 pushed a commit to googleapis/python-texttospeech that referenced this pull request May 20, 2020
…loudPlatform/python-docs-samples#1738) * Get display name of enums using IntEnum Requires updating google-cloud-language to 1.1.0 * Add note about gs://demomaker for video test files * Get display name of enums using IntEnum * Get display name of enums using IntEnum * Revert "Add note about gs://demomaker for video test files" This reverts commit 39d9bfff03201f7c6dcb38fee3856dd537ab4b62.
busunkim96 pushed a commit to googleapis/python-texttospeech that referenced this pull request May 20, 2020
…loudPlatform/python-docs-samples#1738) * Get display name of enums using IntEnum Requires updating google-cloud-language to 1.1.0 * Add note about gs://demomaker for video test files * Get display name of enums using IntEnum * Get display name of enums using IntEnum * Revert "Add note about gs://demomaker for video test files" This reverts commit 39d9bfff03201f7c6dcb38fee3856dd537ab4b62.
hkdevandla pushed a commit to hkdevandla/python-language that referenced this pull request Sep 26, 2020
…loudPlatform/python-docs-samples#1738) * Get display name of enums using IntEnum Requires updating google-cloud-language to 1.1.0 * Add note about gs://demomaker for video test files * Get display name of enums using IntEnum * Get display name of enums using IntEnum * Revert "Add note about gs://demomaker for video test files" This reverts commit 39d9bfff03201f7c6dcb38fee3856dd537ab4b62.
busunkim96 pushed a commit to googleapis/python-language that referenced this pull request Sep 29, 2020
…loudPlatform/python-docs-samples#1738) * Get display name of enums using IntEnum Requires updating google-cloud-language to 1.1.0 * Add note about gs://demomaker for video test files * Get display name of enums using IntEnum * Get display name of enums using IntEnum * Revert "Add note about gs://demomaker for video test files" This reverts commit 39d9bfff03201f7c6dcb38fee3856dd537ab4b62.
danoscarmike pushed a commit to googleapis/python-videointelligence that referenced this pull request Sep 30, 2020
…loudPlatform/python-docs-samples#1738) * Get display name of enums using IntEnum Requires updating google-cloud-language to 1.1.0 * Add note about gs://demomaker for video test files * Get display name of enums using IntEnum * Get display name of enums using IntEnum * Revert "Add note about gs://demomaker for video test files" This reverts commit 39d9bfff03201f7c6dcb38fee3856dd537ab4b62.
8 tasks
msampathkumar pushed a commit that referenced this pull request Nov 10, 2022
* Get display name of enums using IntEnum Requires updating google-cloud-language to 1.1.0 * Add note about gs://demomaker for video test files * Get display name of enums using IntEnum * Get display name of enums using IntEnum * Revert "Add note about gs://demomaker for video test files" This reverts commit 39d9bff.
m-strzelczyk pushed a commit that referenced this pull request Nov 18, 2022
* Get display name of enums using IntEnum Requires updating google-cloud-language to 1.1.0 * Add note about gs://demomaker for video test files * Get display name of enums using IntEnum * Get display name of enums using IntEnum * Revert "Add note about gs://demomaker for video test files" This reverts commit 39d9bff.
8 tasks
parthea pushed a commit to googleapis/google-cloud-python that referenced this pull request Jul 6, 2023
…loudPlatform/python-docs-samples#1738) * Get display name of enums using IntEnum Requires updating google-cloud-language to 1.1.0 * Add note about gs://demomaker for video test files * Get display name of enums using IntEnum * Get display name of enums using IntEnum * Revert "Add note about gs://demomaker for video test files" This reverts commit 39d9bfff03201f7c6dcb38fee3856dd537ab4b62.
dizcology pushed a commit that referenced this pull request Sep 11, 2023
* Get display name of enums using IntEnum Requires updating google-cloud-language to 1.1.0 * Add note about gs://demomaker for video test files * Get display name of enums using IntEnum * Get display name of enums using IntEnum * Revert "Add note about gs://demomaker for video test files" This reverts commit 39d9bff.
9 tasks
leahecole pushed a commit that referenced this pull request Sep 15, 2023
* Get display name of enums using IntEnum Requires updating google-cloud-language to 1.1.0 * Add note about gs://demomaker for video test files * Get display name of enums using IntEnum * Get display name of enums using IntEnum * Revert "Add note about gs://demomaker for video test files" This reverts commit 39d9bff.
parthea pushed a commit to googleapis/google-cloud-python that referenced this pull request Sep 22, 2023
…loudPlatform/python-docs-samples#1738) * Get display name of enums using IntEnum Requires updating google-cloud-language to 1.1.0 * Add note about gs://demomaker for video test files * Get display name of enums using IntEnum * Get display name of enums using IntEnum * Revert "Add note about gs://demomaker for video test files" This reverts commit 39d9bfff03201f7c6dcb38fee3856dd537ab4b62.
parthea pushed a commit to googleapis/google-cloud-python that referenced this pull request Sep 22, 2023
…loudPlatform/python-docs-samples#1738) * Get display name of enums using IntEnum Requires updating google-cloud-language to 1.1.0 * Add note about gs://demomaker for video test files * Get display name of enums using IntEnum * Get display name of enums using IntEnum * Revert "Add note about gs://demomaker for video test files" This reverts commit 39d9bfff03201f7c6dcb38fee3856dd537ab4b62.
parthea pushed a commit to googleapis/google-cloud-python that referenced this pull request Sep 22, 2023
…loudPlatform/python-docs-samples#1738) * Get display name of enums using IntEnum Requires updating google-cloud-language to 1.1.0 * Add note about gs://demomaker for video test files * Get display name of enums using IntEnum * Get display name of enums using IntEnum * Revert "Add note about gs://demomaker for video test files" This reverts commit 39d9bfff03201f7c6dcb38fee3856dd537ab4b62.
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.
To get the display name of enum fields of protobuf objects, we had been copy/pasting the enum field names from the .proto into our code and using the int index of the enum field to get the display name
Updated various samples to get enum field display names the newer, improved way:
Related: googleapis/google-cloud-python#6169
Language library needed to be updated to make use of this feature. Worked out-of-the-box for Video Intelligence and Text-to-Speech