From 5048844264bfba2ba08141a9e9e6fbb2a3bb0e81 Mon Sep 17 00:00:00 2001 From: Eli Fine Date: Sun, 27 Jul 2025 10:40:39 +0000 Subject: [PATCH 01/10] reade --- README.md | 1 + ruff.toml | 1 + 2 files changed, 2 insertions(+) diff --git a/README.md b/README.md index a5aedd91..9b2b8abe 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,7 @@ 1. Delete all files currently in the repository. Optional...but makes it easiest to avoid git conflicts. 1. Run copier to instantiate the template: `copier copy --trust gh:LabAutomationAndScreening/copier-base-template.git .` 1. Run `uv lock` to generate the lock file +1. Stages all files to prepare for commit (`git add .`) 1. Run `python3 .github/workflows/hash_git_files.py . --for-devcontainer-config-update` to update the hash for your devcontainer file 1. Commit the changes (optional) 1. Rebuild your new devcontainer diff --git a/ruff.toml b/ruff.toml index 087bc366..ed93b2d4 100644 --- a/ruff.toml +++ b/ruff.toml @@ -62,6 +62,7 @@ ignore = [ "TD003", # Up to the author's judgement whether a TODO requires a link to an issue or not "TID252", # Sometimes it makes sense to use relative imports, that's a judgement call for us, not ruff "TC006", # Adding quotes around classes unnecessarily confuses the IDE for automatic refactoring + "SIM114", # Using `or` statements to simplify this would confuse the coverage checker ] # Allow fix for all enabled rules (when `--fix`) is provided. From 2d3aa68202883d6a47df945505ce21c5d79e2204 Mon Sep 17 00:00:00 2001 From: Eli Fine Date: Sun, 27 Jul 2025 10:49:34 +0000 Subject: [PATCH 02/10] Rename templae --- .devcontainer/devcontainer.json | 2 +- .devcontainer/install-ci-tooling.py | 8 ++++---- extensions/context.py | 6 +++--- pyproject.toml | 4 ++-- .../install-ci-tooling.py.jinja-base | 4 ++-- template/extensions/context.py.jinja-base | 4 ++-- template/pyproject.toml.jinja-base | 2 +- uv.lock | 20 +++++++++---------- 8 files changed, 25 insertions(+), 25 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index dd1906ae..21312561 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -59,5 +59,5 @@ "initializeCommand": "sh .devcontainer/initialize-command.sh", "onCreateCommand": "sh .devcontainer/on-create-command.sh", "postStartCommand": "sh .devcontainer/post-start-command.sh" - // Devcontainer context hash (do not manually edit this, it's managed by a pre-commit hook): 323225d7 # spellchecker:disable-line + // Devcontainer context hash (do not manually edit this, it's managed by a pre-commit hook): b72624ea # spellchecker:disable-line } diff --git a/.devcontainer/install-ci-tooling.py b/.devcontainer/install-ci-tooling.py index 2b796ed5..0dc3748b 100644 --- a/.devcontainer/install-ci-tooling.py +++ b/.devcontainer/install-ci-tooling.py @@ -5,9 +5,9 @@ import subprocess import sys -UV_VERSION = "0.7.12" -COPIER_VERSION = "9.7.1" -COPIER_TEMPLATES_EXTENSION_VERSION = "0.3.1" +UV_VERSION = "0.8.3" +COPIER_VERSION = "9.8.0" +COPIER_TEMPLATE_EXTENSIONS_VERSION = "0.3.2" PRE_COMMIT_VERSION = "4.2.0" GITHUB_WINDOWS_RUNNER_BIN_PATH = r"C:\Users\runneradmin\.local\bin" parser = argparse.ArgumentParser(description="Install CI tooling for the repo") @@ -65,7 +65,7 @@ def main(): "install", f"copier=={COPIER_VERSION}", "--with", - f"copier-templates-extensions=={COPIER_TEMPLATES_EXTENSION_VERSION}", + f"copier-template-extensions=={COPIER_TEMPLATE_EXTENSIONS_VERSION}", ], check=True, env=uv_env, diff --git a/extensions/context.py b/extensions/context.py index e5553b39..bdda5440 100644 --- a/extensions/context.py +++ b/extensions/context.py @@ -11,11 +11,11 @@ class ContextUpdater(ContextHook): @override def hook(self, context: dict[Any, Any]) -> dict[Any, Any]: # These are duplicated in the install-ci-tooling.py script in this repository - context["uv_version"] = "0.7.12" + context["uv_version"] = "0.8.3" context["pre_commit_version"] = "4.2.0" # These also in pyproject.toml - context["copier_version"] = "9.7.1" - context["copier_templates_extension_version"] = "0.3.1" + context["copier_version"] = "9.8.0" + context["copier_template_extensions_version"] = "0.3.2" ####### context["pnpm_version"] = "10.13.1" # These are duplicated in the pyproject.toml of this repository diff --git a/pyproject.toml b/pyproject.toml index b8e6381f..f0861ca3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,6 +9,6 @@ dependencies = [ "pytest-cov>=6.2.1", "pytest-randomly>=3.16.0", "pyright[nodejs]>=1.1.403", - "copier>=9.7.1", - "copier-templates-extensions>=0.3.1" + "copier>=9.8.0", + "copier-template-extensions>=0.3.2" ] diff --git a/template/.devcontainer/install-ci-tooling.py.jinja-base b/template/.devcontainer/install-ci-tooling.py.jinja-base index 171f45ba..7a5e4f3c 100644 --- a/template/.devcontainer/install-ci-tooling.py.jinja-base +++ b/template/.devcontainer/install-ci-tooling.py.jinja-base @@ -10,7 +10,7 @@ from pathlib import Path UV_VERSION = "{% endraw %}{{ uv_version }}{% raw %}" PNPM_VERSION = "{% endraw %}{{ pnpm_version }}{% raw %}" COPIER_VERSION = "{% endraw %}{{ copier_version }}{% raw %}" -COPIER_TEMPLATES_EXTENSION_VERSION = "{% endraw %}{{ copier_templates_extension_version }}{% raw %}" +COPIER_TEMPLATE_EXTENSIONS_VERSION = "{% endraw %}{{ copier_template_extensions_version }}{% raw %}" PRE_COMMIT_VERSION = "{% endraw %}{{ pre_commit_version }}{% raw %}" GITHUB_WINDOWS_RUNNER_BIN_PATH = r"C:\Users\runneradmin\.local\bin" INSTALL_SSM_PLUGIN_BY_DEFAULT = {% endraw %}{% if is_child_of_copier_base_template is not defined and install_aws_ssm_port_forwarding_plugin is defined and install_aws_ssm_port_forwarding_plugin is sameas(true) %}True{% else %}False{% endif %}{% raw %} @@ -78,7 +78,7 @@ def main(): "install", f"copier=={COPIER_VERSION}", "--with", - f"copier-templates-extensions=={COPIER_TEMPLATES_EXTENSION_VERSION}", + f"copier-template-extensions=={COPIER_TEMPLATE_EXTENSIONS_VERSION}", ], check=True, env=uv_env, diff --git a/template/extensions/context.py.jinja-base b/template/extensions/context.py.jinja-base index a2ebc511..5d77a788 100644 --- a/template/extensions/context.py.jinja-base +++ b/template/extensions/context.py.jinja-base @@ -2,7 +2,7 @@ from typing import Any from typing import override -from copier_templates_extensions import ContextHook +from copier_template_extensions import ContextHook class ContextUpdater(ContextHook): @@ -18,7 +18,7 @@ class ContextUpdater(ContextHook): context["pytest_randomly_version"] = "{{ pytest_randomly_version }}" context["pytest_cov_version"] = "{{ pytest_cov_version }}" context["copier_version"] = "{{ copier_version }}" - context["copier_templates_extension_version"] = "{{ copier_templates_extension_version }}" + context["copier_template_extensions_version"] = "{{ copier_template_extensions_version }}" context["sphinx_version"] = "{{ sphinx_version }}" context["pulumi_version"] = "{{ pulumi_version }}" context["pulumi_aws_version"] = "{{ pulumi_aws_version }}" diff --git a/template/pyproject.toml.jinja-base b/template/pyproject.toml.jinja-base index ff253bd8..c0d74bab 100644 --- a/template/pyproject.toml.jinja-base +++ b/template/pyproject.toml.jinja-base @@ -11,7 +11,7 @@ dependencies = [ "pytest-randomly>={% endraw %}{{ pytest_randomly_version }}{% raw %}", "pyright[nodejs]>={% endraw %}{{ pyright_version }}{% raw %}", "copier>={% endraw %}{{ copier_version }}{% raw %}", - "copier-templates-extensions>={% endraw %}{{ copier_templates_extension_version }}{% raw %}" + "copier-template-extensions>={% endraw %}{{ copier_template_extension_version }}{% raw %}" # Specific to this template diff --git a/uv.lock b/uv.lock index c41d3f8f..0aba9f11 100644 --- a/uv.lock +++ b/uv.lock @@ -22,7 +22,7 @@ wheels = [ [[package]] name = "copier" -version = "9.7.1" +version = "9.8.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "colorama" }, @@ -39,9 +39,9 @@ dependencies = [ { name = "pyyaml" }, { name = "questionary" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/08/ac/4d8fc462d06dcd25d35b0e8983b5a7466d82a8d8fa50c17f616d1fa65ee8/copier-9.7.1.tar.gz", hash = "sha256:83da2cbe5e28a1593c649f5dac37d916774b07a3ba3ce66e6966a3e84e557885", size = 606482, upload-time = "2025-04-23T15:47:49.904Z" } +sdist = { url = "https://files.pythonhosted.org/packages/9d/78/1246b4a1ddeb404037f76efedab9b42ada4e6ba56c574d8846e2a6b8f498/copier-9.8.0.tar.gz", hash = "sha256:343ac1eb65e678aa355690d7f19869ef07cabf837f511a87ed452443c085ec58", size = 579353, upload-time = "2025-07-07T18:47:03.803Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/83/df/36f3fa22894a3d74bc847732614f697f70b149c783b5a5020f45ed7a7ace/copier-9.7.1-py3-none-any.whl", hash = "sha256:89f2a3f3f9134af35a7d4e2aa63b6468dbff18d82c8369f995b126de9faf0f08", size = 54456, upload-time = "2025-04-23T15:47:48.229Z" }, + { url = "https://files.pythonhosted.org/packages/4f/ed/839c91ff365f24756c90189e07f9de226d2e37cbc03c635f5d16d45d79cb/copier-9.8.0-py3-none-any.whl", hash = "sha256:ca0bee47f198b66cec926c4f1a3aa77f11ee0102624369c10e42ca9058c0a891", size = 55744, upload-time = "2025-07-07T18:47:01.905Z" }, ] [[package]] @@ -50,7 +50,7 @@ version = "0.1.0" source = { virtual = "." } dependencies = [ { name = "copier" }, - { name = "copier-templates-extensions" }, + { name = "copier-template-extensions" }, { name = "pyright", extra = ["nodejs"] }, { name = "pytest" }, { name = "pytest-cov" }, @@ -59,8 +59,8 @@ dependencies = [ [package.metadata] requires-dist = [ - { name = "copier", specifier = ">=9.7.1" }, - { name = "copier-templates-extensions", specifier = ">=0.3.1" }, + { name = "copier", specifier = ">=9.8.0" }, + { name = "copier-template-extensions", specifier = ">=0.3.2" }, { name = "pyright", extras = ["nodejs"], specifier = ">=1.1.403" }, { name = "pytest", specifier = ">=8.4.0" }, { name = "pytest-cov", specifier = ">=6.2.1" }, @@ -68,15 +68,15 @@ requires-dist = [ ] [[package]] -name = "copier-templates-extensions" -version = "0.3.1" +name = "copier-template-extensions" +version = "0.3.3" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "copier" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/f2/c4/1827fa1457401eea9c2665423a552614dbe13c1341587b48aa379c928405/copier_templates_extensions-0.3.1.tar.gz", hash = "sha256:f604f6dc58814204b79aa0697d919b94077b28942595d2fa0a20e4d94b6890a6", size = 34921, upload-time = "2025-03-10T13:06:14.715Z" } +sdist = { url = "https://files.pythonhosted.org/packages/8a/47/1a6638b4323a9eba2f19f4b1364bd77fcdb2b525a1c1cccb1f73422ff97e/copier_template_extensions-0.3.3.tar.gz", hash = "sha256:86bd5e2e89c94b6f9321e4078781b4456c5658b820bcae49ac60fd1e1dd23c10", size = 34991, upload-time = "2025-07-15T10:40:41.309Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/eb/a7/85c6ac6e91d80eede4683fa7dda285cf77720ac0f567680a24322249d810/copier_templates_extensions-0.3.1-py3-none-any.whl", hash = "sha256:d0834ecacaaeef84f81e745fd8fdcd519cb0731ddb5bd45bc0129633c717f5e2", size = 9355, upload-time = "2025-03-10T13:06:13.572Z" }, + { url = "https://files.pythonhosted.org/packages/c6/da/117372469b9bb1555ae7f8a0b1f3e00345044e6006c50f3f6d3cb20c9843/copier_template_extensions-0.3.3-py3-none-any.whl", hash = "sha256:bf6bbdebada26132640d6e1128723fa1ff7eb59d008de07a7543c51e0facb0ea", size = 9893, upload-time = "2025-07-15T10:40:39.928Z" }, ] [[package]] From 20efea3e1b649f006807abcd3f54b21e0ae83229 Mon Sep 17 00:00:00 2001 From: Eli Fine Date: Sun, 27 Jul 2025 10:52:09 +0000 Subject: [PATCH 03/10] bump more versions --- extensions/context.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/context.py b/extensions/context.py index bdda5440..628d888b 100644 --- a/extensions/context.py +++ b/extensions/context.py @@ -20,12 +20,12 @@ def hook(self, context: dict[Any, Any]) -> dict[Any, Any]: context["pnpm_version"] = "10.13.1" # These are duplicated in the pyproject.toml of this repository context["pyright_version"] = "1.1.403" - context["pytest_version"] = "8.4.0" + context["pytest_version"] = "8.4.1" context["pytest_randomly_version"] = "3.16.0" context["pytest_cov_version"] = "6.2.1" ####### context["sphinx_version"] = "8.1.3" - context["pulumi_version"] = "3.181.0" + context["pulumi_version"] = "3.186.0" context["pulumi_aws_version"] = "6.83.0" context["pulumi_aws_native_version"] = "1.30.0" context["pulumi_command_version"] = "1.1.0" From 7ccfcbaa08c4be5075e4e307698e71c812456403 Mon Sep 17 00:00:00 2001 From: Eli Fine Date: Sun, 27 Jul 2025 10:52:37 +0000 Subject: [PATCH 04/10] more versions --- extensions/context.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/extensions/context.py b/extensions/context.py index 628d888b..26922c35 100644 --- a/extensions/context.py +++ b/extensions/context.py @@ -26,12 +26,12 @@ def hook(self, context: dict[Any, Any]) -> dict[Any, Any]: ####### context["sphinx_version"] = "8.1.3" context["pulumi_version"] = "3.186.0" - context["pulumi_aws_version"] = "6.83.0" - context["pulumi_aws_native_version"] = "1.30.0" + context["pulumi_aws_version"] = "7.1.0" + context["pulumi_aws_native_version"] = "1.31.0" context["pulumi_command_version"] = "1.1.0" - context["pulumi_github_version"] = "6.7.2" + context["pulumi_github_version"] = "6.7.3" context["pulumi_okta_version"] = "4.20.0" - context["boto3_version"] = "1.38.38" + context["boto3_version"] = "1.39.14" context["ephemeral_pulumi_deploy_version"] = "0.0.4" context["pydantic_version"] = "2.11.7" context["pyinstaller_version"] = "6.13.0" From d433a50997cb090a27088aad7785602c975b80c0 Mon Sep 17 00:00:00 2001 From: Eli Fine Date: Sun, 27 Jul 2025 10:53:04 +0000 Subject: [PATCH 05/10] more readme --- README.md | 2 +- template/README.md.jinja-base | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9b2b8abe..9ebbcaef 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ 1. Delete all files currently in the repository. Optional...but makes it easiest to avoid git conflicts. 1. Run copier to instantiate the template: `copier copy --trust gh:LabAutomationAndScreening/copier-base-template.git .` 1. Run `uv lock` to generate the lock file -1. Stages all files to prepare for commit (`git add .`) +1. Stage all files to prepare for commit (`git add .`) 1. Run `python3 .github/workflows/hash_git_files.py . --for-devcontainer-config-update` to update the hash for your devcontainer file 1. Commit the changes (optional) 1. Rebuild your new devcontainer diff --git a/template/README.md.jinja-base b/template/README.md.jinja-base index 563727a2..7dbecb3b 100644 --- a/template/README.md.jinja-base +++ b/template/README.md.jinja-base @@ -11,6 +11,7 @@ To create a new repository using this template: 1. Delete all files currently in the repository. Optional...but makes it easiest to avoid git conflicts. 1. Run copier to instantiate the template: `copier copy --trust gh:{% endraw %}{{ repo_org_name }}/{{ repo_name }}{% raw %}.git .` 1. Run `uv lock` to generate the lock file +1. Stage all files to prepare for commit (`git add .`) 1. Run `python3 .github/workflows/hash_git_files.py . --for-devcontainer-config-update` to update the hash for your devcontainer file 1. Commit the changes (optional) 1. Rebuild your new devcontainer From 280885d40880930b0692f19cca3f3931c14d50b5 Mon Sep 17 00:00:00 2001 From: Eli Fine Date: Sun, 27 Jul 2025 10:57:30 +0000 Subject: [PATCH 06/10] add s --- template/pyproject.toml.jinja-base | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template/pyproject.toml.jinja-base b/template/pyproject.toml.jinja-base index c0d74bab..163db50e 100644 --- a/template/pyproject.toml.jinja-base +++ b/template/pyproject.toml.jinja-base @@ -11,7 +11,7 @@ dependencies = [ "pytest-randomly>={% endraw %}{{ pytest_randomly_version }}{% raw %}", "pyright[nodejs]>={% endraw %}{{ pyright_version }}{% raw %}", "copier>={% endraw %}{{ copier_version }}{% raw %}", - "copier-template-extensions>={% endraw %}{{ copier_template_extension_version }}{% raw %}" + "copier-template-extensions>={% endraw %}{{ copier_template_extensions_version }}{% raw %}" # Specific to this template From f86faa12dc30b5fcdde6d4ca2e86053f3a33954e Mon Sep 17 00:00:00 2001 From: Eli Fine Date: Sun, 27 Jul 2025 11:00:12 +0000 Subject: [PATCH 07/10] remove extra space --- template/.github/workflows/pre-commit.yaml.jinja-base | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template/.github/workflows/pre-commit.yaml.jinja-base b/template/.github/workflows/pre-commit.yaml.jinja-base index b43623dc..36e332bb 100644 --- a/template/.github/workflows/pre-commit.yaml.jinja-base +++ b/template/.github/workflows/pre-commit.yaml.jinja-base @@ -39,7 +39,7 @@ jobs: if: ${{ github.event_name != 'push' }} uses: actions/checkout@{% endraw %}{{ gha_checkout }}{% raw %} - - name: Install latest versions of packages + - name: Install latest versions of packages uses: ./.github/actions/install_deps with: python-version: ${{ inputs.python-version }} From 9ca93bf9b9871de67edc8bb3bb2bb1f1ca948f6e Mon Sep 17 00:00:00 2001 From: Eli Fine Date: Sun, 27 Jul 2025 11:05:06 +0000 Subject: [PATCH 08/10] remove s --- copier.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/copier.yaml b/copier.yaml index 206ae141..526d26e6 100644 --- a/copier.yaml +++ b/copier.yaml @@ -67,5 +67,5 @@ _exclude: # adapted from https://github.com/copier-org/copier-templates-extensions#context-hook-extension _jinja_extensions: -- copier_templates_extensions.TemplateExtensionLoader +- copier_template_extensions.TemplateExtensionLoader - extensions/context.py:ContextUpdater From d08a8efc41ea1805ba01d58746f9b91b0f8cc007 Mon Sep 17 00:00:00 2001 From: Eli Fine Date: Sun, 27 Jul 2025 11:07:37 +0000 Subject: [PATCH 09/10] More s removal --- extensions/context.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/context.py b/extensions/context.py index 26922c35..873c6b05 100644 --- a/extensions/context.py +++ b/extensions/context.py @@ -2,7 +2,7 @@ from typing import Any from typing import override -from copier_templates_extensions import ContextHook +from copier_template_extensions import ContextHook class ContextUpdater(ContextHook): From 815b177ef8d6675a02c36a13a09e6993adf88237 Mon Sep 17 00:00:00 2001 From: Eli Fine Date: Sun, 27 Jul 2025 11:08:19 +0000 Subject: [PATCH 10/10] and more s --- copier.yaml | 2 +- extensions/context.py | 2 +- template/extensions/context.py.jinja-base | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/copier.yaml b/copier.yaml index 526d26e6..259f43e0 100644 --- a/copier.yaml +++ b/copier.yaml @@ -65,7 +65,7 @@ _templates_suffix: .jinja-base _exclude: - "copier.yaml" -# adapted from https://github.com/copier-org/copier-templates-extensions#context-hook-extension +# adapted from https://github.com/copier-org/copier-template-extensions#context-hook-extension _jinja_extensions: - copier_template_extensions.TemplateExtensionLoader - extensions/context.py:ContextUpdater diff --git a/extensions/context.py b/extensions/context.py index 873c6b05..00fd586f 100644 --- a/extensions/context.py +++ b/extensions/context.py @@ -1,4 +1,4 @@ -# adapted from https://github.com/copier-org/copier-templates-extensions#context-hook-extension +# adapted from https://github.com/copier-org/copier-template-extensions#context-hook-extension from typing import Any from typing import override diff --git a/template/extensions/context.py.jinja-base b/template/extensions/context.py.jinja-base index 5d77a788..af391517 100644 --- a/template/extensions/context.py.jinja-base +++ b/template/extensions/context.py.jinja-base @@ -1,4 +1,4 @@ -{% raw %}# adapted from https://github.com/copier-org/copier-templates-extensions#context-hook-extension +{% raw %}# adapted from https://github.com/copier-org/copier-template-extensions#context-hook-extension from typing import Any from typing import override