From 130038c9726c2f146fcdbd82bb75cf321f4d0fb0 Mon Sep 17 00:00:00 2001 From: John Duggan Date: Fri, 4 Apr 2025 10:06:55 -0400 Subject: [PATCH 1/3] Add instructions on updating the template --- episodes/02-Copy-Template.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/episodes/02-Copy-Template.md b/episodes/02-Copy-Template.md index f0ab8cbd..ebc44576 100755 --- a/episodes/02-Copy-Template.md +++ b/episodes/02-Copy-Template.md @@ -113,6 +113,27 @@ The template creates a basic project structure to help get you started quickly. In the following sections, we will start adding code to this structure to build our NDIP job submission tool. +## Updating the Template + +After obtaining the template, you may need to update it. This is usually due to one of the following: + +1. You need to change an answer to a question asked during template setup. +2. Our team has changed the template and you want to pull in the new content. + +In both cases, you can update the template with: + +```bash +copier update +``` + +`copier` will ask you the questions from the initial setup again, and if you change your answers the template will be updated to reflect your new answers. If you don't need to change any answers, then you can run the following to keep all of your existing answers: + +```bash +copier update -a +``` + +`copier` uses `git` to resolve conflicts between the template and your changes, so if you've heavily modified the template after the initial setup then you may run into merge conflicts during the update. + ::::::::::::::::::::::::::::::::::::::: challenge ## **Run the Initial Tests** -- GitLab From fff5e56e707ab133ff3bddde59ba3d447089e06f Mon Sep 17 00:00:00 2001 From: John Duggan Date: Fri, 4 Apr 2025 10:17:24 -0400 Subject: [PATCH 2/3] Use a callout for merge conflicts note --- episodes/02-Copy-Template.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/episodes/02-Copy-Template.md b/episodes/02-Copy-Template.md index ebc44576..be26085f 100755 --- a/episodes/02-Copy-Template.md +++ b/episodes/02-Copy-Template.md @@ -132,7 +132,9 @@ copier update copier update -a ``` +:::callout `copier` uses `git` to resolve conflicts between the template and your changes, so if you've heavily modified the template after the initial setup then you may run into merge conflicts during the update. +::: ::::::::::::::::::::::::::::::::::::::: challenge -- GitLab From 62636f09648ef9027bc8141716973618c3dd5e08 Mon Sep 17 00:00:00 2001 From: John Duggan Date: Fri, 4 Apr 2025 11:08:05 -0400 Subject: [PATCH 3/3] Fix copier update option --- episodes/02-Copy-Template.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/episodes/02-Copy-Template.md b/episodes/02-Copy-Template.md index be26085f..f3174549 100755 --- a/episodes/02-Copy-Template.md +++ b/episodes/02-Copy-Template.md @@ -129,7 +129,7 @@ copier update `copier` will ask you the questions from the initial setup again, and if you change your answers the template will be updated to reflect your new answers. If you don't need to change any answers, then you can run the following to keep all of your existing answers: ```bash -copier update -a +copier update -A ``` :::callout -- GitLab