Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: add types to DatasetReference constructor#1601

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

@kserruys
Copy link

@kserruyskserruys commentedJun 29, 2023
edited
Loading

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:

  • Make sure to open an issue as abug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes#1598 🦕

@product-auto-labelproduct-auto-labelbot added size: xsPull request size is extra small. api: bigqueryIssues related to the googleapis/python-bigquery API. labelsJun 29, 2023
@kserruyskserruys marked this pull request as ready for reviewJune 29, 2023 09:33
@kserruyskserruys requested review froma team ascode ownersJune 29, 2023 09:33
@kserruyskserruys requested a review fromjainsahabJune 29, 2023 09:33
@chalmerlowechalmerlowe added the kokoro:force-runAdd this label to force Kokoro to re-run the tests. labelJun 29, 2023
chalmerlowe
chalmerlowe previously approved these changesJun 29, 2023
Copy link
Collaborator

@chalmerlowechalmerlowe left a comment

Choose a reason for hiding this comment

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

LGTM

@yoshi-kokoroyoshi-kokoro removed the kokoro:force-runAdd this label to force Kokoro to re-run the tests. labelJun 29, 2023
@chalmerlowe
Copy link
Collaborator

Welp:

We appear to be faced with a mismatch. Doing a run of mypy against the code produces this error:

google/cloud/bigquery/dataset.py:187: error: Argument 1 to "DatasetReference" has incompatible type "Optional[str]"; expected "str"

Feel free to dig into this and see what produces that incompatible type on line 187 and what we might need to do to resolve this issue.

@chalmerlowechalmerlowe dismissed theirstale reviewJune 29, 2023 18:24

tests failed

@tswasttswast added the kokoro:force-runAdd this label to force Kokoro to re-run the tests. labelJun 30, 2023
@yoshi-kokoroyoshi-kokoro removed the kokoro:force-runAdd this label to force Kokoro to re-run the tests. labelJun 30, 2023
@product-auto-labelproduct-auto-labelbot added size: sPull request size is small. and removed size: xsPull request size is extra small. labelsJul 6, 2023
@chalmerlowechalmerlowe added the kokoro:force-runAdd this label to force Kokoro to re-run the tests. labelJul 13, 2023
@yoshi-kokoroyoshi-kokoro removed kokoro:force-runAdd this label to force Kokoro to re-run the tests. labelsJul 13, 2023
@chalmerlowe
Copy link
Collaborator

@kserruys let's run kokoro and see what kinda results we get from the tests.

@chalmerlowe
Copy link
Collaborator

@kserruys

The two types ofprerelease dependency test failures are a known issue that I need to tackle and we can safely ignore them in this case.

TheKokoro test failure relates to the overall test coverage.
It looks like enough has changed in that portion of code by adding a new conditional branch that the Python librarycoverage feels our tests are not comprehensive enough.

Are you comfortable diving into the test suite to see what needs to be added to the tests to provide coverage for the new conditional?

Comment on lines -180 to +182
eliflen(parts)>2:
else:
Copy link
Author

Choose a reason for hiding this comment

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

Hereelse: covers the same cases aselif len(parts) > 2:

Parameterdataset_id is a string, because of that listparts will always have at least 1 item.
By usingelse we can reassurepytest-cov that everything is ok.

@kserruys
Copy link
Author

@kserruys

The two types ofprerelease dependency test failures are a known issue that I need to tackle and we can safely ignore them in this case.

TheKokoro test failure relates to the overall test coverage. It looks like enough has changed in that portion of code by adding a new conditional branch that the Python librarycoverage feels our tests are not comprehensive enough.

Are you comfortable diving into the test suite to see what needs to be added to the tests to provide coverage for the new conditional?

@chalmerlowe

Sure :). I just took a while to find some time to do this.
Please have a look at the updated code. Coverage on my local machine return 100% now.

Regards

chalmerlowe reacted with eyes emoji

@meredithslotameredithslota added the kokoro:force-runAdd this label to force Kokoro to re-run the tests. labelSep 1, 2023
@yoshi-kokoroyoshi-kokoro removed the kokoro:force-runAdd this label to force Kokoro to re-run the tests. labelSep 1, 2023
@meredithslotameredithslota added the kokoro:force-runAdd this label to force Kokoro to re-run the tests. labelNov 8, 2023
@yoshi-kokoroyoshi-kokoro removed the kokoro:force-runAdd this label to force Kokoro to re-run the tests. labelNov 8, 2023
@tswasttswast added the kokoro:force-runAdd this label to force Kokoro to re-run the tests. labelApr 12, 2024
@yoshi-kokoroyoshi-kokoro removed the kokoro:force-runAdd this label to force Kokoro to re-run the tests. labelApr 12, 2024
@tswasttswastenabled auto-merge (squash)April 12, 2024 17:19
@tswasttswast added the kokoro:runAdd this label to force Kokoro to re-run the tests. labelApr 12, 2024
@yoshi-kokoroyoshi-kokoro removed the kokoro:runAdd this label to force Kokoro to re-run the tests. labelApr 12, 2024
@tswasttswast added the kokoro:force-runAdd this label to force Kokoro to re-run the tests. labelApr 12, 2024
@tswasttswast added kokoro:force-runAdd this label to force Kokoro to re-run the tests. and removed kokoro:force-runAdd this label to force Kokoro to re-run the tests. labelsApr 12, 2024
@yoshi-kokoroyoshi-kokoro removed the kokoro:force-runAdd this label to force Kokoro to re-run the tests. labelApr 12, 2024
@tswasttswast merged commitbf8861c intogoogleapis:mainApr 12, 2024
@tswast
Copy link
Contributor

Thanks@kserruys so much for the contribution and for your patience on this!

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@tswasttswasttswast approved these changes

@jainsahabjainsahabAwaiting requested review from jainsahabjainsahab was automatically assigned from googleapis/api-bigquery

@chalmerlowechalmerloweAwaiting requested review from chalmerlowe

Assignees

No one assigned

Labels

api: bigqueryIssues related to the googleapis/python-bigquery API.size: sPull request size is small.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Type annotations missing on bigqueryDatasetReference

6 participants

@kserruys@chalmerlowe@tswast@meredithslota@yoshi-kokoro@karelserruys-foodpairing

[8]ページ先頭

©2009-2025 Movatter.jp