Skip to content
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

Check for minimum Zarr version. #1960

Merged
merged 2 commits into from
Mar 6, 2018
Merged

Check for minimum Zarr version. #1960

merged 2 commits into from
Mar 6, 2018

Conversation

kaipak
Copy link
Contributor

@kaipak kaipak commented Mar 3, 2018


if LooseVersion(zarr.__version__) < min_zarr:
raise NotImplementedError("Zarr version %s or greater is "
"required by xarray. See zarr "
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

W291 trailing whitespace

Copy link
Member

@shoyer shoyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One small suggestion, otherwise this looks great!

@@ -271,6 +272,14 @@ class ZarrStore(AbstractWritableDataStore):
def open_group(cls, store, mode='r', synchronizer=None, group=None,
writer=None):
import zarr
min_zarr = '2.2'

if LooseVersion(zarr.__version__) < min_zarr:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add # pragma: no cover to indicate that this clause shouldn't be included in coverage calculations?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure thing, hope I did it right!

@@ -271,6 +272,14 @@ class ZarrStore(AbstractWritableDataStore):
def open_group(cls, store, mode='r', synchronizer=None, group=None,
writer=None):
import zarr
min_zarr = '2.2'

if LooseVersion(zarr.__version__) < min_zarr: # pragma: no cover
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E261 at least two spaces before inline comment

@jhamman jhamman merged commit 55128aa into pydata:master Mar 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants