Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
8 changes: 4 additions & 4 deletions .devcontainer/install-ci-tooling.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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. 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
Expand Down
4 changes: 2 additions & 2 deletions copier.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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_templates_extensions.TemplateExtensionLoader
- copier_template_extensions.TemplateExtensionLoader
- extensions/context.py:ContextUpdater
22 changes: 11 additions & 11 deletions extensions/context.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# 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

from copier_templates_extensions import ContextHook
from copier_template_extensions import ContextHook


class ContextUpdater(ContextHook):
Expand All @@ -11,27 +11,27 @@ 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
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_aws_version"] = "6.83.0"
context["pulumi_aws_native_version"] = "1.30.0"
context["pulumi_version"] = "3.186.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"
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
1 change: 1 addition & 0 deletions ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions template/.devcontainer/install-ci-tooling.py.jinja-base
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion template/.github/workflows/pre-commit.yaml.jinja-base
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
1 change: 1 addition & 0 deletions template/README.md.jinja-base
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions template/extensions/context.py.jinja-base
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{% 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

from copier_templates_extensions import ContextHook
from copier_template_extensions import ContextHook


class ContextUpdater(ContextHook):
Expand All @@ -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 }}"
Expand Down
2 changes: 1 addition & 1 deletion template/pyproject.toml.jinja-base
Original file line number Diff line number Diff line change
Expand Up @@ -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_extensions_version }}{% raw %}"

# Specific to this template

Expand Down
20 changes: 10 additions & 10 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.