Posted on

Datalad is a tool that wraps around git and git-annex. It allows (and recommends, see YODA) nesting “subdatasets” inside of parent “datasets”. The root level dataset is referred to as a “superdataset”.

Below is a code snippet which I utilize in my projects to get the current and superdataset directory paths.

Code

The following code, written in python, may be included near the top of a Jupyter Notebook or python script.

View this gist on GitHub