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
4 changes: 2 additions & 2 deletions .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.63
_commit: v0.0.64
_src_path: gh:LabAutomationAndScreening/copier-base-template.git
description: Copier template for creating Python libraries and executables
python_ci_versions:
Expand All @@ -9,7 +9,7 @@ python_version: 3.12.7
repo_name: copier-python-package-template
repo_org_name: LabAutomationAndScreening
ssh_port_number: 55874
template_might_want_to_install_aws_ssm_port_forwarding_plugin: false
template_might_want_to_install_aws_ssm_port_forwarding_plugin: true
template_uses_javascript: false
template_uses_pulumi: false
template_uses_python: true
Expand Down
6 changes: 3 additions & 3 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"ms-python.python@2025.7.2025051401",
"ms-python.vscode-pylance@2025.4.104",
"ms-vscode-remote.remote-containers@0.414.0",
"charliermarsh.ruff@2025.22.0",
"charliermarsh.ruff@2025.24.0",

// Misc file formats
"bierner.markdown-mermaid@1.28.0",
Expand All @@ -50,7 +50,7 @@
},
"ruff.nativeServer": "on",
// TODO: see if there's a way to specify different configurations for different folders
"ruff.configuration": "${workspaceFolder}/ruff-test.toml", // use the test configuration since it's less restrictive and won't show false positives and underline things
"ruff.configuration": "/workspaces/copier-python-package-template/ruff-test.toml", // use the test configuration since it's less restrictive and won't show false positives and underline things
"[jsonc][json][javascript][typescript][graphql][css][scss][html][vue]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
Expand All @@ -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): 68bd5592 # spellchecker:disable-line
// Devcontainer context hash (do not manually edit this, it's managed by a pre-commit hook): d72f90f7 # spellchecker:disable-line
}
4 changes: 2 additions & 2 deletions .devcontainer/install-ci-tooling.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@

UV_VERSION = "0.8.4"
PNPM_VERSION = "10.14.0"
COPIER_VERSION = "9.8.0"
COPIER_VERSION = "9.9.1"
COPIER_TEMPLATE_EXTENSIONS_VERSION = "0.3.2"
PRE_COMMIT_VERSION = "4.2.0"
PRE_COMMIT_VERSION = "4.3.0"
GITHUB_WINDOWS_RUNNER_BIN_PATH = r"C:\Users\runneradmin\.local\bin"
INSTALL_SSM_PLUGIN_BY_DEFAULT = False
parser = argparse.ArgumentParser(description="Install CI tooling for the repo")
Expand Down
17 changes: 10 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
minimum_pre_commit_version: 4.0.1
minimum_pre_commit_version: 4.2.0
# run `pre-commit autoupdate --freeze` to update all hooks
default_install_hook_types: [pre-commit, post-checkout]
repos:
Expand Down Expand Up @@ -42,7 +42,7 @@ repos:

# Reformatting (should generally come before any file format or other checks, because reformatting can change things)
- repo: https://github.com/crate-ci/typos
rev: 392b78fe18a52790c53f42456e46124f77346842 # frozen: v1.34.0
rev: 7fb6e0951ad91e4772a2470012fc1ae621016b80 # frozen: v1
hooks:
- id: typos
exclude:
Expand All @@ -53,13 +53,14 @@ repos:
.*\.umd.js|
)$
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: cef0300fd0fc4d2a87a85fa2093c6b283ea36f4b # frozen: v5.0.0
rev: 3e8a8703264a2f4a69428a0aa4dcb512790b2c8c # frozen: v6.0.0
hooks:
- id: trailing-whitespace
exclude:
|
(?x)^(
.*/vendor_files/.*|
.*tests/.*/__snapshots__/.*|
)$
- id: end-of-file-fixer
# the XML formatter hook doesn't leave a blank line at the end, so excluding XML files from this hook to avoid conflicts
Expand All @@ -72,6 +73,7 @@ repos:
template/template/.copier-answers.yml.jinja|
template/.copier-answers.yml.jinja|
.*generated/graphql.ts|
.*tests/.*/__snapshots__/.*|
.devcontainer/devcontainer-lock.json|
.copier-answers.yml|
.*\.xml|
Expand All @@ -86,6 +88,7 @@ repos:
.*pyrightconfig.json|
.*tsconfig.json|
.*biome.jsonc|
.*tests/.*/__snapshots__/.*|
.*/vendor_files/.*|
)$
args: [--autofix, --no-sort-keys]
Expand Down Expand Up @@ -151,7 +154,7 @@ repos:

# Invalid File Checks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: cef0300fd0fc4d2a87a85fa2093c6b283ea36f4b # frozen: v5.0.0
rev: 3e8a8703264a2f4a69428a0aa4dcb512790b2c8c # frozen: v6.0.0
hooks:
- id: check-added-large-files
args: ["--maxkb=123"]
Expand Down Expand Up @@ -201,7 +204,7 @@ repos:

# Safety/Security Issues
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: cef0300fd0fc4d2a87a85fa2093c6b283ea36f4b # frozen: v5.0.0
rev: 3e8a8703264a2f4a69428a0aa4dcb512790b2c8c # frozen: v6.0.0
hooks:
- id: detect-private-key

Expand All @@ -223,7 +226,7 @@ repos:
description: Runs hadolint to lint Dockerfiles

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 3d44372123ca5e8617fdb65d9f11facd159b9e95 # frozen: v0.12.3
rev: 54a455f7ce629598b7535ff828fd5fb796f4b83f # frozen: v0.12.9
hooks:
- id: ruff
name: ruff-src
Expand All @@ -236,7 +239,7 @@ repos:
- id: ruff-format

- repo: https://github.com/pylint-dev/pylint
rev: f798a4a3508bcbb8ad0773ae14bf32d28dcfdcbe # frozen: v3.3.7
rev: 98942ba4126a6fe1657bad77027bcc11016d16da # frozen: v3.3.8
hooks:
- id: pylint
name: pylint
Expand Down
8 changes: 6 additions & 2 deletions copier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ use_windows_in_ci:
help: Should CI in the instantiated template also use Windows runners?
default: no

install_aws_ssm_port_forwarding_plugin:
type: bool
help: Should the AWS SSM Port Forwarding Plugin be installed?
default: no

python_version:
type: str
Expand All @@ -53,13 +57,13 @@ python_ci_versions:
aws_identity_center_id:
type: str
help: What's the ID of your Organization's AWS Identity center, e.g. d-9145c20053?
when: "{{ python_package_registry == 'AWS CodeArtifact' }}"
when: "{{ python_package_registry == 'AWS CodeArtifact' or install_aws_ssm_port_forwarding_plugin }}"

aws_org_home_region:
type: str
help: What is the home region of the AWS Organization (where all of the central infrastructure is deployed)?
default: us-east-1
when: "{{ python_package_registry == 'AWS CodeArtifact' }}"
when: "{{ python_package_registry == 'AWS CodeArtifact' or install_aws_ssm_port_forwarding_plugin }}"

aws_central_infrastructure_account_id:
type: str
Expand Down
6 changes: 3 additions & 3 deletions extensions/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ class ContextUpdater(ContextHook):
def hook(self, context: dict[Any, Any]) -> dict[Any, Any]:
context["uv_version"] = "0.8.4"
context["pnpm_version"] = "10.14.0"
context["pre_commit_version"] = "4.2.0"
context["pre_commit_version"] = "4.3.0"
context["pyright_version"] = "1.1.403"
context["pytest_version"] = "8.4.1"
context["pytest_randomly_version"] = "3.16.0"
context["pytest_cov_version"] = "6.2.1"
context["copier_version"] = "9.8.0"
context["copier_version"] = "9.9.1"
context["copier_template_extensions_version"] = "0.3.2"
context["sphinx_version"] = "8.1.3"
context["pulumi_version"] = "3.189.0"
context["pulumi_version"] = "3.190.0"
context["pulumi_aws_version"] = "7.4.0"
context["pulumi_aws_native_version"] = "1.32.0"
context["pulumi_command_version"] = "1.1.0"
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ dependencies = [
"pytest-cov>=6.2.1",
"pytest-randomly>=3.16.0",
"pyright[nodejs]>=1.1.403",
"copier>=9.8.0",
"copier>=9.9.1",
"copier-template-extensions>=0.3.2"

# Specific to this template
Expand Down
4 changes: 2 additions & 2 deletions template/.devcontainer/devcontainer.json.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"ms-python.python@2025.7.2025051401",
"ms-python.vscode-pylance@2025.4.104",
"ms-vscode-remote.remote-containers@0.414.0",
"charliermarsh.ruff@2025.22.0",
"charliermarsh.ruff@2025.24.0",
{% endraw %}{% if is_child_of_copier_base_template is not defined and template_uses_vuejs is defined and template_uses_vuejs is sameas(true) %}{% raw %}
// VueJS
"vue.volar@2.2.8",
Expand All @@ -63,7 +63,7 @@
},
"ruff.nativeServer": "on",
// TODO: see if there's a way to specify different configurations for different folders
"ruff.configuration": "${workspaceFolder}/ruff-test.toml", // use the test configuration since it's less restrictive and won't show false positives and underline things
"ruff.configuration": "/workspaces/{% endraw %}{{ repo_name }}{% raw %}/ruff-test.toml", // use the test configuration since it's less restrictive and won't show false positives and underline things
"[jsonc][json][javascript][typescript][graphql][css][scss][html][vue]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
Expand Down
17 changes: 10 additions & 7 deletions template/.pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
minimum_pre_commit_version: 4.0.1
minimum_pre_commit_version: 4.2.0
# run `pre-commit autoupdate --freeze` to update all hooks
default_install_hook_types: [pre-commit, post-checkout]
repos:
Expand Down Expand Up @@ -42,7 +42,7 @@ repos:

# Reformatting (should generally come before any file format or other checks, because reformatting can change things)
- repo: https://github.com/crate-ci/typos
rev: 392b78fe18a52790c53f42456e46124f77346842 # frozen: v1.34.0
rev: 7fb6e0951ad91e4772a2470012fc1ae621016b80 # frozen: v1
Copy link

Copilot AI Aug 19, 2025

Choose a reason for hiding this comment

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

The version comment says 'v1' but this appears to be a commit hash for a more specific version. Consider updating the comment to reflect the actual version being frozen.

Suggested change
rev: 7fb6e0951ad91e4772a2470012fc1ae621016b80 # frozen: v1
rev: 7fb6e0951ad91e4772a2470012fc1ae621016b80 # frozen: v1.16.20

Copilot uses AI. Check for mistakes.
hooks:
- id: typos
exclude:
Expand All @@ -53,13 +53,14 @@ repos:
.*\.umd.js|
)$
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: cef0300fd0fc4d2a87a85fa2093c6b283ea36f4b # frozen: v5.0.0
rev: 3e8a8703264a2f4a69428a0aa4dcb512790b2c8c # frozen: v6.0.0
hooks:
- id: trailing-whitespace
exclude:
|
(?x)^(
.*/vendor_files/.*|
.*tests/.*/__snapshots__/.*|
)$
- id: end-of-file-fixer
# the XML formatter hook doesn't leave a blank line at the end, so excluding XML files from this hook to avoid conflicts
Expand All @@ -72,6 +73,7 @@ repos:
template/template/.copier-answers.yml.jinja|
template/.copier-answers.yml.jinja|
.*generated/graphql.ts|
.*tests/.*/__snapshots__/.*|
.devcontainer/devcontainer-lock.json|
.copier-answers.yml|
.*\.xml|
Expand All @@ -86,6 +88,7 @@ repos:
.*pyrightconfig.json|
.*tsconfig.json|
.*biome.jsonc|
.*tests/.*/__snapshots__/.*|
.*/vendor_files/.*|
)$
args: [--autofix, --no-sort-keys]
Expand Down Expand Up @@ -151,7 +154,7 @@ repos:

# Invalid File Checks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: cef0300fd0fc4d2a87a85fa2093c6b283ea36f4b # frozen: v5.0.0
rev: 3e8a8703264a2f4a69428a0aa4dcb512790b2c8c # frozen: v6.0.0
hooks:
- id: check-added-large-files
args: ["--maxkb=123"]
Expand Down Expand Up @@ -201,7 +204,7 @@ repos:

# Safety/Security Issues
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: cef0300fd0fc4d2a87a85fa2093c6b283ea36f4b # frozen: v5.0.0
rev: 3e8a8703264a2f4a69428a0aa4dcb512790b2c8c # frozen: v6.0.0
hooks:
- id: detect-private-key

Expand All @@ -223,7 +226,7 @@ repos:
description: Runs hadolint to lint Dockerfiles

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 3d44372123ca5e8617fdb65d9f11facd159b9e95 # frozen: v0.12.3
rev: 54a455f7ce629598b7535ff828fd5fb796f4b83f # frozen: v0.12.9
hooks:
- id: ruff
name: ruff-src
Expand All @@ -236,7 +239,7 @@ repos:
- id: ruff-format

- repo: https://github.com/pylint-dev/pylint
rev: f798a4a3508bcbb8ad0773ae14bf32d28dcfdcbe # frozen: v3.3.7
rev: 98942ba4126a6fe1657bad77027bcc11016d16da # frozen: v3.3.8
hooks:
- id: pylint
name: pylint
Expand Down
2 changes: 1 addition & 1 deletion tests/copier_data/data1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ is_open_source: true
description: Doing amazing things
ssh_port_number: 12345
use_windows_in_ci: false

install_aws_ssm_port_forwarding_plugin: true


python_package_registry: PyPI
Expand Down
2 changes: 1 addition & 1 deletion tests/copier_data/data2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ is_open_source: false
description: Doing crazy things! So many things!
ssh_port_number: 54321
use_windows_in_ci: true

install_aws_ssm_port_forwarding_plugin: false


python_package_registry: AWS CodeArtifact
Expand Down
5 changes: 2 additions & 3 deletions tests/copier_data/data3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,16 @@ is_open_source: true
description: Doing amazing things
ssh_port_number: 12345
use_windows_in_ci: false
install_aws_ssm_port_forwarding_plugin: false


python_package_registry: PyPI
aws_identity_center_id: d-9145c20053
aws_org_home_region: us-west-2
aws_production_account_id: 123456789012
use_staging_environment: false
aws_region_for_stack: us-east-2


# Data added based on the specifics of this template

python_ci_versions:
- 3.12.7
package_name: foo-bar
Expand Down
Loading