WaterButler is a Python web application for interacting with various file storage services via a single RESTful API, developed at Center for Open Science.
one place where this is called from is within download(), where it is indeed called with a settings parameter (with data taken from a "metadata" response by the OSF)
I stumbled upon this while trying to provide a foldersetting to the filesystem provider via environment variables, which does not work as one might expect (because it is initialized via the above mechanism)
The OSFstorage provider has an "inner provider" that can be
filesystem
for local testing or a cloud storage for production. This provider is initialized in a utility function namedmake_provider()
, which can be called with asettings
parameter: https://github.com/CenterForOpenScience/waterbutler/blob/ef09929b688547eb63d83d8f7fcf168f841ca910/waterbutler/providers/osfstorage/provider.py#L129one place where this is called from is within
download()
, where it is indeed called with asettings
parameter (with data taken from a "metadata" response by the OSF)however, within
make_provider()
, thissettings
parameter is not actually used to initialize the inner provider, the value used instead is this: https://github.com/CenterForOpenScience/waterbutler/blob/ef09929b688547eb63d83d8f7fcf168f841ca910/waterbutler/providers/osfstorage/provider.py#L142This seems... unintended?
I stumbled upon this while trying to provide a
folder
setting to the filesystem provider via environment variables, which does not work as one might expect (because it is initialized via the above mechanism)