From 69430fd7a7256ede177186fe976598cf92f5be0a Mon Sep 17 00:00:00 2001 From: "Luke W. Johnston" Date: Fri, 11 Jul 2025 14:31:41 -0400 Subject: [PATCH 1/3] build: :hammer: add `test` template recipe to justfile --- justfile | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/justfile b/justfile index f1842f8..af96ad2 100644 --- a/justfile +++ b/justfile @@ -2,7 +2,7 @@ just --list --unsorted # Run all build-related recipes in the justfile -run-all: install-deps format-python check-python check-spelling check-commits +run-all: install-deps format-python check-python check-spelling check-commits test # Install the pre-commit hooks install-precommit: @@ -41,3 +41,24 @@ check-commits: # Check for spelling errors in files check-spelling: uv run typos + +test: + #!/bin/zsh + temp_dir="_temp/test-data-package" + rm -rf $temp_dir + mkdir -p $temp_dir + # vcs-ref means the current commit/head, not a tag. + # `.` means the current directory contains the template. + uvx copier copy --vcs-ref=HEAD . $temp_dir \ + --defaults \ + --data package_name="My Project" \ + --data package_description="Description." \ + --data package_github="https://github.com/user/repo" \ + --data author_name="John Smith" \ + --data author_email="john@example.com" + # TODO: Other checks/tests? + +cleanup: + #!/bin/zsh + temp_dir=$("_temp/test-data-package")) + rm -rf $temp_dir From 18adc1d7d55da66f91fcacac183d1839cdeec6da Mon Sep 17 00:00:00 2001 From: "Luke W. Johnston" Date: Tue, 15 Jul 2025 11:54:48 +0200 Subject: [PATCH 2/3] chore: :see_no_evil: ignore the `_temp` folder --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 63bd79f..2f406ab 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ _ignore bin/ dev/ +_temp/ # Temporary files *.tmp From f77c68980fde002a35c7821a4ebc67a12d63374c Mon Sep 17 00:00:00 2001 From: "Luke W. Johnston" Date: Tue, 15 Jul 2025 12:03:30 +0200 Subject: [PATCH 3/3] build: :hammer: update `--data` variables with future names --- justfile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/justfile b/justfile index af96ad2..00dde3c 100644 --- a/justfile +++ b/justfile @@ -51,11 +51,11 @@ test: # `.` means the current directory contains the template. uvx copier copy --vcs-ref=HEAD . $temp_dir \ --defaults \ - --data package_name="My Project" \ - --data package_description="Description." \ - --data package_github="https://github.com/user/repo" \ - --data author_name="John Smith" \ - --data author_email="john@example.com" + --data package_abbrev= "test-data-package" \ + --data package_github="first-last/test-data-package" \ + --data author_given_name="First" \ + --data author_family_name="Last" \ + --data author_email="first.last@example.com" # TODO: Other checks/tests? cleanup: