Closed cmhulbert closed 10 months ago
This is in progress here: https://github.com/saalfeldlab/n5/tree/wip/KeyValueInterface
wherein we added a getBasePath
to the N5Reader
api https://github.com/saalfeldlab/n5/commit/607233c38b8b263042908d9a0fd8679c495e830f
While working on the AWS backend, @tpietzsch added:
getContainerURI
method to N5Reader
https://github.com/saalfeldlab/n5/commit/8f2bfbd2c1dc56bc31afb69c6c00a5df6a3b26faabssoluteURI
to KeyValueAccess
here@cmhulbert and I like these. It inspired these ideas:
getBasePath
, since getContainerURI
KeyValueAccess.absoluteURI
to uri
(since it must always be absolute - we can document that)N5Reader.getContainerURI
to getUri
I'd also consider having the URI methods actually return the URI object, instead of the string
These ideas sound all good to me.
This commit adds a test for the behavior of N5Reader.getURI
and (indirectly) KeyValueAccess.uri
. and ensures that FileSystemKeyValueAccess
behaves as desired. Do we agree about the expected behavior though?
file:
, s3:
, etc)/./
, /../
)N5Reader
s now provide a getURI
that serves this purpose.
Currently, there is no consistent way across N5Reader/Writers to query what source was used to open the container. It would be convenient if the N5 API stored the URL used to create the instance, and exposed via an API call, e.g.
getUrl()
.