The building blocks of a scientific result are rarely static
Analysis code, manuscripts, ... evolve.
(Rewrite, fix bugs, add functions, refactor, extend, ...)
Version control helps you to...
CC-BY Scriberia & The Turing Way
  • keep things organized
  • keep track of changes
  • revert changes or go
    back to previous states
  • collect and share digital provenance
The building blocks of a scientific result are rarely static
Data changes, too!
(errors are fixed, data is extended, naming standards change,
an analysis requires only a subset of your data...)


Sadly, Git doesn't handle large files well.

Dataset linkage

$ datalad clone --dataset . http://example.com/ds inputs/rawdata
$ git diff HEAD~1
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000..c3370ba
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "inputs/rawdata"]
+       path = inputs/rawdata
+       url = http://example.com/importantds
diff --git a/inputs/rawdata b/inputs/rawdata
new file mode 160000
index 0000000..fabf852
--- /dev/null
+++ b/inputs/rawdata
@@ -0,0 +1 @@
+Subproject commit fabf8521130a13986bd6493cb33a70e580ce8572
Each (sub)dataset is a separate, but jointly version-controlled entity. If its data isn't retrieved, subdatasets are an extremely lightweight yet actionable data dependency
xkcd comic 2054

Summary - Dataset consumption & nesting

    datalad clone installs a dataset.
    It can be installed “on its own”: Specify the source (url, path, ...) of the dataset, and an optional path for it to be installed to.

    Datasets can be installed as subdatasets within an existing dataset.
    The --dataset/-d option needs a path to the root of the superdataset.

    Only small files and metadata about file availability are present locally after an install.
    To retrieve actual file content of annexed files, datalad get downloads file content on demand.

    Datasets preserve their history.
    The superdataset records only the version state of the subdataset.

Summary - Reproducible execution

    datalad run records a command and its impact on the dataset.
    All dataset modifications are saved - use it in a clean dataset.

    Data/directories specified as --inputare retrieved first.
    Use one flag per input.

    Data/directories specified as --outputwill be unlocked for modifications prior to a rerun of the command.
    Its optional to specify, but helpful for recomputations.

    datalad rerun can automatically re-execute run-records later.
    They can be identified with any commit-ish (hash, tag, range, ...)