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 .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Changes here will be overwritten by Copier
_commit: v0.0.57
_commit: v0.0.60
_src_path: gh:LabAutomationAndScreening/copier-base-template.git
description: Copier template for creating Python libraries and executables
python_ci_versions:
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,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): 01ec0f62 # spellchecker:disable-line
// Devcontainer context hash (do not manually edit this, it's managed by a pre-commit hook): 2b781a57 # spellchecker:disable-line
}
10 changes: 5 additions & 5 deletions .devcontainer/install-ci-tooling.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
import tempfile
from pathlib import Path

UV_VERSION = "0.7.12"
PNPM_VERSION = "10.13.1"
COPIER_VERSION = "9.7.1"
COPIER_TEMPLATES_EXTENSION_VERSION = "0.3.1"
UV_VERSION = "0.8.3"
PNPM_VERSION = "10.14.0"
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"
INSTALL_SSM_PLUGIN_BY_DEFAULT = False
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
4 changes: 2 additions & 2 deletions .devcontainer/manual-setup-deps.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ def main():
is_windows = platform.system() == "Windows"
uv_env = dict(os.environ)
uv_env.update({"UV_PYTHON_PREFERENCE": "only-system", "UV_PYTHON": args.python_version})
skip_check_lock = args.skip_check_lock
if skip_check_lock and args.optionally_check_lock:
skip_check_lock = args.skip_check_lock or args.optionally_check_lock
if args.skip_check_lock and args.optionally_check_lock:
print("Cannot skip and optionally check the lock file at the same time.")
sys.exit(1)

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pre-commit.yaml
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@v4.2.2

- 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
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ To create a new repository using this template:
1. Inside that devcontainer, run `python .devcontainer/install-ci-tooling.py` to install necessary tooling to instantiate the template (you can copy/paste the script from this
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-python-package-template.git .`
1. Run `uv lock` to generate the lock file
1. Run `python .devcontainer/manual-setup-deps.py --optionally-check-lock` to generate the lock file(s)
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.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ _templates_suffix: .jinja
_exclude:
- "copier.yml"

# 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
36 changes: 19 additions & 17 deletions extensions/context.py
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
# 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):
update = False

@override
def hook(self, context: dict[Any, Any]) -> dict[Any, Any]:
context["uv_version"] = "0.7.12"
context["pnpm_version"] = "10.13.1"
context["uv_version"] = "0.8.3"
context["pnpm_version"] = "10.14.0"
context["pre_commit_version"] = "4.2.0"
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["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["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 All @@ -36,12 +36,14 @@ def hook(self, context: dict[Any, Any]) -> dict[Any, Any]:
context["uvicorn_version"] = "0.35.0"
context["lab_auto_pulumi_version"] = "0.1.15"

context["nuxt_ui_version"] = "^3.1.2"
context["nuxt_version"] = "^3.17.3"
context["nuxt_ui_version"] = "^3.3.0"
context["nuxt_version"] = "^3.18.0"
context["typescript_version"] = "^5.8.2"
context["vue_version"] = "^3.5.13"
context["vue_router_version"] = "^4.5.0"
context["faker_version"] = "^9.8.0"
context["dot_env_cli_version"] = "^9.0.0"
context["playwright_version"] = "^1.52.0"
context["vue_version"] = "^3.5.18"
context["vue_router_version"] = "^4.5.1"
context["faker_version"] = "^9.9.0"
context["graphql_codegen_cli_version"] = "^5.0.5"
context["graphql_codegen_typescript_version"] = "^4.1.6"

Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ readme = "README.md"
requires-python = ">=3.12.7"
dependencies = [
# Managed by upstream template
"pytest>=8.4.0",
"pytest>=8.4.1",
"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"

# Specific to this template

Expand Down
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
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
4 changes: 2 additions & 2 deletions template/.devcontainer/manual-setup-deps.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ def main():
is_windows = platform.system() == "Windows"
uv_env = dict(os.environ)
uv_env.update({"UV_PYTHON_PREFERENCE": "only-system", "UV_PYTHON": args.python_version})
skip_check_lock = args.skip_check_lock
if skip_check_lock and args.optionally_check_lock:
skip_check_lock = args.skip_check_lock or args.optionally_check_lock
Copy link

Copilot AI Aug 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The logic change here appears incorrect. The original code assigned args.skip_check_lock to skip_check_lock, but now it's args.skip_check_lock or args.optionally_check_lock. This means if args.optionally_check_lock is True, skip_check_lock will be True, which could bypass lock file checking when it shouldn't be bypassed.

Suggested change
skip_check_lock = args.skip_check_lock or args.optionally_check_lock
skip_check_lock = args.skip_check_lock

Copilot uses AI. Check for mistakes.
if args.skip_check_lock and args.optionally_check_lock:
print("Cannot skip and optionally check the lock file at the same time.")
sys.exit(1)

Expand Down
3 changes: 3 additions & 0 deletions template/.github/dependabot.yml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ updates:
time: "16:00"
open-pull-requests-limit: 5
ignore:
- dependency-name: "*"
update-types:
- "version-update:semver-patch" # we don't want to be bothered with patch updates for anything except security updates
- dependency-name: "boto3" # boto3 gets patch updates way too frequently and they're usually not important
update-types:
- "version-update:semver-patch"
Expand Down
2 changes: 1 addition & 1 deletion template/.github/workflows/pre-commit.yaml
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@v4.2.2

- 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/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
22 changes: 11 additions & 11 deletions uv.lock

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