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

Update tutorial.rst to include section about accessing Zip Files on S3 #1615

Merged
merged 4 commits into from
Jan 16, 2024

Conversation

jeffpeck10x
Copy link

Per discussion here, add information about about accessing zip files on s3: #1613

[Description of PR]

TODO:

  • Add unit tests and/or doctests in docstrings
  • Add docstrings and API docs for any new/modified user-facing classes and functions
  • New/modified features documented in docs/tutorial.rst
  • Changes documented in docs/release.rst
  • GitHub Actions have all passed
  • Test coverage is 100% (Codecov passes)

@joshmoore
Copy link
Member

Thanks, @jeffpeck10x! I've triggered the checks.

@joshmoore
Copy link
Member

Beautiful!

image

Would you like to add yourself to docs/release.txt

@jeffpeck10x
Copy link
Author

Thank you @joshmoore . I have updated the release notes.

docs/tutorial.rst Outdated Show resolved Hide resolved
@joshmoore
Copy link
Member

Thanks for the review, @d-v-b, and @jeffpeck10x, for getting this started! 🎉 If anyone else would like to further improve these (or other 😄) docs, please feel free.

@joshmoore joshmoore merged commit 1d56da0 into zarr-developers:main Jan 16, 2024
14 of 15 checks passed
@d-v-b
Copy link
Contributor

d-v-b commented Jan 16, 2024

Sorry for being a pedant, but could we revert? I'm not done with my suggestions :) For example, the new docs still contain references to zarr.zip where I think we should be saying 'zipped zarr hierarchy' or similar

Accessing Zip Files on S3
~~~~~~~~~~~~~~~~~~~~~~~~~

The built-in `ZipStore` will only work with paths on the local file-system, however
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure how links work in sphinx, but could we make this a link to the API docs for ZipStore?


The built-in `ZipStore` will only work with paths on the local file-system, however
it is also possible to access ``.zarr.zip`` data on the cloud. Here is an example of
accessing a zipped Zarr file on s3:
Copy link
Contributor

Choose a reason for hiding this comment

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

I think I prefer "zipped Zarr hierarchy" to "zipped Zarr file"


>>> store = zarr.storage.FSStore(url=f"zip::{s3_path}", mode="r")

This can be especially useful if you have a very large ``.zarr.zip`` file on s3
Copy link
Contributor

Choose a reason for hiding this comment

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

same as above -- let's replace zarr.zip with "zipped Zarr hierarchy"

>>> fs = ZipFileSystem(f, mode="r")
>>> store = FSMap("", fs, check=False)
>>>
>>> # cache is optional, but may be a good idea depending on the situation
Copy link
Contributor

Choose a reason for hiding this comment

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

Which situations benefit from the cache?

Copy link
Author

Choose a reason for hiding this comment

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

If you are going to access the same chunks of data multiple times

@d-v-b
Copy link
Contributor

d-v-b commented Jan 16, 2024

I'm also happy to make the changes myself, if people broadly agree with what I'm proposing

@d-v-b
Copy link
Contributor

d-v-b commented Jan 16, 2024

@joshmoore any objections if I revert the merge and make a few tweaks, then re-merge?

@joshmoore
Copy link
Member

Let's just start with a new PR from your side. Then @jeffpeck10x can decide if he's going to jump back in (rather than definitely getting the notifications, etc. 🙂)

@jeffpeck10x
Copy link
Author

@d-v-b I appreciate the careful review. Please go ahead and make those changes.

jhamman pushed a commit to jhamman/zarr-python that referenced this pull request Jan 24, 2024
zarr-developers#1615)

* Update tutorial.rst to include section about accessing Zip Files on S3

Per discussion here, add information about about accessing zip files on s3:
zarr-developers#1613

* Update release.rst

* Implement d-v-b's suggestions

---------

Co-authored-by: Davis Bennett <davis.v.bennett@gmail.com>
Co-authored-by: Josh Moore <josh@openmicroscopy.org>
@d-v-b d-v-b mentioned this pull request Jan 29, 2024
6 tasks
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.

3 participants