ome / omero-ms-zarr

Experimental micro-service for implementing the Zarr spec over HTTP
https://www.openmicroscopy.org/omero
GNU General Public License v2.0
17 stars 12 forks source link

Provide HTML directory listings from microservice. #53

Closed mtbc closed 4 years ago

mtbc commented 4 years ago

Fixes #13. Try,

wget -r -l0 http://localhost:8080/image/1234.zarr/

to fetch image 1234. (All the downloaded index.html can be ignored.)

Also can set omero.ms.zarr.folder.layout=flattened to try the non-nested layout for chunks.

joshmoore commented 4 years ago

Running origin/master on 8080 and this PR on 9090:

# Test
(demo) /opt/zarr-python $cat fstest.py
#!/usr/bin/env python
import zarr
from zarr.storage import FSStore
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("location")
ns = parser.parse_args()

store = FSStore(ns.location)
group = zarr.group(store=store)
print("groups:", list(group.groups()))
print("arrays:", list(group.arrays()))

# Before
(demo) /opt/zarr-python $./fstest.py http://localhost:8080/idr/zarr/v0.1/1.zarr
groups: []
arrays: []

# After
(demo) /opt/zarr-python $^8080^9090
./fstest.py http://localhost:9090/idr/zarr/v0.1/1.zarr
groups: []
arrays: [('0', <zarr.core.Array '/0' (1, 1, 1, 512, 512) uint8>)]
joshmoore commented 4 years ago

Various other testings:

http://localhost:9090/idr/zarr/ - Resource not found
http://localhost:9090/idr/zarr/v0.1/ - Resource not found
http://localhost:9090/idr/zarr/v0.1/1.zarr - Resource not found
http://localhost:9090/idr/zarr/v0.1/1.zarr/ - OK, returns:
  Directory listing for Image #1
  .zattrs <-- +1 shows JSON
  .zgroup <-- +1 shows JSON
  0/

:+1:

joshmoore commented 4 years ago

Tagged as 0.1.4