-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docs fixes and improvements #102
Changes from all commits
10a1895
1723e83
e2a55e5
ce4dbb2
fec0823
8c83b58
cfb6a2f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
.. include:: ./links.inc | ||
|
||
Export a human-readable dataset to OSF | ||
************************************** | ||
|
||
Imagine you have been creating a reproducible workflow using DataLad from the | ||
Imagine you have been creating a reproducible workflow using DataLad_ from the | ||
get go. Everything is finished now, code, data, and paper are ready. Last thing | ||
to do: Publish your data. | ||
|
||
|
@@ -21,7 +23,7 @@ For installation checkout the installation page of the documentation. | |
|
||
Creating an Example Dataset | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
We will create a small example DataLad Dataset to show the functionality. | ||
We will create a small example DataLad dataset to show the functionality. | ||
|
||
.. code-block:: bash | ||
|
||
|
@@ -31,7 +33,7 @@ We will create a small example DataLad Dataset to show the functionality. | |
# Copying the $ will prevent your code from execution. | ||
|
||
After having created the dataset we want to populate it with some content (just | ||
like in the Handbook): | ||
like in the `Datalad Handbook`_): | ||
|
||
.. code-block:: bash | ||
|
||
|
@@ -44,21 +46,37 @@ like in the Handbook): | |
Setting up the OSF Remote | ||
^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
To use OSF as a storage, you need to provide either your OSF credentials or an OSF access token. | ||
You can create such a token in your account settings (`Personal access token` and then `Create token`), make sure to create a `full_write` token to be able to create OSF projects and upload data to OSF. | ||
To use OSF as a storage, you first need to provide either your OSF credentials (username and password) or an OSF access token. | ||
|
||
If you choose to use your credentials, proceed as follows: | ||
|
||
.. code-block:: bash | ||
|
||
export OSF_USERNAME=YOUR_USERNAME_FOR_OSF.IO | ||
export OSF_PASSWORD=YOUR_PASSWORD_FOR_OSF.IO | ||
|
||
In this example, we are going to use an OSF access token instead. | ||
You can create such a token in your account settings (`Personal access token` and then `Create token`). | ||
Make sure to create a `full_write` token to be able to create OSF projects and upload data to OSF. | ||
|
||
.. code-block:: bash | ||
|
||
export OSF_TOKEN=YOUR_TOKEN_FROM_OSF.IO | ||
|
||
We are now going to use datalad to create a sibling dataset on OSF with name `osf` - this will create a new project called `OSF_PROJECT_NAME` on the OSF account associated with the OSF token in `$OSF_TOKEN`. | ||
We are now going to use datalad to create a sibling dataset on OSF with name `OSF_PROJECT_NAME`. | ||
This will create a new project called `OSF_PROJECT_NAME` on the OSF account associated with the OSF token in `$OSF_TOKEN`. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is the rational to switch from Having something simple and uniform, such as There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
no, I don't think so, But I would prefer to let users know (also within the example) that it's up to their discretion which name they want to use for their remote and the OSF project. --> after all, it doesn't matter whether it's called But reading this again, it seems like I mixed up some things and it rather should be something like:
|
||
|
||
Note that the ``-s NAME_OF_REMOTE>`` flag is used to specify how ``git`` internally refers to your OSF project with the name `OSF_PROJECT_NAME`. | ||
It would be completely fine to use `OSF_PROJECT_NAME` also as a value for the ``-s`` flag. | ||
|
||
You can later on list your remotes from the command line using the ``git remote -v`` command. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ATM this names refers to the special remote, not a Git remote IIRC. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Still listed by There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there a command to list special remotes that I should refer to instead? Should I adjust the text to make it more clear that this is not a normal remote, but a special remote? |
||
|
||
.. code-block:: bash | ||
|
||
$ datalad create-sibling-osf -s osf OSF_PROJECT_NAME --mode export | ||
$ datalad create-sibling-osf -s NAME_OF_REMOTE OSF_PROJECT_NAME --mode export | ||
|
||
After that we can export the current state (the `HEAD`) of our dataset in human readable form to OSF: | ||
|
||
.. code-block:: bash | ||
|
||
git annex export HEAD --to YOUR_OSF_REMOTE_NAME | ||
git annex export HEAD --to NAME_OF_REMOTE |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,24 @@ | ||
.. include:: ./links.inc | ||
|
||
Introduction | ||
------------ | ||
|
||
Goal of the extension | ||
^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
This extension aims to allow DataLad to work with the Open Science Framework (OSF). This is done by transforming storage on the Open Science Framework (OSF) into a `git-annex <https://git-annex.branchable.com/>`_ repository. | ||
This extension aims to allow DataLad_ to work with the Open Science Framework (OSF_). | ||
This is done by transforming storage on the Open Science Framework (OSF) into a `git-annex`_ repository. | ||
|
||
What can I use this extension for? | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
You can use this extension to use the OSF as a special remote to store data in the annex of a dataset. With this, you can `datalad publish` a dataset to GitHub or similar services and the data to the OSF (via a publication dependency). | ||
The extension is most beneficial for easy access to data stored on OSF via GitHub. If you are sharing your dataset via OSF and code via GitHub, this will allow smooth integration of both along with unified version management provided by DataLad. | ||
You can use this extension to use the OSF as a special remote to store data in the annex of a dataset. | ||
With this, you can `datalad publish` a dataset to GitHub or similar services and the data to the OSF (via a publication dependency). | ||
The extension is most beneficial for easy access to data stored on OSF via GitHub. | ||
If you are sharing your dataset via OSF and code via GitHub, this will allow smooth integration of both along with unified version management provided by DataLad. | ||
|
||
What can I **not** use this extension for? | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
This tool does not work for data that is stored in a storage service other than OSF. | ||
Please refer to the `list of special remotes <https://git-annex.branchable.com/special_remotes/>`_ as hosted by the git-annex website for other storage services. | ||
Please refer to the list of `special remotes`_ as hosted by the git-annex website for other storage services. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
.. This (-*- rst -*-) format file contains commonly used link targets | ||
and name substitutions. It may be included in many files, | ||
therefore it should only contain link targets and name | ||
substitutions. Try grepping for "^\.\. _" to find plausible | ||
candidates for this list. | ||
|
||
.. NOTE: reST targets are | ||
__not_case_sensitive__, so only one target definition is needed for | ||
nipy, NIPY, Nipy, etc... | ||
|
||
|
||
.. _DataLad: https://www.datalad.org | ||
.. _DataLad Handbook: http://handbook.datalad.org/en/latest/ | ||
.. _GitHub: https://www.github.com/ | ||
.. _git-annex: git-annex.branchable.com/ | ||
.. _git: git-scm.com/ | ||
.. _OSF: https://www.osf.io/ | ||
.. _Python: https://www.python.org/ | ||
.. _Special Remote: https://git-annex.branchable.com/special_remotes/ | ||
.. _Special Remotes: https://git-annex.branchable.com/special_remotes/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FTR: When used with DataLad, it supports queries of DataLad's credential management and makes the definition of environment variables unnecessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After #95
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does FTR mean? Should I replace my sentence with yours?