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

feat: add Prefixer class to generate and parse resource names#39

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
tseaver merged 5 commits intomasterfromissue10-resource-prefixes
Jul 7, 2021

Conversation

@tswast
Copy link
Contributor

This Prefixer class is intended to be created once per test file and/or test suite (such as in a conftest.py file). It can be used to generate standard resource names, which can easily identify which test suite created them. Also, since they contain the UTC date/time that the resource was created to facilitate cleanup fixtures.

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#10 🦕

@tswasttswast requested a review froma team as acode ownerJuly 2, 2021 21:48
@google-clagoogle-clabot added the cla: yesThis human has signed the Contributor License Agreement. labelJul 2, 2021
Co-authored-by: Tres Seaver <tseaver@palladion.com>
@google-cla
Copy link

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and then comment@googlebot I fixed it.. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️Googlers:Go here for more info.

@google-clagoogle-clabot added cla: noThis human has *not* signed the Contributor License Agreement. and removed cla: yesThis human has signed the Contributor License Agreement. labelsJul 7, 2021
Co-authored-by: Tres Seaver <tseaver@palladion.com>
@google-cla
Copy link

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and then comment@googlebot I fixed it.. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️Googlers:Go here for more info.

@tswasttswast added cla: yesThis human has signed the Contributor License Agreement. and removed cla: noThis human has *not* signed the Contributor License Agreement. labelsJul 7, 2021
@tswasttswast requested a review fromtseaverJuly 7, 2021 14:14
@google-cla
Copy link

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and then comment@googlebot I fixed it.. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️Googlers:Go here for more info.

@google-clagoogle-clabot added cla: noThis human has *not* signed the Contributor License Agreement. and removed cla: yesThis human has signed the Contributor License Agreement. labelsJul 7, 2021
@tswasttswast added cla: yesThis human has signed the Contributor License Agreement. and removed cla: noThis human has *not* signed the Contributor License Agreement. labelsJul 7, 2021
@tseavertseaver merged commit865480b intomasterJul 7, 2021
@tseavertseaver deleted the issue10-resource-prefixes branchJuly 7, 2021 17:46
Comment on lines +24 to +26
"""Fake datetime class since pytest can't monkeypatch attributes of
built-in/extension type.
"""

Choose a reason for hiding this comment

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

Would usingfreezegun represent a viable alternative?

True, it would be a new dependency, but it's widely used and maintained, and supports a wide range of features.

(the downside is that the more recent versions require Python 3.5+, but it could still be an option when Python 2.7 support is finally dropped in all libraries)

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Yeah, freezegun would have been the more robust choice. Indeed, I didn't want to introduce a new dependency just for this.

gcf-merge-on-greenbot pushed a commit to googleapis/python-bigquery that referenced this pull requestJul 16, 2021
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

2 more reviewers

@plamutplamutplamut left review comments

@tseavertseavertseaver approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

cla: yesThis human has signed the Contributor License Agreement.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

methods to create and parse standard resource prefixes withrepo_name,directory_path as parameters

3 participants

@tswast@tseaver@plamut

[8]ページ先頭

©2009-2025 Movatter.jp