feat: Adds ForeignTypeInfo class and tests#2110
Conversation
tswast
left a comment
There was a problem hiding this comment.
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.
Nit: needs a blank line to separate the sections
| Args: | |
| Args: |
|
|
||
| def to_api_repr(self) -> dict: | ||
| """Build an API representation of this object. | ||
| Returns: |
There was a problem hiding this comment.
| Returns: | |
| Returns: |
similar to https://github.com/googleapis/python-bigquery/pull/2110/files#r1914849397
| 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.
| Args: | |
| Args: |
same as https://github.com/googleapis/python-bigquery/pull/2110/files#r1914849397
| Args: | ||
| api_repr (Dict[str, Any]): | ||
| API representation of the object to be instantiated. | ||
| Returns: |
There was a problem hiding this comment.
| Returns: | |
| Returns: |
same as https://github.com/googleapis/python-bigquery/pull/2110/files#r1914849397
Linchin
left a comment
There was a problem hiding this comment.
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.
| Args: | |
| 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.
| Returns: | |
| Returns: |
* 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
ForeignTypeInfoclass 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.