-
Notifications
You must be signed in to change notification settings - Fork 19
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
Extended xcube.core.store.DataStore docstring to include a basic conv… #331
Conversation
…ention for store open parameters.
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.
Data contraining open parameters would then be 'variable_names', 'bbox' and 'time_range' (other store-specific parameters may exist). As we have declared that these may be None, I think they should be set to optional in the list.
No, not necessarily. This is store dependent. Sentinel HUB for example does not define a useful default for EDIT If we understand constraints in the sense of shaping the expected dataset, then the resolutions However, I will clarify that the rules describes are only valid for optional open parameters. |
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 approve, then.
xcube/core/store/store.py
Outdated
* _if P is None_ means, parameter not given, hence no constraint applies, hence full containment. | ||
* _if not P_ means, we exclude what would otherwise be fully included. | ||
* _else_, the given constraint applies. | ||
|
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 find this section a little unclear. I suggest:
- Replace "full containment" with "no additional restrictions on requested data".
- Replace "what would otherwise be fully included" with "data that would be included by default".
I'm also a bit concerned about if not P
, which applies if P is None, False, 0, or any empty container. Is it really intended to apply so broadly?
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.
Done.
Is it really intended to apply so broadly?
Why not?
xcube/core/store/store.py
Outdated
|
||
* ``variable_names: List[str]``: Included data variables. | ||
Available coordinate variables will be auto-included for any dimension of the data variables. | ||
* ``bbox: Tuple[float, float, float, float]``: Spatial coverage. |
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.
It would be useful to be explicit about the order of elements in bbox -- xmin, ymin, xmax, ymax, I assume.
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.
Done.
xcube/core/store/store.py
Outdated
* ``bbox: Tuple[float, float, float, float]``: Spatial coverage. | ||
* ``crs: str``: Spatial CRS, e.g. "EPSG:4326" or OGC CRS URI. | ||
* ``spatial_res: float``: Spatial resolution in coordinates of the spatial CRS. | ||
* ``time_range: Tuple[Optional[str], Optional[str]]``: Time range interval using iso-date/times. |
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 should be explicit about the semantics of None in the time range (which I assume should be interpreted as "from the earliest data in the dataset" and "up to the latest data in the dataset" for start and end respectively).
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.
Done.
Right. EDIT No. It has been made clear, that all parameters are optional. |
…ention for store open parameters.
Closes #330