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 .config/.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.1.7
_commit: v0.1.9
_src_path: gh:LabAutomationAndScreening/copier-base-template.git
copier_answers_directory: .config
description: Copier template for creating Python libraries and executables
Expand Down
8 changes: 4 additions & 4 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,17 @@
"extensions": [
// basic tooling
// "eamodio.gitlens@15.5.1",
"coderabbit.coderabbit-vscode@0.21.8",
"coderabbit.coderabbit-vscode@0.21.9",
"ms-vscode.live-server@0.5.2025051301",
"MS-vsliveshare.vsliveshare@1.0.5905",
"anthropic.claude-code@2.1.278",
"anthropic.claude-code@2.1.283",

// Python
"-ms-python.vscode-pylance", // pyrefly is the language server for this project; ms-python.python auto-installs Pylance via its extension pack, and Pylance then warns on every boot that it's disabled
"ms-python.python@2026.5.2026052901",
"meta.pyrefly@1.3.1",
"ms-vscode-remote.remote-containers@0.414.0",
"charliermarsh.ruff@2026.68.0",
"charliermarsh.ruff@2026.84.0",

// Misc file formats
"bierner.markdown-mermaid@1.29.0",
Expand Down Expand Up @@ -67,5 +67,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): 079f70d6 # spellchecker:disable-line
// Devcontainer context hash (do not manually edit this, it's managed by a pre-commit hook): 6950b8fc # spellchecker:disable-line
}
2 changes: 1 addition & 1 deletion .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ services:
REPO_NAME: copier-python-package-template
# You can run `devcontainer-info content-url` in codespaces to see what image base is
volumes:
- ..:/workspaces/copier-python-package-template:cached
- ..:${WORKSPACE_MOUNT_TARGET:-/workspaces/copier-python-package-template}
# Break out the venv folder as a separate docker volume for better performance on Windows hosts
- python_venv:/workspaces/copier-python-package-template/.venv
command: sleep infinity
Expand Down
9 changes: 9 additions & 0 deletions .devcontainer/initialize-command.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@ if [ -n "$CODESPACES" ] && [ "$CODESPACES" = "true" ]; then
docker image prune --all --force
fi

# "Clone Repository in Container Volume" runs this inside a bootstrap container that has the cloned volume mounted at /workspaces.
# The compose bind mount of `..` then points at a path the Docker host doesn't have, so it gets retargeted onto /workspaces where VS Code's own volume mount replaces it.
workspace_mount_type=$(docker inspect --format '{{range .Mounts}}{{if eq .Destination "/workspaces"}}{{.Type}}{{end}}{{end}}' "$HOSTNAME" 2>/dev/null || true)
if [ "$workspace_mount_type" = "volume" ]; then
echo "WORKSPACE_MOUNT_TARGET=/workspaces" > .devcontainer/.env
else
: > .devcontainer/.env
fi

# ============== WARNING ==============================================================================
# File is managed by copier template: gh:LabAutomationAndScreening/copier-base-template.git
# See .config/.copier-managed-files.json for details.
Expand Down
12 changes: 8 additions & 4 deletions .devcontainer/install-ci-tooling.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@
PNPM_VERSION = "12.4.2"
COPIER_VERSION = "==9.18.2"
COPIER_TEMPLATE_EXTENSIONS_VERSION = "==0.3.3"
PRE_COMMIT_VERSION = "4.6.2"
TASK_VERSION = "3.53.1"
PRE_COMMIT_VERSION = "==4.6.2"
# identify decides which files each pre-commit hook runs on, so a floating version silently changes what CI checks
IDENTIFY_VERSION = "==2.6.20"
TASK_VERSION = "==3.53.1"
DOWNLOAD_TIMEOUT_SECONDS = 90
# Where uv places both itself and the executables of the tools it installs. Resolves from USERPROFILE
# on Windows, so it matches the runner's home directory without assuming its user name. Already on
Expand Down Expand Up @@ -112,7 +114,7 @@ def install_task(uv_path: str, uv_env: dict[str, str], *, is_windows: bool) -> N
"""
LOCAL_BIN_DIR.mkdir(parents=True, exist_ok=True)
_ = subprocess.run( # noqa: S603 # this is all our own input
[uv_path, "tool", "install", f"go-task-bin=={TASK_VERSION}"],
[uv_path, "tool", "install", f"go-task-bin{TASK_VERSION}"],
check=True,
env=uv_env,
timeout=DOWNLOAD_TIMEOUT_SECONDS,
Expand Down Expand Up @@ -272,7 +274,9 @@ def main():
uv_path,
"tool",
"install",
f"pre-commit=={PRE_COMMIT_VERSION}",
f"pre-commit{PRE_COMMIT_VERSION}",
"--with",
f"identify{IDENTIFY_VERSION}",
],
check=True,
env=uv_env,
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -126,5 +126,7 @@ dist
# Devcontainer
# The devcontainer CLI writes this lock file to pin feature digests, but we are not using it yet
.devcontainer/devcontainer-lock.json
# Written by initialize-command.sh on every devcontainer start
.devcontainer/.env

# Ignores specific to this repository
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ repos:
.*/__snapshots__/.*|
.*/vendor_files/.*|
.*\.svg|
.*\.wxs| # formatter sorts attributes and joins multi-line ones, making the Windows installer files hard to read
)$

# Invalid File Checks
Expand Down
5 changes: 3 additions & 2 deletions extensions/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ def hook( # noqa: PLR0915 # yes, this is a lot of statements, but it's all just
context["pnpm_version"] = "12.4.2"
context["npm_version"] = "11.13.0"
context["nvm_version"] = "0.40.5"
context["pre_commit_version"] = "4.6.2"
context["task_version"] = "3.53.1"
context["pre_commit_version"] = "==4.6.2"
context["identify_version"] = "==2.6.20"
context["task_version"] = "==3.53.1"
context["pytest_version"] = ">=9.1.1"
context["pytest_randomly_version"] = ">=5.0.0"
context["pytest_cov_version"] = ">=7.1.0"
Expand Down
6 changes: 3 additions & 3 deletions template/.devcontainer/devcontainer.json.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,17 @@
"-AmazonWebServices.aws-toolkit-vscode", // the AWS CLI feature installs this automatically, but it's causing problems in VS Code{% endraw %}{% endif %}{% raw %}
// basic tooling
// "eamodio.gitlens@15.5.1",
"coderabbit.coderabbit-vscode@0.21.8",
"coderabbit.coderabbit-vscode@0.21.9",
"ms-vscode.live-server@0.5.2025051301",
"MS-vsliveshare.vsliveshare@1.0.5905",{% endraw %}{% if install_claude_cli %}{% raw %}
"anthropic.claude-code@2.1.278",{% endraw %}{% endif %}{% raw %}{% endraw %}{% if (is_child_of_copier_base_template is defined and is_child_of_copier_base_template is sameas(true)) or (is_child_of_copier_base_template is not defined and template_uses_python is defined and template_uses_python is sameas(true)) %}{% raw %}
"anthropic.claude-code@2.1.283",{% endraw %}{% endif %}{% raw %}{% endraw %}{% if (is_child_of_copier_base_template is defined and is_child_of_copier_base_template is sameas(true)) or (is_child_of_copier_base_template is not defined and template_uses_python is defined and template_uses_python is sameas(true)) %}{% raw %}

// Python
"-ms-python.vscode-pylance", // pyrefly is the language server for this project; ms-python.python auto-installs Pylance via its extension pack, and Pylance then warns on every boot that it's disabled
"ms-python.python@2026.5.2026052901",
"meta.pyrefly@1.3.1",
"ms-vscode-remote.remote-containers@0.414.0",
"charliermarsh.ruff@2026.68.0",{% endraw %}{% endif %}{% raw %}
"charliermarsh.ruff@2026.84.0",{% endraw %}{% endif %}{% raw %}
{% 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@3.2.5",
Expand Down
2 changes: 1 addition & 1 deletion template/.devcontainer/docker-compose.yml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
REPO_NAME: {% endraw %}{{ repo_name }}{% raw %}
# You can run `devcontainer-info content-url` in codespaces to see what image base is
volumes:
- ..:/workspaces/{% endraw %}{{ repo_name }}{% raw %}:cached
- ..:${WORKSPACE_MOUNT_TARGET:-/workspaces/{% endraw %}{{ repo_name }}{% raw %}}
# Break out the venv folder as a separate docker volume for better performance on Windows hosts
- python_venv:/workspaces/{% endraw %}{{ repo_name }}{% raw %}/.venv
command: sleep infinity
Expand Down
9 changes: 9 additions & 0 deletions template/.devcontainer/initialize-command.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@ if [ -n "$CODESPACES" ] && [ "$CODESPACES" = "true" ]; then
docker image prune --all --force
fi

# "Clone Repository in Container Volume" runs this inside a bootstrap container that has the cloned volume mounted at /workspaces.
# The compose bind mount of `..` then points at a path the Docker host doesn't have, so it gets retargeted onto /workspaces where VS Code's own volume mount replaces it.
workspace_mount_type=$(docker inspect --format '{{range .Mounts}}{{if eq .Destination "/workspaces"}}{{.Type}}{{end}}{{end}}' "$HOSTNAME" 2>/dev/null || true)
if [ "$workspace_mount_type" = "volume" ]; then
echo "WORKSPACE_MOUNT_TARGET=/workspaces" > .devcontainer/.env
else
: > .devcontainer/.env
fi

# ============== WARNING ==============================================================================
# File is managed by copier template: gh:LabAutomationAndScreening/copier-base-template.git
# See .config/.copier-managed-files.json for details.
Expand Down
8 changes: 6 additions & 2 deletions template/.devcontainer/install-ci-tooling.py.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ PNPM_VERSION = "{% endraw %}{{ pnpm_version }}{% raw %}"
COPIER_VERSION = "{% endraw %}{{ copier_version }}{% raw %}"
COPIER_TEMPLATE_EXTENSIONS_VERSION = "{% endraw %}{{ copier_template_extensions_version }}{% raw %}"
PRE_COMMIT_VERSION = "{% endraw %}{{ pre_commit_version }}{% raw %}"
# identify decides which files each pre-commit hook runs on, so a floating version silently changes what CI checks
IDENTIFY_VERSION = "{% endraw %}{{ identify_version }}{% raw %}"
TASK_VERSION = "{% endraw %}{{ task_version }}{% raw %}"
DOWNLOAD_TIMEOUT_SECONDS = 90
# Where uv places both itself and the executables of the tools it installs. Resolves from USERPROFILE
Expand Down Expand Up @@ -105,7 +107,7 @@ def install_task(uv_path: str, uv_env: dict[str, str], *, is_windows: bool) -> N
"""
LOCAL_BIN_DIR.mkdir(parents=True, exist_ok=True)
_ = subprocess.run( # noqa: S603 # this is all our own input
[uv_path, "tool", "install", f"go-task-bin=={TASK_VERSION}"],
[uv_path, "tool", "install", f"go-task-bin{TASK_VERSION}"],
check=True,
env=uv_env,
timeout=DOWNLOAD_TIMEOUT_SECONDS,
Expand Down Expand Up @@ -265,7 +267,9 @@ def main():
uv_path,
"tool",
"install",
f"pre-commit=={PRE_COMMIT_VERSION}",
f"pre-commit{PRE_COMMIT_VERSION}",
"--with",
f"identify{IDENTIFY_VERSION}",
],
check=True,
env=uv_env,
Expand Down
2 changes: 2 additions & 0 deletions template/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -126,5 +126,7 @@ dist
# Devcontainer
# The devcontainer CLI writes this lock file to pin feature digests, but we are not using it yet
.devcontainer/devcontainer-lock.json
# Written by initialize-command.sh on every devcontainer start
.devcontainer/.env

# Ignores specific to this repository
1 change: 1 addition & 0 deletions template/.pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ repos:
.*/__snapshots__/.*|
.*/vendor_files/.*|
.*\.svg|
.*\.wxs| # formatter sorts attributes and joins multi-line ones, making the Windows installer files hard to read
)$

# Invalid File Checks
Expand Down