git-annex special remote for the open science framework
Any OSF node can be used as a remote, but the recommended setup is to create a subcomponent of your project for archiving your data. Mark it with the Data category so you can find it quickly and take note of its URL. Each component (or project) has a URL like https://osf.io/6zbyf/ which is needed to connect to it.
Write doc section on how to do that, and what URL should be used to configure the special remote.
Initialize the special remote:
git annex initremote osf type=external externaltype=osf \ encryption=none node=https://osf.io/<your-component-id>/
To upload files you need to supply credentials.
Outline how this can be done
OSF_USERNAME, OSF_PASSWORD - credentials, OR OSF_TOKEN # TODO: untested, possibly currently broken in osfclient.
Because this is a special remote, the uploaded data do not retain the git folder structure.
The following parameters can be given to git-annex initremote, or git annex enableremote to (re-)configure a special remote.
- the OSF URL of the file store
- a subpath with (default: /)
Initialize self. See help(type(self)) for accurate signature.
Report whether the OSF node has a particular key
Return if the file remote_file is present in the remote
Asks the remote to check if the url’s content can currently be downloaded (without downloading it).
Asks the remote if it wishes to claim responsibility for downloading an url.
Asks the remote if it is locally or globally available.
Requests the remote to return a use cost.
Remove a key from the remote
Remove the file in remote_file from the remote
Remove the directory remote_directory from the remote
renameexport(key, filename, new_filename)
Move the remote file in name to new_name
Get a key from OSF and store it to filename
transferexport_retrieve(key, local_file, …)
Get the file located at remote_file from the remote
transferexport_store(key, local_file, …)
Store the file located at local_file to remote_file on the remote
Asks the remote to provide additional information about ways to access the content of a key stored in it, such as eg, public urls.