GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat: refactor AccessEntry to use _properties pattern by steffnay · Pull Request #1125 · googleapis/python-bigquery

This repository was archived by the owner on Mar 6, 2026. It is now read-only.

Conversation

@steffnay

@steffnay steffnay commented Jan 31, 2022 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes #1077 🦕

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
steffnay added 3 commits January 28, 2022 09:16
@steffnay
add view, dataset, routine properties
42a4b98
@steffnay
add properties and unit tests
80c22ec
@steffnay
lint
2f2a8cd
@product-auto-label product-auto-label Bot added the api: bigquery Issues related to the googleapis/python-bigquery API. label Jan 31, 2022
steffnay added 3 commits February 5, 2022 12:06
@steffnay
add properties and tests
a8840ab
@steffnay
merge
437165f
@steffnay
remove unused imports
4e37ddf
@steffnay
steffnay marked this pull request as ready for review February 5, 2022 21:21
@steffnay
steffnay requested review from a team and stephaniewang526 February 5, 2022 21:21
@steffnay
update test
6e2a7bc
@steffnay
steffnay requested review from tswast and removed request for stephaniewang526 February 5, 2022 21:55
steffnay added 5 commits February 5, 2022 14:53
@steffnay
add tests
38b1692
@steffnay
add tests
4b99d78
@steffnay
add tests
7eff546
@steffnay
add more tests
d81076d
@steffnay
update return type
ee1427b
tswast
tswast suggested changes Feb 11, 2022
View reviewed changes

@tswast tswast left a comment

Copy link
Copy Markdown
Contributor

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.

Looking pretty good! I made a few suggestions to use get(...), _get_sub_prop, and _set_sub_prop.

I think we'll need some more unit tests that exercise getting the various properties when they aren't set. Make sure they get None (or whatever the desired default is) instead of raising a KeyError.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread google/cloud/bigquery/dataset.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread google/cloud/bigquery/dataset.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread google/cloud/bigquery/dataset.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread google/cloud/bigquery/dataset.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread google/cloud/bigquery/dataset.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread google/cloud/bigquery/dataset.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread google/cloud/bigquery/dataset.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread google/cloud/bigquery/dataset.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

steffnay and others added 7 commits February 15, 2022 23:16
@steffnay
Merge branch 'main' of github.com:googleapis/python-bigquery into acc…
9f955c0
…ess-entry-refactor
@steffnay @tswast
Update google/cloud/bigquery/dataset.py
7f68e89
Co-authored-by: Tim Swast <[email protected]>
@steffnay @tswast
Update google/cloud/bigquery/dataset.py
ec6dc26
Co-authored-by: Tim Swast <[email protected]>
@steffnay @tswast
Update google/cloud/bigquery/dataset.py
d797026
Co-authored-by: Tim Swast <[email protected]>
@steffnay
refactor to use get() and remove self._entity_id
296d764
@steffnay
add unit tests for property none values
f73411e
@steffnay
delete unnecessary file
fcd4561
@steffnay
steffnay requested a review from tswast February 16, 2022 16:35
tswast
tswast suggested changes Feb 16, 2022
View reviewed changes

@tswast tswast left a comment

Copy link
Copy Markdown
Contributor

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.

Much better! A few small things

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread google/cloud/bigquery/dataset.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread google/cloud/bigquery/dataset.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread google/cloud/bigquery/dataset.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@steffnay @tswast
Update google/cloud/bigquery/dataset.py
b11e914
Co-authored-by: Tim Swast <[email protected]>
steffnay and others added 3 commits March 14, 2022 17:04
@steffnay
Merge branch 'main' into access-entry-refactor
cfc55b8
@steffnay
Merge branch 'main' into access-entry-refactor
a7600b3
@steffnay
add table test
2536597
@steffnay
steffnay requested a review from tswast March 18, 2022 20:12
@tswast
Merge branch 'main' into access-entry-refactor
0e8c08c
tswast
tswast suggested changes Mar 22, 2022
View reviewed changes

@tswast tswast left a comment

Copy link
Copy Markdown
Contributor

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.

Sweet! I think the behavior is right now. Just a nit re: what we're storing in _properties. I'd like us to stay consistent with the other resource classes.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread google/cloud/bigquery/dataset.py Outdated
def dataset(self) -> Optional[DatasetReference]:
"""API resource representation of a dataset reference."""
return typing.cast(
Optional[DatasetReference],

@tswast tswast Mar 22, 2022

Copy link
Copy Markdown
Contributor

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'd actually like to see _properties store the REST API version and the property getter call from_api_repr. Same for the other properties.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
steffnay and others added 6 commits March 22, 2022 15:08
@steffnay
Merge branch 'main' of github.com:googleapis/python-bigquery into acc…
018fa49
…ess-entry-refactor
@steffnay
Merge branch 'access-entry-refactor' of github.com:steffnay/python-bi…
d85463f
…gquery into access-entry-refactor
@steffnay
update to use api_repr
01f3734
@steffnay
Merge branch 'main' into access-entry-refactor
cd36b8c
@steffnay
Merge branch 'main' into access-entry-refactor
9912f79
@steffnay
lint
9c367c9
@steffnay
steffnay requested a review from tswast March 29, 2022 17:52
tswast
tswast reviewed Mar 30, 2022
View reviewed changes
Comment thread google/cloud/bigquery/dataset.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

tswast
tswast approved these changes Mar 30, 2022
View reviewed changes

@tswast tswast left a comment

Copy link
Copy Markdown
Contributor

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.

Looking really good! I'll approve, but there are a few edge cases you'll want to handle before merging.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread google/cloud/bigquery/dataset.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread google/cloud/bigquery/dataset.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread google/cloud/bigquery/dataset.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@steffnay
Merge branch 'main' into access-entry-refactor
a10b98f
@product-auto-label product-auto-label Bot added the size: l Pull request size is large. label Apr 7, 2022
steffnay and others added 8 commits April 6, 2022 21:52
@steffnay @tswast
Update google/cloud/bigquery/dataset.py
d9b5203
Co-authored-by: Tim Swast <[email protected]>
@steffnay @tswast
Update google/cloud/bigquery/dataset.py
0e3b391
Co-authored-by: Tim Swast <[email protected]>
@steffnay @tswast
Update google/cloud/bigquery/dataset.py
2fa34ae
Co-authored-by: Tim Swast <[email protected]>
@steffnay
Merge branch 'main' into access-entry-refactor
87645db
@steffnay
merge
32aaf4b
@steffnay
Merge branch 'access-entry-refactor' of github.com:steffnay/python-bi…
fd36be1
…gquery into access-entry-refactor
@steffnay
update tests
84a4f79
@steffnay
remove repeat type import
9885354
@steffnay
steffnay merged commit acd5612 into googleapis:main Apr 8, 2022
@release-please release-please Bot mentioned this pull request Apr 8, 2022
chore(main): release 3.1.0 #1207
Merged
@steffnay
steffnay deleted the access-entry-refactor branch April 8, 2022 19:52
waltaskew pushed a commit to waltaskew/python-bigquery that referenced this pull request Jul 20, 2022
@steffnay @tswast @waltaskew
feat: refactor AccessEntry to use _properties pattern (googleapis#1125)
1aadeea
* add view, dataset, routine properties

* add properties and unit tests

* lint

* add properties and tests

* remove unused imports

* update test

* add tests

* add tests

* add tests

* add more tests

* update return type

* Update google/cloud/bigquery/dataset.py

Co-authored-by: Tim Swast <[email protected]>

* Update google/cloud/bigquery/dataset.py

Co-authored-by: Tim Swast <[email protected]>

* Update google/cloud/bigquery/dataset.py

Co-authored-by: Tim Swast <[email protected]>

* refactor to use get() and remove self._entity_id

* delete unnecessary file

* Update google/cloud/bigquery/dataset.py

Co-authored-by: Tim Swast <[email protected]>

* Update google/cloud/bigquery/dataset.py

Co-authored-by: Tim Swast <[email protected]>

* Update google/cloud/bigquery/dataset.py

Co-authored-by: Tim Swast <[email protected]>

* add types, remove unnecessary checks

* fix types

* types

* add type casting

* refactor AccessEntry repr

* update to return DatasetReference

* update to use RoutineRef and TableRef

* add table test

* update to use api_repr

* lint

* Update google/cloud/bigquery/dataset.py

Co-authored-by: Tim Swast <[email protected]>

* Update google/cloud/bigquery/dataset.py

Co-authored-by: Tim Swast <[email protected]>

* Update google/cloud/bigquery/dataset.py

Co-authored-by: Tim Swast <[email protected]>

* update tests

* remove repeat type import

Co-authored-by: Tim Swast <[email protected]>
abdelmegahedgoogle pushed a commit to abdelmegahedgoogle/python-bigquery that referenced this pull request Apr 17, 2023
@steffnay @tswast @abdelmegahedgoogle
feat: refactor AccessEntry to use _properties pattern (googleapis#1125)
c0b1bb4
* add view, dataset, routine properties

* add properties and unit tests

* lint

* add properties and tests

* remove unused imports

* update test

* add tests

* add tests

* add tests

* add more tests

* update return type

* Update google/cloud/bigquery/dataset.py

Co-authored-by: Tim Swast <[email protected]>

* Update google/cloud/bigquery/dataset.py

Co-authored-by: Tim Swast <[email protected]>

* Update google/cloud/bigquery/dataset.py

Co-authored-by: Tim Swast <[email protected]>

* refactor to use get() and remove self._entity_id

* delete unnecessary file

* Update google/cloud/bigquery/dataset.py

Co-authored-by: Tim Swast <[email protected]>

* Update google/cloud/bigquery/dataset.py

Co-authored-by: Tim Swast <[email protected]>

* Update google/cloud/bigquery/dataset.py

Co-authored-by: Tim Swast <[email protected]>

* add types, remove unnecessary checks

* fix types

* types

* add type casting

* refactor AccessEntry repr

* update to return DatasetReference

* update to use RoutineRef and TableRef

* add table test

* update to use api_repr

* lint

* Update google/cloud/bigquery/dataset.py

Co-authored-by: Tim Swast <[email protected]>

* Update google/cloud/bigquery/dataset.py

Co-authored-by: Tim Swast <[email protected]>

* Update google/cloud/bigquery/dataset.py

Co-authored-by: Tim Swast <[email protected]>

* update tests

* remove repeat type import

Co-authored-by: Tim Swast <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

1 more reviewer
@tswast tswast tswast approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

api: bigquery Issues related to the googleapis/python-bigquery API. size: l Pull request size is large.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

refactor AccessEntry to use _properties pattern

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@steffnay @tswast
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.