-
Notifications
You must be signed in to change notification settings - Fork 127
Open
Labels
Description
The sqlalchemy serialize/deserialize loop makes it nontrivial to keep track of keyword arguments. For example:
from upath import UPath
from bids.layout import BIDSLayout
ds_root = UPath("s3://openneuro.org/ds000102", anon=True)
layout = BIDSLayout(ds_root)
description = layout.get(suffix='description', extension='.json')[0]
assert description._path.storage_options == ds_root.storage_options # boom
Consequently, anonymous access to S3 datasets is not currently possible, and presumably there are other impacts on other protocols. This should be fixed.
Some previous notes from #1094:
If
universal_pathlib
provides an API to access these additional parameters, we could consider adding a column to theBIDSFile
model and use it while reconstructing. Another approach could be to mutateBIDSFile
s after creation, provided the access happens through aBIDSLayout
method call that has access to._root
. Alternately, if we could somehow put this information in the SQLAlchemy session, then theBIDSFile.path
property could access it on demand.