-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
1267 lines (1111 loc) · 50.6 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!doctype html>
<html lang="en">
<head>
<title> FDM.NRW Werkstatt </title>
<meta name="description" content=" incf-2022-lightning-jsheunis ">
<meta name="author" content=" Stephan Heunis ">
<meta charset="utf-8">
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui">
<link rel="stylesheet" href="reveal.js/dist/reset.css">
<link rel="stylesheet" href="reveal.js/dist/reveal.css">
<link rel="stylesheet" href="reveal.js/dist/theme/beige.css">
<!-- Theme used for syntax highlighted code -->
<link rel="stylesheet" href="reveal.js/plugin/highlight/monokai.css">
<link rel="stylesheet" href="custom_styles.css">
</head>
<body>
<div class="reveal">
<div class="slides">
<!-- FRONT PAGE -->
<section>
<h2 style="margin-bottom: 0;">FDM.NRW Werkstatt 2023</h2>
<img src="pics/datalad_git.svg" style="height:300px; margin-bottom: 0;" alt="title image">
<div style="margin-top:0.5em;">
<table style="border: none;">
<tr>
<td>Michael Hanke<br>Adina Wagner<br>Stephan Heunis
</td>
<td style="text-align: center;">
<img style="height:100px;margin-right:1px;margin-bottom:20px;margin-top: 1.5em; vertical-align:middle;" data-src="pics/fzj_logo.svg" />
<br>
<small>
<a href="https://fosstodon.org/@datalad" target="_blank">
<img data-src="pics/mastodon.svg" style="height:30px;margin:0px" />
@datalad
</a>
</small>
<small>
<a href="https://github.com/datalad" target="_blank">
<img data-src="pics/GitHub.png" style="height:30px;margin:0px" />
datalad
</a>
</small>
</td>
</tr>
</table>
</div>
<p style="text-align: center;">
<small><a href="http://psychoinformatics.de" target="_blank">Psychoinformatics lab</a>
<br>
Institute of Neuroscience and Medicine, Brain & Behavior (INM-7), Germany
<br>
</small>
</p>
<br>
<div>
<small>Slides: </small><a href="https://psychoinformatics-de.github.io/fdm-datalad"><small>psychoinformatics-de.github.io/fdm-datalad</small></a>
<br><a href="https://files.inm7.de/adina/fdm-datalad/#/">files.inm7.de/adina/fdm-datalad</a>
</div>
</section>
<section>
<h2>Acknowledgements</h2>
<div style="margin-top:0.5em;">
<table style="border: none;">
<tr>
<td><img style="height:500px;margin-right:1px;margin-bottom:10px;vertical-align:middle;" data-src="pics/funders.svg" /></td>
<td><img style="height:500px;margin-right:1px;margin-bottom:10px;vertical-align:middle;border:1px solid black" data-src="pics/psyinf_team.png" /></td>
</tr>
</table>
</div>
</section>
<section>
<h2>Agenda</h2>
<br>
<ol>
<li>Talk: Using DataLad to interface RDM infrastructures</li>
<li>Code-along demo: Publishing datasets</li>
</ol>
</section>
<section>
<section>
<h2><code>1</code></h2>
<h2><code>Using DataLad to interface RDM infrastructures</code></h2>
<a href="https://files.inm7.de/mih/pres/talks/whatisdatalad_2023.html#/">whatisdatalad_2023.html</a>
</section>
</section>
<section>
<section>
<h2><code>2</code></h2>
<h2><code>Code-along demonstration</code></h2>
</section>
<section>
<h2>Practical aspects</h2>
<img width="200" src="pics/jupyter_logo.png" alt="jupyterlogo"><br>
<ul>
<li>We'll work in the browser on a cloud server with JupyterHub</li>
<li class="fragment">Cloud-computing environment:<br>
- <a href="https://datalad-hub.inm7.de">datalad-hub.inm7.de</a>
</li>
<li class="fragment">We have pre-installed DataLad and other requirements</li>
<li class="fragment">We will work via the terminal</li>
<li class="fragment">Draw a username, and set a password of your choice when logging in for the first time; remember it!</li>
</ul>
</section>
<section style="text-align: left;">
<h3>Using DataLad in the Terminal</h3>
Check the installed version:
<pre style="margin-left: 0;">
<code data-trim class="language-bash" onmousemove="showHover(event)" onmousedown="clickCopy(event)" onmouseleave="leaveElement(event)">
datalad --version
</code>
<p id="displayArea"></p>
</pre>
<div class="fragment">
For help on using DataLad from the command line:
<pre style="margin-left: 0;">
<code data-trim class="language-bash" onmousemove="showHover(event)" onmousedown="clickCopy(event)" onmouseleave="leaveElement(event)">
datalad --help
</code>
</pre>
</div>
<div class="fragment">
For extensive info about the installed package, its dependencies, and extensions, use <code>wtf</code>:
<pre style="margin-left: 0;">
<code data-trim class="language-bash" onmousemove="showHover(event)" onmousedown="clickCopy(event)" onmouseleave="leaveElement(event)">
datalad wtf
</code>
</pre>
</div>
</section>
<section style="text-align: left;">
<h3>git identity</h3>
Check git identity:
<pre style="margin-left: 0;">
<code data-trim class="language-bash" onmousemove="showHover(event)" onmousedown="clickCopy(event)" onmouseleave="leaveElement(event)">
git config --get user.name
git config --get user.email
</code>
</pre>
<div class="fragment">
Configure git identity:
<pre style="margin-left: 0;">
<code data-trim class="language-bash" onmousemove="showHover(event)" onmousedown="clickCopy(event)" onmouseleave="leaveElement(event)">
git config --global user.name "Stephan Heunis"
git config --global user.email "s.heunis@fz-juelich.de"
</code>
</pre>
</div>
<div class="fragment">
Use the latest datalad features:
<pre style="margin-left: 0;">
<code data-trim class="language-bash" onmousemove="showHover(event)" onmousedown="clickCopy(event)" onmouseleave="leaveElement(event)">
git config --global --add datalad.extensions.load next
</code>
</pre>
</div>
</section>
<section style="text-align: left;">
<h3>Using datalad via its Python API</h3>
Open a Python environment:
<pre style="margin-left: 0;">
<code data-trim class="language-bash" onmousemove="showHover(event)" onmousedown="clickCopy(event)" onmouseleave="leaveElement(event)">
ipython
</code>
</pre>
<div class="fragment">
Import and start using:
<pre style="margin-left: 0;">
<code data-trim class="language-python" onmousemove="showHover(event)" onmousedown="clickCopy(event)" onmouseleave="leaveElement(event)">
import datalad.api as dl
dl.create(path='mydataset')
</code>
</pre>
</div>
<div class="fragment">
Exit the Python environment:
<pre style="margin-left: 0;">
<code data-trim class="language-python" onmousemove="showHover(event)" onmousedown="clickCopy(event)" onmouseleave="leaveElement(event)">
exit
</code>
</pre>
</div>
</section>
</section>
<!-- PUBLISHING: THEORY -->
<section>
<section data-transition="None">
<h2>Quick Basics</h2>
<img src="pics/dataset.svg" width="600"> <br>
</section>
<section data-transition="None">
<h2>Quick Basics</h2>
<img src="pics/publishing_gitvsannex.svg" width="900"> <br>
</section>
<section data-transition="None">
<h2>Quick Basics</h2>
<img src="pics/local_wf.svg" width="600"> <br>
</section>
<section data-transition="None">
<h2>Quick Basics</h2>
<img src="pics/researchlog.png" width="900"> <br>
</section>
<section data-transition="None">
<h2>Quick Basics</h2>
<img src="pics/reproducible_execution.svg" width="900"> <br>
</section>
<section style="text-align: left;">
<h2>Our dataset: Midterm YODA Data Analysis Project</h2>
<ul style="font-size: xx-large">
<li>DataLad dataset: <a href="https://github.com/datalad-handbook/midterm_project">https://github.com/datalad-handbook/midterm_project</a></li>
<li>Find out more: <a href="https://handbook.datalad.org/en/latest/basics/101-126-intro.html">A Data Analysis Project with DataLad</a></li>
<li>All inputs (i.e. building blocks from other sources) are located in the <code>input/</code> subdataset</li>
<li>Custom code is located in <code>code/</code></li>
<li>Relevant software is included as a software container</li>
<li>Outcomes are generated with a provenance tracked run command, and located in the root of the dataset:</li>
<ul>
<li><code>prediction_report.csv</code> contains the main classification metrics</li>
<li><code>output/pairwise_relationships.png</code> is a plot of the relations between features.</li>
</ul>
</ul>
<pre style="margin-left: 0; margin-top: 2em;">
<code data-trim class="language-bash" onmousemove="showHover(event)" onmousedown="clickCopy(event)" onmouseleave="leaveElement(event)">
[DS~0] ~/midterm_project
├── CHANGELOG.md
├── README.md
├── code/
│ ├── README.md
│ └── script.py
├── [DS~1] input/
│ └── iris.csv -> .git/annex/objects/...
├── pairwise_relationships.png -> .git/annex/objects/...
└── prediction_report.csv -> .git/annex/objects/...
</code>
</pre>
</section>
<section style="text-align: left; font-size:30px">
<h2>Our dataset: Midterm YODA Data Analysis Project</h2>
<li>Let's explore the dataset briefly</li>
<div class="fragment">
Install the dataset:
<pre style="margin-left: 0; margin-top: 2em;">
<code data-trim class="language-bash" onmousemove="showHover(event)" onmousedown="clickCopy(event)" onmouseleave="leaveElement(event)">
datalad clone \
https://github.com/datalad-handbook/midterm_project.git
</code>
</pre>
</div> <div class="fragment">
Find out about its subdatasets
<pre style="margin-left: 0; margin-top: 2em;">
<code data-trim class="language-bash" onmousemove="showHover(event)" onmousedown="clickCopy(event)" onmouseleave="leaveElement(event)">
cd midterm_project
datalad subdatasets
</code>
</pre>
</div> <div class="fragment">
Get some contents
<pre style="margin-left: 0; margin-top: 2em;">
<code data-trim class="language-bash" onmousemove="showHover(event)" onmousedown="clickCopy(event)" onmouseleave="leaveElement(event)">
datalad get input
</code>
</pre>
</div> <div class="fragment">
Drop some contents
<pre style="margin-left: 0; margin-top: 2em;">
<code data-trim class="language-bash" onmousemove="showHover(event)" onmousedown="clickCopy(event)" onmouseleave="leaveElement(event)">
datalad drop input
</code>
</pre>
</div> <div class="fragment">
Find out about its history
<pre style="margin-left: 0; margin-top: 2em;">
<code data-trim class="language-bash" onmousemove="showHover(event)" onmousedown="clickCopy(event)" onmouseleave="leaveElement(event)">
tig
</code>
</pre>
</div> <div class="fragment">
Reproduce an analysis
<pre style="margin-left: 0; margin-top: 2em;">
<code data-trim class="language-bash" onmousemove="showHover(event)" onmousedown="clickCopy(event)" onmouseleave="leaveElement(event)">
datalad rerun HEAD~2
</code>
</pre>
</section>
</section>
<section>
<section>
<h2>Our plan</h2>
<br>
<ol>
<li><strong>Learn</strong> - How do we publish data?</li>
<li><strong>Do</strong> - Publish data to:</li>
<ul>
<li>GitLab</li>
<li>OSF</li>
<li>Sciebo (webdav)</li>
<li>Dataverse</li>
</ul>
</ol>
</section>
<section data-transition="None">
<h2>"Share data like source code"</h2>
<ul style="font-size:30px">
<li class="fragment fade-in-then-semi-out" data-fragment-index="1">Datasets can be cloned, pushed, and updated from and to <strong>local</strong> and <strong>remote</strong></strong> paths,
remote <strong>hosting services</strong>, external <strong>special remotes</strong></li>
<img class="fragment fade-in" data-fragment-index="1" style="box-shadow: 5px 5px 3px #888888" height="330" src="pics/collaboration.svg">
<li class="fragment fade-in">Examples: <br>
Local path <pre><code>../my-projects/experiment_data</code></pre>
Remote path <pre><code>myuser@myinstitutes.hcp.system:/home/myuser/my-projects/experiment_data</code></pre>
Hosting service <pre><code>git.github.com:myuser/experiment_data.git</code></pre>
External special remotes <pre><code>osf://my-osf-project-id</code></pre></li>
</ul>
<aside class="notes">
Idea behind datalad: Enable a similar level of tooling and culture for the distribution and version control of data as it is present for open source software development
</aside>
</section>
<section data-transition="None">
<h2>Interoperability</h2>
<ul style="font-size:30px">
<li>DataLad is built to maximize interoperability and use with hosting and
storage technology</li>
</ul>
<img src="pics/services_only.png" height="650">
<small>See the chapter <a href="http://handbook.datalad.org/en/latest/basics/basics-thirdparty.html" target="_blank">
Third party infrastructure</a> for walk-throughs for different services</small>
</section>
<section data-transition="None">
<h2>Interoperability</h2>
<ul style="font-size:30px">
<li>DataLad is built to maximize interoperability and use with hosting and
storage technology</li>
</ul>
<img src="pics/services_connected.png" height="650">
<small>See the chapter <a href="http://handbook.datalad.org/en/latest/basics/basics-thirdparty.html" target="_blank">
Third party infrastructure</a> for walk-throughs for different services</small>
</section>
<section data-transition="None">
<h2>Publishing datasets</h2>
I have a dataset on my computer. How can I share it, or collaborate on it?
<img height="900" src="pics/startingpoint.svg">
</section>
<section data-transition="None">
<h2>Glossary</h2>
<dl style="font-size:30px">
<dt class="fragment fade-in" data-fragment-index="1">
Sibling (remote)</dt>
<dd class="fragment fade-in" data-fragment-index="1">
Linked clones of a dataset. You can usually update (from) siblings to keep all your siblings in sync
(e.g., ongoing data acquisition stored on experiment compute and backed up on cluster and external hard-drive)
</dd>
<dt class="fragment fade-in" data-fragment-index="2">
Repository hosting service</dt>
<dd class="fragment fade-in" data-fragment-index="2">
Webservices to host Git repositories, such as GitHub, GitLab, Bitbucket, Gin, ...</dd>
<dt class="fragment fade-in" data-fragment-index="3">
Third-party storage</dt>
<dd class="fragment fade-in" data-fragment-index="3">
Infrastructure (private/commercial/free/...) that can host data. A "special remote" protocol
is used to publish or pull data to and from it
</dd>
<dt class="fragment fade-in" data-fragment-index="4">
Publishing datasets</dt>
<dd class="fragment fade-in" data-fragment-index="4">
<em>Pushing</em> dataset contents (Git and/or annex) to a sibling using <strong>datalad push</strong></dd>
<dt class="fragment fade-in" data-fragment-index="5">
Updating datasets</dt>
<dd class="fragment fade-in" data-fragment-index="5">
<em>Pulling</em> new changes from a sibling using <strong>datalad update --merge</strong></dd>
</dl>
</section>
<section data-transition="None">
<h2>Publishing datasets</h2>
<ul>
<li>Most public datasets separate content in Git versus git-annex behind the scenes</li>
</ul>
<img height="900" src="pics/publishing_network_gitvsannex.svg">
</section>
<section data-transition="None">
<h2>Publishing datasets</h2>
<img height="900" src="pics/publishing_network_publishparts.svg">
</section>
<section data-transition="None">
<h2>Publishing datasets</h2>
<img height="900" src="pics/publishing_network_publishparts2.svg">
</section>
<section data-transition="None">
<h2>Publishing datasets</h2>
Typical case:
<ul style="font-size:30px">
<li class="fragment fade-in">
Datasets are exposed via a private or public repository on a
repository hosting service
</li>
<li class="fragment fade-in">
Data can't be stored in the repository hosting service, but can be
kept in almost any third party storage
</li>
<li class="fragment fade-in">
Publication dependencies automate pushing to the correct place, e.g.,
<pre>
<code class="language-bash" onmousemove="showHover(event)" onmousedown="clickCopy(event)" onmouseleave="leaveElement(event)">
$ git config --local remote.github.datalad-publish-depends gdrive
# or
$ datalad siblings add --name origin --url git@git.jugit.fzj.de:adswa/experiment-data.git --publish-depends s3
</code>
</pre>
</li>
</ul>
<img src="pics/publishing_network_publishdepends.svg">
</section>
<section data-transition="None">
<h2>Publishing datasets</h2>
<p style="font-size:30px"> Special case 1: repositories with annex support</p>
<img height="850" class="fragment fade-in" src="pics/publishing/publishing_network_publishgin.svg">
</section>
<section data-transition="None">
<h2>Publishing datasets</h2>
<p style="font-size:30px">Special case 2: Special remotes with repositories</p>
<img height="850" src="pics/publishing/publishing_network_publishosf.svg">
</section>
</section>
<!-- PUBLISHING: CODE ALONG -->
<section>
<section>
<h2><code>2a</code></h2>
<h2><code>Publishing to GitLab</code></h2>
<p><a href="https://gitlab.com/">https://gitlab.com/</a></p>
<img src="pics/gitlab-logo-100.svg" alt="gitlab-logo">
</section>
<section style="text-align: left;">
<div style="display: flex !important; align-items: center">
<h2>create-sibling-gitlab</h2> <a href="https://handbook.datalad.org/en/latest/basics/101-139-hostingservices.html#creating-a-sibling-on-gitlab">(docs)</a>
</div>
<ol>
<li class="fragment">Log into GitLab</li>
<li class="fragment">Create personal access token</li>
<li class="fragment">Create a top-level group</li>
<li class="fragment">Create a gitlab config file (replace relevant items)</li>
</ol>
<div class="fragment">
<pre style="margin-left: 0;">
<code data-noescape data-trim class="language-bash" onmousemove="showHover(event)" onmousedown="clickCopy(event)" onmouseleave="leaveElement(event)">
cat << EOF > ~/.python-gitlab.cfg
[my-site]
url = https://gitlab.com/
private_token = my-gitlab-token
api_version = 4
EOF
</code>
</pre>
</div>
<div class="fragment">
5. Configure <code>create-sibling-gitlab</code> in the <code>midterm_project</code> dataset:
<pre style="margin-left: 0;">
<code data-trim class="language-bash" onmousemove="showHover(event)" onmousedown="clickCopy(event)" onmouseleave="leaveElement(event)">
datalad configuration set datalad.gitlab-default-site='my-site'
datalad configuration set datalad.gitlab-'my-site'-project='my-top-level-group'
</code>
</pre>
</div>
<div class="fragment">
6. Create the sibling:
<pre style="margin-left: 0;">
<code data-trim class="language-bash" onmousemove="showHover(event)" onmousedown="clickCopy(event)" onmouseleave="leaveElement(event)">
datalad create-sibling-gitlab -d . --recursive -s 'my-gitlab-sibling'
</code>
</pre>
</div>
<div class="fragment">
7. Push to the sibling:
<pre style="margin-left: 0;">
<code data-trim class="language-bash" onmousemove="showHover(event)" onmousedown="clickCopy(event)" onmouseleave="leaveElement(event)">
datalad push -d . --recursive --to 'my-gitlab-sibling'
</code>
</pre>
</div>
</section>
</section>
<section>
<section>
<h2><code>Publishing to OSF</code></h2>
<p><a href="https://osf.io/">https://osf.io/</a></p>
<img src="pics/git-annex-osf-logo.png" alt="datalad-osf-logo" width="50%">
</section>
<section style="text-align: left;">
<div style="display: flex !important; align-items: center">
<h2>create-sibling-osf</h2> <a href="https://docs.datalad.org/projects/osf/en/latest/">(docs)</a>
</div>
<ol>
<li class="fragment">Log into OSF</li>
<li class="fragment">Create personal access token</li>
<li class="fragment">Enter credentials using <code>datalad osf-credentials</code>:</li>
</ol>
<div class="fragment">
<pre style="margin-left: 0;">
<code data-trim class="language-bash" onmousemove="showHover(event)" onmousedown="clickCopy(event)" onmouseleave="leaveElement(event)">
datalad osf-credentials
</code>
</pre>
</div>
<div class="fragment">
4. Create the sibling:
<pre style="margin-left: 0;">
<code data-trim class="language-bash" onmousemove="showHover(event)" onmousedown="clickCopy(event)" onmouseleave="leaveElement(event)">
datalad create-sibling-osf -d . -s my-osf-sibling \
--title 'my-osf-project-title' --mode export --public
</code>
</pre>
</div>
<div class="fragment">
5. Push to the sibling:
<pre style="margin-left: 0;">
<code data-trim class="language-bash" onmousemove="showHover(event)" onmousedown="clickCopy(event)" onmouseleave="leaveElement(event)">
datalad push -d . --to my-osf-sibling
</code>
</pre>
</div>
<div class="fragment">
6. Clone from the sibling:
<pre style="margin-left: 0;">
<code data-trim class="language-bash" onmousemove="showHover(event)" onmousedown="clickCopy(event)" onmouseleave="leaveElement(event)">
cd ..
datalad clone osf://my-osf-project-id my-osf-clone
</code>
</pre>
</div>
</section>
</section>
<section>
<section>
<h2><code>Publishing to Sciebo</code></h2>
<p><a href="https://hochschulcloud.nrw/en/">https://hochschulcloud.nrw/en/</a></p>
<img src="pics/Sciebo_Logo.svg" alt="sciebo-logo">
</section>
<section style="text-align: left;">
<div style="display: flex !important; align-items: center">
<h2>create-sibling-webdav</h2> <a href="https://docs.datalad.org/projects/next/en/latest/generated/man/datalad-create-sibling-webdav.html">(docs)</a>
</div>
<ol>
<li class="fragment">Log into Sciebo</li>
<li class="fragment">Create a new folder, e.g., <code>datalad-fdm</code></li>
<li class="fragment">Copy your WebDAV URL and add the folder name at the end:
Menu > Files > Settings > WebDAV <br>
<small>E.g.: <code>https://fz-juelich.sciebo.de/remote.php/dav/files/s.heunis%40fz-juelich.de/datalad-fdm</code></small>
</li>
<li class="fragment">Create the sibling:</li>
</ol>
<div class="fragment">
<pre style="margin-left: 0;">
<code data-trim class="language-bash" onmousemove="showHover(event)" onmousedown="clickCopy(event)" onmouseleave="leaveElement(event)">
cd midterm_project
datalad create-sibling-webdav \
-d . \
-r \
-s my-webdav-sibling \
--mode filetree 'my-webdav-url'
</code>
</pre>
At this point, DataLad should ask for credentials if you have not entered them before. Enter your Sciebo username and password.
</div>
<div class="fragment">
4. Push to the sibling:
<pre style="margin-left: 0;">
<code data-trim class="language-bash" onmousemove="showHover(event)" onmousedown="clickCopy(event)" onmouseleave="leaveElement(event)">
datalad push -d . --recursive --to my-webdav-sibling
</code>
</pre>
</div>
<div class="fragment">
5. Clone from the sibling:
<pre style="margin-left: 0;">
<code data-trim class="language-bash" onmousemove="showHover(event)" onmousedown="clickCopy(event)" onmouseleave="leaveElement(event)">
cd ..
datalad clone 'datalad-annex::?type=webdav&encryption=none\
&exporttree=yes&url=my-webdav-url/dataset-name' my-webdav-clone
</code>
</pre>
</div>
</section>
</section>
<section>
<section>
<h2><code>Publishing to Dataverse</code></h2>
<p><a href="https://dataverse.org/">https://dataverse.org/</a></p>
<table>
<tr>
<td style="width: 50%;"><img src="pics/dataverse_r_project.png" alt=""></td>
<td><img src="pics/dataladdataverse.png" alt="dataladdataverse-logo"></td>
</tr>
</table>
</section>
<section style="text-align: left;">
<div style="display: flex !important; align-items: center">
<h2>add-sibling-dataverse</h2> <a href="https://docs.datalad.org/projects/dataverse/en/latest/">(docs)</a>
</div>
<ol>
<li class="fragment">Create an account and log into demo.dataverse.org (or your instance)</li>
<li class="fragment">Find your API token (Username > API Token)</li>
<li class="fragment">Create a new Dataverse dataset</li>
<li class="fragment">Add required metadata and save dataset</li>
<li class="fragment">Retieve dataset DOI and the Dataverse instance URL</li>
<li class="fragment">Create the sibling:</li>
</ol>
<div class="fragment">
<pre style="margin-left: 0;">
<code data-trim class="language-bash" onmousemove="showHover(event)" onmousedown="clickCopy(event)" onmouseleave="leaveElement(event)">
cd midterm_project
datalad add-sibling-dataverse -d . -s my-dataverse-sibling \
'my-dataverse-instance-url' doi:'my-dataset-doi'
</code>
</pre>
<em>for example:</em>
<pre style="margin-left: 0;">
<code data-trim class="language-bash" onmousemove="showHover(event)" onmousedown="clickCopy(event)" onmouseleave="leaveElement(event)">
datalad add-sibling-dataverse -d . -s dataverse \
https://demo.dataverse.org doi:10.70122/FK2/3K9FOD
</code>
</pre>
<em>(DataLad asks for credentials (token) if you haven't entered them before)</em>
</div>
<div class="fragment">
7. Push to the sibling:
<pre style="margin-left: 0;">
<code data-trim class="language-bash" onmousemove="showHover(event)" onmousedown="clickCopy(event)" onmouseleave="leaveElement(event)">
datalad push -d . --to my-dataverse-sibling
</code>
</pre>
</div>
<div class="fragment">
8. Clone from the sibling:
<pre style="margin-left: 0;">
<code data-trim class="language-bash" onmousemove="showHover(event)" onmousedown="clickCopy(event)" onmouseleave="leaveElement(event)">
cd ..
datalad clone 'datalad-annex::?type=external&externaltype=dataverse\
&encryption=none&exporttree=no&url=my-dataverse-instance-url\
&doi='my-dataset-doi' my-sciebo-clone
</code>
</pre>
</div>
</section>
</section>
<section>
<section>
<h2>Discussion</h2>
<ul>
<li>Any questions?</li>
<li>Any comments?</li>
<li>Any feature requests?</li>
</ul>
</section>
</section>
<section>
<section>
<h2><code>Extra Walk-through</code></h2>
</section>
<section>
<h2><code>Datalad Basics</code></h2>
</section>
<section>
<h3 style="text-align: left;">Datalad datasets...</h3>
<img src="pics/comic_box4.svg" alt="">
</section>
<section style="text-align: left;">
<h3>...Datalad datasets</h3>
Create a dataset (here, with the <code>text2git</code> config):
<pre style="margin-left: 0;">
<code data-trim class="language-bash" onmousemove="showHover(event)" onmousedown="clickCopy(event)" onmouseleave="leaveElement(event)">
datalad create -c text2git bids-data
</code>
</pre>
<div class="fragment">
Let's have a look inside. Navigate using <code>cd</code> (change directory):
<pre style="margin-left: 0;">
<code data-trim class="language-bash" onmousemove="showHover(event)" onmousedown="clickCopy(event)" onmouseleave="leaveElement(event)">
cd bids-data
</code>
</pre>
</div>
<div class="fragment">
List the directory content, including hidden files, with <code>ls</code>:
<pre style="margin-left: 0;">
<code data-trim class="language-bash" onmousemove="showHover(event)" onmousedown="clickCopy(event)" onmouseleave="leaveElement(event)">
ls -la .
</code>
</pre>
</div>
</section>
<section>
<h3 style="text-align: left;">Version control...</h3>
<img src="pics/comic_box5.svg" alt="">
</section>
<section style="text-align: left;">
<h3>...Version control</h3>
Let's add some Markdown text to a README file in the dataset
<pre style="margin-left: 0;">
<code data-trim class="language-bash" onmousemove="showHover(event)" onmousedown="clickCopy(event)" onmouseleave="leaveElement(event)">
echo "# A BIDS structured dataset for my input data" > README.md
</code>
</pre>
<div class="fragment">
Now we can check the <code>status</code> of the dataset:
<pre style="margin-left: 0;">
<code data-trim class="language-bash" onmousemove="showHover(event)" onmousedown="clickCopy(event)" onmouseleave="leaveElement(event)">
datalad status
</code>
</pre>
</div>
<div class="fragment">
We can save the state with <code>save</code>
<pre style="margin-left: 0;">
<code data-trim class="language-bash" onmousemove="showHover(event)" onmousedown="clickCopy(event)" onmouseleave="leaveElement(event)">
datalad save -m "Add a short README"
</code>
</pre>
</div>
<div class="fragment">
Further modifications:
<pre style="margin-left: 0;">
<code data-trim class="language-bash" onmousemove="showHover(event)" onmousedown="clickCopy(event)" onmouseleave="leaveElement(event)">
echo "Contains functional task data of one subject" >> README.md
</code>
</pre>
</div>
<div class="fragment">
Save again:
<pre style="margin-left: 0;">
<code data-trim class="language-bash" onmousemove="showHover(event)" onmousedown="clickCopy(event)" onmouseleave="leaveElement(event)">
datalad save -m "Add information on the dataset contents to the README"
</code>
</pre>
</div>
<div class="fragment">
Now, let's check the dataset history:
<pre style="margin-left: 0;">
<code data-trim class="language-bash" onmousemove="showHover(event)" onmousedown="clickCopy(event)" onmouseleave="leaveElement(event)">
git log
</code>
</pre>
</div>
</section>
<section>
<h3 style="text-align: left;">Data consumption & transport...</h3>
<img src="pics/comic_box6_consumption.svg" alt="">
</section>
<section style="text-align: left;">
<h3>...Data consumption & transport...</h3>
Install a dataset from remote URL (or local path) using <code>clone</code>:
<pre style="margin-left: 0;">
<code data-trim class="language-bash" onmousemove="showHover(event)" onmousedown="clickCopy(event)" onmouseleave="leaveElement(event)">
cd ../
datalad clone \
https://github.com/psychoinformatics-de/studyforrest-data-phase2.git
</code>
</pre>
<div class="fragment">
We can now view the cloned dataset's file tree:
<pre style="margin-left: 0;">
<code data-trim class="language-bash" onmousemove="showHover(event)" onmousedown="clickCopy(event)" onmouseleave="leaveElement(event)">
cd studyforrest-data-phase2
ls
</code>
</pre>
</div>
<div class="fragment">
Let's check the dataset size (i.e. git repository):
<pre style="margin-left: 0;">
<code data-trim class="language-bash" onmousemove="showHover(event)" onmousedown="clickCopy(event)" onmouseleave="leaveElement(event)">
du -sh # this will print the size of the directory in human readable sizes
</code>
</pre>
</div>
<div class="fragment">
Let's check the <em>actual</em> dataset size (i.e. git repository + annexed content):
<pre style="margin-left: 0;">
<code data-trim class="language-bash" onmousemove="showHover(event)" onmousedown="clickCopy(event)" onmouseleave="leaveElement(event)">
datalad status --annex
</code>
</pre>
</div>
<div class="fragment">
The DataLad dataset is just the git repository,
i.e. the metadata of all files in the dataset,
including the content of all files comitted to git.
The actual file content in the annex can be retrieved as needed.
</div>
</section>
<section style="text-align: left;">
<h3>...Data consumption & transport</h3>
We can retrieve actual file content with <code>get</code> (here, multiple files):
<pre style="margin-left: 0;">
<code data-trim class="language-bash" onmousemove="showHover(event)" onmousedown="clickCopy(event)" onmouseleave="leaveElement(event)">
# get all files of sub-01 for all functional runs of the localizer task
datalad get \
sub-01/ses-localizer/func/sub-01_ses-localizer_task-objectcategories_run-*.nii.gz
</code>
</pre>
<div class="fragment">
If we don't need a file locally anymore, we can <code>drop</code> it:
<pre style="margin-left: 0;">
<code data-trim class="language-bash" onmousemove="showHover(event)" onmousedown="clickCopy(event)" onmouseleave="leaveElement(event)">
# drop a specific file
datalad drop \
sub-01/ses-localizer/func/sub-01_ses-localizer_task-objectcategories_run-4_bold.nii.gz
</code>
</pre>
</div>
<div class="fragment">
And it's no problem if you need that exact file again, just <code>get</code>it:
<pre style="margin-left: 0;">
<code data-trim class="language-bash" onmousemove="showHover(event)" onmousedown="clickCopy(event)" onmouseleave="leaveElement(event)">
# get a specific file
datalad drop \
sub-01/ses-localizer/func/sub-01_ses-localizer_task-objectcategories_run-4_bold.nii.gz
</code>
</pre>
</div>
<div class="fragment">
Therefore: no need to store all files locally.
Data just needs to be available from at least one location,
then you can <code>get</code> what you want when you need it,
and <code>drop</code> the rest.
</div>
</section>
<section style="text-align: left;">
<h3>Dataset nesting...</h3>
Datasets can be nested in superdataset-subdataset hierarchies:
<img src="pics/linkage_subds.png" alt="">
<ul class="fragment">
<li>Helps with scaling (see e.g. the <a href="https://github.com/datalad-datasets/human-connectome-project-openaccess">Human Connectome Project dataset</a> )</li>
<li>Version control tools struggle with >100k files</li>
<li>Modular units improves intuitive structure and reuse potential</li>
<li>Versioned linkage of inputs for reproducibility</li>
</ul>
</section>
<section style="text-align: left;">
<h3>...Dataset nesting</h3>
Let's make a nest! First we navigate into the top-level dataset:
<pre style="margin-left: 0;">
<code data-trim class="language-bash" onmousemove="showHover(event)" onmousedown="clickCopy(event)" onmouseleave="leaveElement(event)">
cd ../bids-data
</code>
</pre>
<div class="fragment">
Then we clone the input dataset into a specific location in the file tree of the existing dataset, making it a <em>sub</em>dataset (using the <code>-d/--dataset</code> flag):
<pre style="margin-left: 0;">
<code data-trim class="language-bash" onmousemove="showHover(event)" onmousedown="clickCopy(event)" onmouseleave="leaveElement(event)">
datalad clone --dataset . \
https://github.com/datalad/example-dicom-functional.git \
inputs/rawdata
</code>
</pre>
</div>
<div class="fragment">
Similarly, we can clone the analysis container (actually, a set of containers from <a href="https://www.repronim.org/">ReproNim</a>) as a subdataset:
<pre style="margin-left: 0;">
<code data-trim class="language-bash" onmousemove="showHover(event)" onmousedown="clickCopy(event)" onmouseleave="leaveElement(event)">
datalad clone -d . \
https://github.com/ReproNim/containers.git \
code/containers
</code>
</pre>
</div>
<div class="fragment">
Let's see what changed in the dataset, using the <code>subdatasets</code> command:
<pre style="margin-left: 0;">
<code data-trim class="language-bash" onmousemove="showHover(event)" onmousedown="clickCopy(event)" onmouseleave="leaveElement(event)">
datalad subdatasets
</code>
</pre>
</div>
</section>
<section>
<h3 style="text-align: left;">Computationally reproducible execution...</h3>
<img src="pics/comic_box7.svg" width="65%" alt="">
<ul>
<li class="fragment fade-in-then-semi-out">which script/pipeline version</li>
<li class="fragment fade-in-then-semi-out">was run on which version of the data</li>
<li class="fragment fade-in-then-semi-out">to produce which version of the results?</li>
</ul>
</section>
<section style="text-align: left;">
<h3>...Computationally reproducible execution...</h3>