The same outcome as cookiecutter --replay
, but using the generated .cookiecutter.json
file instead of whatever was entered last.
The replay.sh --help
documentation:
usage: replay.sh [OPTION]... output_directory [cookiecutter_json]
Regenerate cookiecutter content
Options:
-h, --help, help ... Show this help then exit.
-r .... Repository url.
Value=https://github.com/datajoint-company/dj-cookiecutter.git
-d .... Template subdirectory to use from multi-template repository url.
Value=datajoint-workflow
-n .... Conda environment name that contains cookiecutter.
Value=cookies
Positional args:
output_directory .... The directory where the output will be generated. (Required)
Value=
cookiecutter_json ... Path to the '.cookiecutter.json' file with user config.
Value=/.cookiecutter.json
Examples:
Regenerate to directory 'build' using previously specified values.
> ./replay.sh path/to/project
Regenerate to current directory using a different repo and branch, also conda env.
> ./replay.sh -d datajoint-workflow -r https://github.com/iamamutt/dj-cookiecutter.git -n cookies path/to/project diff/.cookiecutter.json
Use local cloned content to rebuild
> ./replay.sh -r path/to/project
conda
environment with required packages installedtomli
,pyyaml
cookiecutter
retrocookie
bash
- a
.cookiecutter.json
file with the user specified values filled in. This will be automatically generated at the root of the project folder.
-
Install
cookiecutter
as outlined here. -
Change to a temporary directory then clone the repo to get
replay.sh
.cd /tmp
git clone https://github.com/datajoint-company/dj-cookiecutter.git
-
Use the template.
cd /tmp/dj-cookiecutter
cookiecutter --directory datajoint-workflow .
-
Run
replay.sh
.cd /tmp/science-institute_brain-lab
../dj-cookiecutter/datajoint-workflow/scripts/replay/replay.sh . .cookiecutter.json