-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Create Python,yml #13809
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
Create Python,yml #13809
Conversation
|
Here is the summary of possible violations 😱 DetailsThere are 2 possible violations for not having product prefix.
The end of the violation section. All the stuff below is FYI purposes only. Here is the summary of changes. You are about to add 2 region tags.
This comment is generated by snippet-bot.
|
Summary of ChangesHello @gniumg-source, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces a foundational document that standardizes the development and testing practices for Python samples. It aims to ensure consistency, readability, and maintainability across all Python contributions, providing clear guidelines for authors and reviewers alike. Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
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.
Code Review
This pull request adds a new authoring guide for Python samples. The guide is comprehensive and covers many important aspects of sample development. I've found a few issues in the code examples and commands that could be corrected to improve clarity and prevent errors for users. Also, the filename Python,yml seems unusual for a Markdown file; the comma is likely a typo and the extension should probably be .md.
| audio_config = texttospeech.AudioConfig( | ||
| audio_encoding=texttospeech.AudioEncoding.MP3 | ||
| ) |
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.
|
|
||
|
|
||
| def create_folder(bucket_name: str, folder_name: str) -> None: | ||
| print(f"Created folder: {response.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.
| [gsutil](https://cloud.google.com/storage/docs/gsutil). For example: | ||
|
|
||
| ```console | ||
| gsutil cp ./samples/snippets/resources/* gs://{$CLOUD_STORAGE_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.
|
|
||
| ```py | ||
| def adder(a: int, b: int) -> int: | ||
| return a+b |
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.
| from google.api_core.retry import Retry | ||
|
|
||
| @Retry() | ||
| def test_quickstart_v2() -> None: |
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.
| # We add timestamp for making the query faster. | ||
| now = datetime.datetime.now(datetime.timezone.utc) | ||
| filter_date = now - datetime.timedelta(minutes=1) | ||
| filters = ( | ||
| f"timestamp>=\"{filter_date.isoformat('T')}\" " | ||
| "resource.type=cloud_run_revision " | ||
| "AND severity=NOTICE " | ||
| ) |
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.
The indentation in this code block is incorrect and inconsistent. Also, the project variable used on line 728 is not defined. Please correct the indentation and clarify where project should come from.
# We add timestamp for making the query faster.
now = datetime.datetime.now(datetime.timezone.utc)
filter_date = now - datetime.timedelta(minutes=1)
filters = (
f"timestamp>=\"{filter_date.isoformat('T')}\" "
"resource.type=cloud_run_revision "
"AND severity=NOTICE "
)
| nox -s py-3.7 -- snippets_test.py | ||
| ``` | ||
|
|
||
| To run a specific test from a specific following: |
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.
|
Closing as spam, will block the user if there's any more. |
@beccasaurus #13808
@lukesneeringer #4745
@hfwang #13807
@inklesspen #13806
@jskeet Wwg
Description
Fixes #
Note: Before submitting a pull request, please open an issue for discussion if you are not associated with Google.
Checklist
nox -s py-3.9(see Test Environment Setup)nox -s lint(see Test Environment Setup)