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

Add Google Cloud Storage example #1713

Closed
wants to merge 1 commit into from

Conversation

dstansby
Copy link
Contributor

This adds an example of how to open an array that's in Google Cloud Storage. Fixes zarr-developers/n5py#14

I've added a new section to the docs, "Examples", for short, self-contained examples, that achieve a specific goal. This is distinct from existing sections of the docs, and should complement the existing tutorial and reference sections. For those familiar with Diataxis, this is essentially the "how-to guides" quadrant.

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)

@d-v-b
Copy link
Contributor

d-v-b commented Mar 18, 2024

Your example uses N5FSStore, perhaps an example for a wide audience should just use FSStore?

path_to_array = "a/b/c"

fs = gcsfs.GCSFileSystem(project=bucket, token='anon', access='read_only')
store = zarr.FSStore(url=bucket, fs=fs)
Copy link
Member

Choose a reason for hiding this comment

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

This line throws an error:

AttributeError: module 'zarr' has no attribute 'FSStore'

@sanketverma1704
Copy link
Member

Hi @dstansby, thanks for sending the PR.

I wonder if this example should be listed here along with S3 and Azure examples?

@jhamman jhamman added the V2 Affects the v2 branch label Oct 11, 2024
Copy link

codecov bot commented Oct 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.99%. Comparing base (6fe553d) to head (ad3206f).
Report is 497 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1713   +/-   ##
=======================================
  Coverage   99.99%   99.99%           
=======================================
  Files          38       38           
  Lines       14580    14580           
=======================================
  Hits        14579    14579           
  Misses          1        1           

@dstansby dstansby closed this Oct 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
V2 Affects the v2 branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can't open a read-only Google Cloud Storage store
4 participants