-
Notifications
You must be signed in to change notification settings - Fork 313
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: Adds ForeignTypeInfo class and tests #2110
Conversation
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.
One nit, otherwise looking good. Thanks!
class ForeignTypeInfo: | ||
"""Metadata about the foreign data type definition such as the system in which the | ||
type is defined. | ||
Args: |
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: needs a blank line to separate the sections
Args: | |
Args: |
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.
Resolved.
|
||
def to_api_repr(self) -> dict: | ||
"""Build an API representation of this object. | ||
Returns: |
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.
Returns: | |
Returns: |
similar to https://github.com/googleapis/python-bigquery/pull/2110/files#r1914849397
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.
Resolved.
def from_api_repr(cls, api_repr: Dict[str, Any]) -> "ForeignTypeInfo": | ||
"""Factory: constructs an instance of the class (cls) | ||
given its API representation. | ||
Args: |
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.
Args: | |
Args: |
same as https://github.com/googleapis/python-bigquery/pull/2110/files#r1914849397
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.
Resolved.
Args: | ||
api_repr (Dict[str, Any]): | ||
API representation of the object to be instantiated. | ||
Returns: |
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.
Returns: | |
Returns: |
same as https://github.com/googleapis/python-bigquery/pull/2110/files#r1914849397
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.
Resolved.
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.
LGTM, just a question: do we need to add system tests for this class (to verify the api representation is correct), or it's not possible until we add more stuff?
@@ -636,10 +690,10 @@ def from_api_repr(cls, api_repr: dict) -> SerDeInfo: | |||
"""Factory: constructs an instance of the class (cls) | |||
given its API representation. | |||
Args: |
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.
Args: | |
Args: |
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.
Resolved.
@@ -636,10 +690,10 @@ def from_api_repr(cls, api_repr: dict) -> SerDeInfo: | |||
"""Factory: constructs an instance of the class (cls) | |||
given its API representation. | |||
Args: | |||
resource (Dict[str, Any]): | |||
api_repr (Dict[str, Any]): | |||
API representation of the object to be instantiated. | |||
Returns: |
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.
Returns: | |
Returns: |
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.
Resolved.
* Adds ForeignTypeInfo class and tests * Tweak to docstring * minor adjustment in test to enhance code coverage * Updates spacing in docstrings * More updates to spacing in docstrings.
This PR adds the
ForeignTypeInfo
class and the associated tests, plus minor tweaks to support both of those changes.Also incorporates several small changes to correct some docstrings in other PANGEA classes for more uniformity across the PANGEA code additions.