Skip to content

Store in path equivalent to the current notebook #12

@krassowski

Description

@krassowski

It is often useful to have the data storage structure reflect the structure of the notebooks. However, as notebooks get renamed and moved around the paths needs to be updated. I propose using dot (.) to indicate that data should be saved in the path equivalent to the currently running notebook. Runnning:

%vault store data in .

in a notebook located in analyses/main_analysis.ipynb would save the data in analyses/main_analysis path of the vault, i.e. be equivalent of running:

%vault store data in analyses/main_analysis

an alternative syntax would use double underscores, e.g.:

%vault store data in __here__

The dot syntax is more akin to the import syntax of Python (from . import x), thus slightly preferred.

The dot syntax could allow further path specification:

%vault store data_clean_1 in ./processed
%vault store data_clean_2 in ./processed
%vault store data_raw_1 in ./raw
%vault store data_raw_2 in ./raw

Support for .. could be considered too, but is outside of scope of this proposal.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions