-
Notifications
You must be signed in to change notification settings - Fork 304
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: add support dataset.max_time_travel_hours #1683
Conversation
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
4241cc1
to
af2be4c
Compare
3fc636f
to
535c982
Compare
114955e
to
535c982
Compare
670de48
to
56f9dbe
Compare
@Linchin added units tests. |
google/cloud/bigquery/dataset.py
Outdated
@max_time_travel_hours.setter | ||
def max_time_travel_hours(self, hours): | ||
if not isinstance(hours, int): | ||
raise ValueError("Pass the int value") |
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.
nit: make the error message a little clearer such as saying f"max_time_travel_hours must be an integer. Got {hour}."
.
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.
@Linchin done and added a unit tests for that as well.
google/cloud/bigquery/dataset.py
Outdated
return cls(role, entity_type, entity_id) | ||
config = cls(role, entity_type, entity_id) | ||
config._properties = copy.deepcopy(resource) | ||
return config |
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.
Could you please explain why this change is necessary?
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.
@Linchin this function should not be changed. Thanks for catching it. I reverted it back.
Thank you @Gaurang033! |
Fixes #1637