Skip to content
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

fix(speech): delete old region tag "imports" #4932

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

OremGLG
Copy link
Contributor

@OremGLG OremGLG commented Dec 30, 2024

Description

Delete old region tag "imports"

Fixes b/347826294

Note: Before submitting a pull request, please open an issue for discussion if you are not associated with Google.

Checklist

  • I have followed Contributing Guidelines from CONTRIBUTING.MD
  • Tests pass: go test -v ./.. (see Testing)
  • Code formatted: gofmt (see Formatting)
  • Vetting pass: go vet (see Formatting)
  • These samples need a new API enabled in testing projects to pass (let us know which ones)
  • These samples need a new/updated env vars in testing projects set to pass (let us know which ones)
  • This sample adds a new sample directory, and I updated the CODEOWNERS file with the codeowners for this sample
  • This sample adds a new Product API, and I updated the Blunderbuss issue/PR auto-assigner with the codeowners for this sample
  • Please merge this PR for me once it is approved

Copy link

@code-review-assist code-review-assist bot left a comment

Choose a reason for hiding this comment

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

Hi team,

I'm currently reviewing this pull request and will have a full review ready in a few minutes. In the meantime, here's a quick summary to get everyone up to speed:

This pull request, submitted by OremGLG, aims to clean up the golang-samples repository by deleting an outdated region tag, specifically "imports", from the speech/snippets/model_selection.go file. The intent is to remove redundant or obsolete code, improving code clarity and maintainability. The change is straightforward: lines 25-30 in speech/snippets/model_selection.go are removed. This removes the duplicated // [START imports] and // [END imports] tags.

The changes are limited to a single file:

  • speech/snippets/model_selection.go: Removal of the redundant "imports" region tag.

This is a small but important cleanup that improves the overall quality of the codebase. The PR addresses issue b/347826294.

And now, a little haiku to lighten the mood:

Old tags now removed,
Code cleaner, bright and new,
Review now complete.

Thanks,
Gemini

@product-auto-label product-auto-label bot added api: speech Issues related to the Speech-to-Text API. samples Issues that are directly related to samples. labels Dec 30, 2024
Copy link

Gemini encountered an error creating the review. You can try again by commenting @code-review-assist review.

@OremGLG OremGLG marked this pull request as ready for review December 30, 2024 17:24
@OremGLG OremGLG requested review from a team as code owners December 30, 2024 17:24
Copy link

@code-review-assist code-review-assist bot left a comment

Choose a reason for hiding this comment

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

Hi @OremGLG and reviewers,

I'm currently reviewing this pull request and will post my full review in a few minutes. In the meantime, here's a quick summary to get everyone up to speed:

This pull request addresses issue b/347826294 by removing an outdated region tag, imports, from the speech/snippets/model_selection.go file. The intent is to clean up the code and remove unnecessary or duplicate comments.

Specifically, the changes are:

  • File Changed: speech/snippets/model_selection.go
  • Change Summary: Lines 25-30 were modified. The old region tag // [START imports] and // [END imports] were deleted. This simplifies the import section of the file.

The changes are straightforward and improve code readability. I'll provide a more detailed review shortly.


A little haiku to lighten the mood:

Old tags now removed,
Code cleaner, bright and new,
Review now complete.

Copy link

snippet-bot bot commented Dec 30, 2024

Here is the summary of changes.

You are about to delete 1 region tag.

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

@OremGLG OremGLG enabled auto-merge (squash) December 30, 2024 17:32
Copy link

Gemini encountered an error creating the review. You can try again by commenting @code-review-assist review.

Copy link

@code-review-assist code-review-assist bot left a comment

Choose a reason for hiding this comment

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

Hi @OremGLG and reviewers,

I'm currently reviewing this pull request and will post my full review in a few minutes. In the meantime, here's a quick summary to help everyone get up to speed:

This pull request addresses issue b/347826294 by removing an outdated region tag, imports, from the speech/snippets/model_selection.go file. The change is straightforward: it simply deletes lines 25-30 in the file. The intent is to clean up the code and remove redundant or obsolete comments.

Here's a breakdown of the changes:

  • File Changed: speech/snippets/model_selection.go
  • Change Type: Deletion of outdated region tag imports (lines 25-30)
  • Impact: Improves code readability and removes unnecessary comments.

The changes are minimal and well-documented. I'll provide a more detailed review shortly.

And now, a little haiku to lighten the mood:

Old tags now removed,
Code cleaner, bright and new,
Review flows smoothly.

Copy link

@code-review-assist code-review-assist bot left a comment

Choose a reason for hiding this comment

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

This pull request removes the old region tag "imports", which is good. It also updates the checklist to reflect the changes made. However, the tests have not been run yet, so I recommend running them before merging this pull request. Additionally, the README.md file should be updated to reflect the removal of the "imports" region tag. I've studied the codebase to determine the appropriate style guide to use, and have elected to follow the Google Go Style Guide, since this project is under the GoogleCloudPlatform organization.

Comment on lines 24 to 28
// [START speech_transcribe_model_selection_imports]
// [START imports]
"context"

speech "cloud.google.com/go/speech/apiv1"
"cloud.google.com/go/speech/apiv1/speechpb"

Choose a reason for hiding this comment

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

medium

The import statements cloud.google.com/go/speech/apiv1 and cloud.google.com/go/speech/apiv1/speechpb should be grouped together, per the Google Go Style Guide. Can you group these together? Here's a snippet from the style guide:

Imports should be grouped in the following order:

  1. Standard library imports
  2. Third-party imports
  3. Local application/library specific imports

I'm also seeing a similar issue in speech/snippets/enhanced_model.go, so I'd recommend fixing that as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: speech Issues related to the Speech-to-Text API. samples Issues that are directly related to samples.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant