-
Notifications
You must be signed in to change notification settings - Fork 0
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
Refactoring Preload API #12
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.
I already looks a lot more structured and it is easier to read than in the previous PR. :)
Please view my comments below.
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.
The key point is that the store should clearly reflect that all (preloaded) datasets are stored as Zarr files. Please double-check to ensure my assumptions about this are correct and make any necessary adjustments. I'll review it briefly later today, and then I’ll approve.
The remaining comments are only cosmetics.
test/test_store.py
Outdated
from xcube.util.jsonschema import ( | ||
JsonObjectSchema, | ||
) |
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.
from xcube.util.jsonschema import ( | |
JsonObjectSchema, | |
) | |
from xcube.util.jsonschema import JsonObjectSchema |
test/test_store.py
Outdated
@@ -25,9 +25,11 @@ | |||
import pytest | |||
import xarray as xr | |||
from xcube.core.store import new_data_store, DatasetDescriptor |
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.
from xcube.core.store import new_data_store, DatasetDescriptor | |
from xcube.core.store import new_data_store | |
from xcube.core.store import DatasetDescriptor |
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'd prefer single imports here.
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.
Yes, xcube coding convention says so.
test/test_store.py
Outdated
|
||
from xcube_clms.constants import DATA_STORE_ID, DATA_ID_SEPARATOR, DATA_OPENER_IDS | ||
from xcube_clms.constants import DATA_STORE_ID, DATA_ID_SEPARATOR |
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.
from xcube_clms.constants import DATA_STORE_ID, DATA_ID_SEPARATOR | |
from xcube_clms.constants import DATA_STORE_ID | |
from xcube_clms.constants import DATA_ID_SEPARATOR |
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'd prefer single line imports.
self.assertIsInstance(schema, JsonObjectSchema) | ||
self.assertEqual({}, schema.properties) | ||
self.assertEqual( |
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.
This will need to be adjusted then, since you get the opener params for zarr.
test/test_store.py
Outdated
@@ -25,9 +25,11 @@ | |||
import pytest | |||
import xarray as xr | |||
from xcube.core.store import new_data_store, DatasetDescriptor |
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.
Yes, xcube coding convention says so.
xcube_clms/clms.py
Outdated
"""Retrieves all data IDs, optionally including additional attributes. | ||
|
||
Args: | ||
include_attrs: Specifies whether to include attributes. |
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.
Right, but we should also do it. Could you please create an xcube issue for that and maybe a PR as well. Should be < 1h.
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.
Good job, very clean code, thanks!
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.
Nice, approved!
This PR builds on top of #6
Changes in this PR:
ExecutorPreloadHandle
from xcube for preload operations in the CLMS data storeREADME.md
CHANGES.md
Closes #10
Closes #9
Closes #8
Closes #4
Closes #3