zarr-developers / zarr-python

An implementation of chunked, compressed, N-dimensional arrays for Python.
http://zarr.readthedocs.io/
MIT License
1.44k stars 272 forks source link

Update `RemoteStore.__str__` and add UPath tests #1964

Closed d-v-b closed 2 months ago

d-v-b commented 2 months ago

This PR changes the .__str__ method of RemoteStore to make it similar to LocalStore and MemoryStore (i.e., RemoteStore("s3://path").__str__ returns s3://path).

~I also add tests for UPath, and tweaked the test suite accordingly. The tests are failing, and I don't know why. @martindurant could you take a look if you have time?~ edit: tests are passing

TODO:

d-v-b commented 2 months ago

the test failures were due to a trailing "/" character added to the url / path attributes in the "init-from-UPath" code paths, and that's resolved via str.rstrip('/')

martindurant commented 2 months ago

None of my comments are blockers