-
Notifications
You must be signed in to change notification settings - Fork 309
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
feat: resource tags in dataset #2090
Merged
Linchin
merged 24 commits into
googleapis:main
from
keunsoopark:feat/resource_tags_in_dataset
Jan 14, 2025
+148
−2
Merged
Changes from 15 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
66e09af
feat: resource tags in dataset
keunsoopark 120abc8
fix: fix unittets
keunsoopark 3d03e73
Delete dataset/pyvenv.cfg
Linchin c56d005
Update google/cloud/bigquery/dataset.py
keunsoopark d26539f
Update google/cloud/bigquery/dataset.py
keunsoopark c647485
added system tests & fix unittest for none
keunsoopark 3d317d1
add missing assert
keunsoopark 359a9e1
remove venv
keunsoopark 32ce734
Merge branch 'main' into feat/resource_tags_in_dataset
Linchin ae83228
Merge branch 'main' into feat/resource_tags_in_dataset
Linchin a780412
Merge branch 'main' into feat/resource_tags_in_dataset
Linchin ddb3bf6
include resourcemanager in noxfile.py
keunsoopark d38e99a
Merge branch 'main' into feat/resource_tags_in_dataset
keunsoopark 14e3e47
fix fixture for tag keys
keunsoopark 8c48758
register tags before using in tests
keunsoopark 5a22c33
Merge branch 'main' into feat/resource_tags_in_dataset
keunsoopark 34e4857
Merge branch 'main' into feat/resource_tags_in_dataset
keunsoopark 7e75599
handle alreadyexist error
keunsoopark 6883dc2
Merge branch 'main' into feat/resource_tags_in_dataset
Linchin dd823a7
fix: tag keys & values creation & deletion
keunsoopark eb85e24
fix comment
keunsoopark 233f276
make tag keys unique
keunsoopark fed4570
remove unused import
keunsoopark 3fd848b
Merge branch 'main' into feat/resource_tags_in_dataset
Linchin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
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.
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.
Got inspired from this implementation. Just took out this method to be used in both dataset & test implementation.
Do you have any tips on how to run system test locally, @Linchin? There is some setup to the actual project required, but this explanation is too vague to follow.
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.
In general you can just use pytest to run system tests, it's slightly easier than nox, and should be able to run on any python version:
You can specify the test class or method too:
This should make it faster.
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 think you also need to run lint, that will need to use nox:
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.
Thanks I ran linting locally.
I still could not run system tests locally still. I think I need to specify
GOOGLE_APPLICATION_CREDENTIALS
env var (see here) anyway, but not sure what credentials I can use.I tried to use the credentials of a service account in my personal Google Cloud project, which has a
owner
role in this project, but I got allPERMISSION_DENIED
errors for dataset creation, table creation etc.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 think if you run pytest instead of nox, you don't have to have
GOOGLE_APPLICATION_CREDENTIALS
set up, because we are bypassingnoxfile.py
.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.
Ok I managed running system test locally. This is how:
install_dependencies.py
parsing all dependencies in specifiednoxfile.py
, to install dependencies in my local pip.google-cloud-testutils
was not installed in this manner, as specified here, so install this one manually.gcloud auth
to my personal GCP project