This repository contains a cookiecutter template for creating new NAAT repositories with git annex included. It is based on the cookiecutter-data-science template without the environment management part, or the automatic packaging part.
You need to set up git, git-annex and datalad on your system. Please refer to their respective documentation for installation instructions:
You can use this template by installing cookiecutter and running the following command:
cookiecutter https://github.com/neuroanatomy/cookiecutter-naat-dataladAnd then follow the prompts to customize your new project.
The goal of this template is to effectively manage large datasets along with various code and documentation files.
Datalad (and git-annex under the hood) is used to handle large datasets, while git manages code and documentation files.
Thus, .gitattributes is configured to ensure that files in the data/ directory are ignored by git, and files everywhere else are ignored by git-annex.
Finally, files in the data/interim/ directory are ignored by both git and git-annex to avoid creating a large .git tree history with multiple versions of intermediate files.
To transfer files from data/interim/ we propose to use rsync or similar tools.
This setup allows the command datalad save to automatically determine whether to add files to git or git-annex based on their location.
But you are responsible for placing files in the correct directories.