-
Notifications
You must be signed in to change notification settings - Fork 18
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
Replace TypeSpecifier by simpler DataType #510
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.
See comments.
@property | ||
def alias(self) -> str: | ||
"""The primary alias name.""" | ||
return self._aliases[0] |
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.
aliases might be of length 0
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.
No, there is always at least one alias. See constructor.
fs_path = self._convert_data_id_into_fs_path(data_id) | ||
return self.fs.exists(fs_path) | ||
return False | ||
|
||
def describe_data(self, data_id: str, type_specifier: str = None) \ | ||
def describe_data(self, data_id: str, data_type: DataTypeLike = None) \ |
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.
We need to think about whether we still need data_type as a parameter here. We originally put it in here because the resulting DataDescriptor would be different, depending on whether we ask for a data or a dataset[cube].
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.
Actually, each datatype has its own descriptor type,
- xr.Dataset <-> DatasetDescriptor
- MultiLevelDataset <-> MultiLevelDatasetDescriptor
- gpd.GeoDataFrame <-> GeoDataFrameDatasetDescriptor
Closes #509
This PR implements more or less the solution indicated in #509.
Checklist:
docs/source/*
CHANGES.md
Remember to close associated issues after merge!