You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -37,7 +38,7 @@ copying it will prevent your code from execution.
37
38
$ datalad create collab_osf
38
39
39
40
After having created the dataset we want to populate it with some content (just
40
-
like in the Handbook).
41
+
like in the Handbook). Importantly we don't want to upload this file on Github, only on OSF - in the real world this could be your data that is too large to upload to Github.
41
42
42
43
.. code-block:: bash
43
44
@@ -47,51 +48,48 @@ like in the Handbook).
47
48
-m "add beginners guide on bash" \
48
49
-O books/bash_guide.pdf
49
50
50
-
And we also want to add a text file, which will be saved on Github_.
51
+
And we also want to add a text file, which will be saved on Github_ - in your case this could be the code you are using.
51
52
52
53
.. code-block:: bash
53
54
54
-
$ cat <<EOT > example.txt
55
-
This is just an example file just to show the different ways of saving data
56
-
in a DataLad Dataset. EOT
57
-
55
+
$ mkdir code
56
+
$ cd code
57
+
$ echo"This is just an example file just to show the different ways of saving data in a DataLad Dataset."> example.txt
58
58
$ datalad save --to-git -m "created an example.txt"
59
59
60
60
We now have a Dataset with one file that can be worked on using Github and one
61
61
that should be tracked using `git-annex`.
62
62
63
-
Setting up Github Remote
64
-
^^^^^^^^^^^^^^^^^^^^^^^^
65
-
66
-
We can set-up a Github Remote with the same name basically using
To use OSF as a storage, you need to provide either your OSF credentials or an OSF access token.
77
-
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.
67
+
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.
78
68
79
69
.. code-block:: bash
80
70
81
71
$ export OSF_TOKEN=YOUR_TOKEN_FROM_OSF.IO
82
72
83
-
We are now going to use datalad to create a sibling dataset on OSF - this will create a new dataset called `OSF_PROJECT_NAME` on the OSF account associated with the OSF token in `$OSF_TOKEN`.
73
+
We are now going to use datalad to create a sibling dataset on OSF with name `osf` - this will create a new dataset called `OSF_PROJECT_NAME` on the OSF account associated with the OSF token in `$OSF_TOKEN`.
And finally we are going to copy all files to this new OSF project.
82
+
We can set-up a Github Remote with name `github` and include a publish dependency with OSF - that way, when we publish our dataset to Github, the data files get automatically uploaded to OSF.
$ datalad publish . --to github --transfer-data all
88
+
89
+
This will publish example.txt in code/ to Github and only add the folder structure and symbolic links for all other file; at the same time it will upload the data to OSF - this way you can let OSF handle your data and Github your code.
0 commit comments