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): 627a6cd3 # spellchecker:disable-line
// Devcontainer context hash (do not manually edit this, it's managed by a pre-commit hook): 77217583 # spellchecker:disable-line
}
2 changes: 1 addition & 1 deletion .devcontainer/install-ci-tooling.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import subprocess
import sys

UV_VERSION = "0.8.22"
UV_VERSION = "0.9.0"
COPIER_VERSION = "9.10.2"
COPIER_TEMPLATE_EXTENSIONS_VERSION = "0.3.3"
PRE_COMMIT_VERSION = "4.3.0"
Expand Down
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ pytest.log
tests/__coverage__
test/__coverage__
coverage-report-pytest
.pytest_cache/
.mypy_cache/
.coverage
.coverage.*
coverage.xml
Expand Down
2 changes: 2 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ repos:
.devcontainer/devcontainer-lock.json|
.copier-answers.yml|
.*\.xml|
.*\.svg|
.*/vendor_files/.*|
)$
- id: pretty-format-json
Expand Down Expand Up @@ -148,6 +149,7 @@ repos:
(?x)^(
.*/__snapshots__/.*|
.*/vendor_files/.*|
.*\.svg|
)$

# Invalid File Checks
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ By participating in this project, you agree to abide by our [Code of Conduct](./
1. **Fork the repository** on GitHub.

2. **Set up the Dev Container (Recommended Method)**
- Create a Github Codespace (`Code`->`Codespaces` in the Github web console of your cloned repository) OR click on the "Open in Devcontainer" link in the [Readme](./README.md)
- Create a GitHub Codespace (`Code`->`Codespaces` in the GitHub web console of your cloned repository) OR click on the "Open in Devcontainer" link in the [Readme](./README.md)

3. **Make Your Changes**
- Create a branch for your feature or bug fix:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
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 repo...and you can paste it in the root of the repo if you want)
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 `python .devcontainer/manual-setup-deps.py --only-create-lock` to generate the lock file(s)
1. Run `python .devcontainer/manual-setup-deps.py --only-create-lock --allow-uv-to-install-python` 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)
Expand Down
2 changes: 1 addition & 1 deletion _typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ extend-exclude = [
".copier-answers.yml", # this is an autogenerated file, and sometimes the commit sha gets confused as being a word
"**/__snapshots__/**", # Snapshots need to remain static
"**/tests/**/cassettes/**/*.yaml", # URLs and other responses in VCR.py generated files should not be altered
"**/vendor_files/**" # if vendors mispell things, there may be other implications in other parts of their code, just leave vendor files alone
"**/vendor_files/**" # if vendors misspell things, there may be other implications in other parts of their code, just leave vendor files alone
]
5 changes: 5 additions & 0 deletions copier.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ description:
type: str
help: What is this copier template used for?

install_claude_cli:
type: bool
help: Should the Claude CLI be installed in the devcontainer?
default: no

python_version:
type: str
help: What version of Python?
Expand Down
19 changes: 10 additions & 9 deletions extensions/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,29 +11,29 @@ 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.8.22"
context["uv_version"] = "0.9.0"
context["pre_commit_version"] = "4.3.0"
# These also in pyproject.toml
context["copier_version"] = "9.10.2"
context["copier_template_extensions_version"] = "0.3.3"
#######
context["pnpm_version"] = "10.17.1"
context["pnpm_version"] = "10.18.1"
# These are duplicated in the pyproject.toml of this repository
context["pyright_version"] = "1.1.405"
context["pyright_version"] = "1.1.406"
context["pytest_version"] = "8.4.2"
context["pytest_randomly_version"] = "4.0.1"
context["pytest_cov_version"] = "7.0.0"
#######
context["sphinx_version"] = "8.1.3"
context["pulumi_version"] = "3.197.0"
context["pulumi_aws_version"] = "7.7.0"
context["pulumi_aws_version"] = "7.8.0"
context["pulumi_aws_native_version"] = "1.33.0"
context["pulumi_command_version"] = "1.1.0"
context["pulumi_github_version"] = "6.7.3"
context["pulumi_okta_version"] = "5.2.0"
context["boto3_version"] = "1.40.41"
context["ephemeral_pulumi_deploy_version"] = "0.0.5"
context["pydantic_version"] = "2.11.7"
context["pydantic_version"] = "2.12.0"
context["pyinstaller_version"] = "6.16.0"
context["setuptools_version"] = "80.7.1"
context["strawberry_graphql_version"] = "0.282.0"
Expand All @@ -46,13 +46,13 @@ def hook(self, context: dict[Any, Any]) -> dict[Any, Any]:
context["uuid_utils_version"] = "0.11.0"
#######
context["node_version"] = "24.7.0"
context["nuxt_ui_version"] = "^4.0.0"
context["nuxt_ui_version"] = "^4.0.1"
context["nuxt_version"] = "^4.1.0"
context["nuxt_icon_version"] = "^2.0.0"
context["typescript_version"] = "^5.8.2"
context["typescript_version"] = "^5.9.3"
context["playwright_version"] = "^1.55.0"
context["vue_version"] = "^3.5.21"
context["vue_tsc_version"] = "^3.1.0"
context["vue_tsc_version"] = "^3.1.1"
context["vue_devtools_api_version"] = "^8.0.0"
context["vue_router_version"] = "^4.5.1"
context["dotenv_cli_version"] = "^10.0.0"
Expand All @@ -73,7 +73,8 @@ def hook(self, context: dict[Any, Any]) -> dict[Any, Any]:
context["nuxt_fonts_version"] = "^0.11.4"
context["nuxtjs_color_mode_version"] = "^3.5.2"
context["vue_test_utils_version"] = "^2.4.6"
context["nuxt_test_utils_version"] = "^3.17.2"
context["nuxt_test_utils_version"] = "3.19.1"
context["vue_eslint_parser_version"] = "^10.1.3"
#######
# These are duplicated in the CI files for this repository
context["gha_checkout"] = "v5.0.0"
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ dependencies = [
"pytest>=8.4.2",
"pytest-cov>=7.0.0",
"pytest-randomly>=4.0.1",
"pyright[nodejs]>=1.1.405",
"pyright[nodejs]>=1.1.406",
"copier>=9.10.2",
"copier-template-extensions>=0.3.3"
]
2 changes: 1 addition & 1 deletion ruff-test.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ ignore = [
"S101", # assert is definitely needed in test cases
"S311", # pseudo-randomness is fine for test cases
"TID252", # sometimes you can't use absolute imports in test cases for importing things within the tests, because they're not a true package or have conflicting namespaces
"TRY003", # tests dont need to create a custom exception classes, generally you want to throw an AssertionError with a message anyway
"TRY003", # tests don't need to create custom exception classes, generally you want to throw an AssertionError with a message anyway
]

unfixable = [
Expand Down
22 changes: 12 additions & 10 deletions template/.devcontainer/devcontainer.json.jinja-base
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,23 @@
"service": "devcontainer",
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
"features": {
"ghcr.io/devcontainers/features/aws-cli:1.1.1": {
"ghcr.io/devcontainers/features/aws-cli:1.1.2": {
// https://github.com/devcontainers/features/blob/main/src/aws-cli/devcontainer-feature.json
// view latest version https://raw.githubusercontent.com/aws/aws-cli/v2/CHANGELOG.rst
"version": "2.27.14"
"version": "2.31.11"
},
"ghcr.io/devcontainers/features/python:1.7.1": {
// https://github.com/devcontainers/features/blob/main/src/python/devcontainer-feature.json
"version": "{% endraw %}{{ python_version }}{% raw %}",
"installTools": false,
"optimize": true
}{% endraw %}{% if is_child_of_copier_base_template is not defined and template_uses_javascript is defined and template_uses_javascript is sameas(true) %}{% raw %},
"ghcr.io/devcontainers/features/node:1.6.1": {
"ghcr.io/devcontainers/features/node:1.6.3": {
// https://github.com/devcontainers/features/tree/main/src/node
"version": "{% endraw %}{{ node_version }}{% raw %}",
"pnpmVersion": "{% endraw %}{{ pnpm_version }}{% raw %}"
}{% endraw %}{% endif %}{% raw %}
}{% endraw %}{% endif %}{% raw %}{% endraw %}{% if install_claude_cli %}{% raw %},
"ghcr.io/anthropics/devcontainer-features/claude-code:1.0.5": {}{% endraw %}{% endif %}{% raw %}
},
"customizations": {
"vscode": {
Expand All @@ -28,14 +29,14 @@
"eamodio.gitlens@15.5.1",
"ms-vscode.live-server@0.5.2025051301",
"MS-vsliveshare.vsliveshare@1.0.5905",
"github.copilot@1.366.1775",
"github.copilot-chat@0.31.2025090401",
"github.copilot@1.378.1798",
"github.copilot-chat@0.32.2025100703",

// Python
"ms-python.python@2025.13.2025090201",
"ms-python.vscode-pylance@2025.7.102",
"ms-python.python@2025.17.2025100201",
"ms-python.vscode-pylance@2025.8.3",
"ms-vscode-remote.remote-containers@0.414.0",
"charliermarsh.ruff@2025.24.0",
"charliermarsh.ruff@2025.28.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@3.0.6",
Expand All @@ -49,7 +50,8 @@
"samuelcolvin.jinjahtml@0.20.0",
"tamasfe.even-better-toml@0.19.2",
"emilast.LogFileHighlighter@3.3.3",
"esbenp.prettier-vscode@11.0.0"
"esbenp.prettier-vscode@11.0.0"{% endraw %}{% if install_claude_cli %}{% raw %},
"anthropic.claude-code@2.0.10"{% endraw %}{% endif %}{% raw %}
],
"settings": {
"editor.accessibilitySupport": "off", // turn off sounds
Expand Down
3 changes: 2 additions & 1 deletion template/.devcontainer/docker-compose.yml.jinja-base
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
- "{% endraw %}{{ ssh_port_number }}{% raw %}:2222"
environment:
- AWS_PROFILE=localstack
- AWS_DEFAULT_REGION={% endraw %}{{ aws_region_for_stack if (aws_region_for_stack is defined and aws_region_for_stack != "") else "us-east-1" }}{% raw %}
- AWS_DEFAULT_REGION={% endraw %}{{ aws_region_for_stack if (aws_region_for_stack is defined and aws_region_for_stack != "") else "us-east-1" }}{% raw %}{% endraw %}{% if install_claude_cli %}{% raw %}
- ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY}{% endraw %}{% endif %}{% raw %}


volumes:
Expand Down
10 changes: 9 additions & 1 deletion template/.devcontainer/install-ci-tooling.py.jinja-base
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,21 @@ _ = parser.add_argument(
default=False,
help="Skip installing the SSM plugin for AWS CLI",
)
_ = parser.add_argument(
"--allow-uv-to-install-python",
action="store_true",
default=False,
help="Allow uv to install new versions of Python on the fly. This is typically only needed when instantiating the copier template.",
)


def main():
args = parser.parse_args(sys.argv[1:])
is_windows = platform.system() == "Windows"
uv_env = dict(os.environ)
uv_env.update({"UV_PYTHON_PREFERENCE": "only-system", "UV_PYTHON": args.python_version})
uv_env.update({"UV_PYTHON": args.python_version})
if not args.allow_uv_to_install_python:
uv_env.update({"UV_PYTHON_PREFERENCE": "only-system"})
uv_path = ((GITHUB_WINDOWS_RUNNER_BIN_PATH + "\\") if is_windows else "") + "uv"
if is_windows:
pwsh = shutil.which("pwsh") or shutil.which("powershell")
Expand Down
2 changes: 1 addition & 1 deletion template/README.md.jinja-base
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ 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 repo...and you can paste it in the root of the repo if you want)
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 `python .devcontainer/manual-setup-deps.py --only-create-lock` to generate the lock file(s)
1. Run `python .devcontainer/manual-setup-deps.py --only-create-lock --allow-uv-to-install-python` 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)
Expand Down
5 changes: 5 additions & 0 deletions template/copier.yml.jinja-base
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ description:
type: str
help: What is the description of this repository?

install_claude_cli:
type: bool
help: Should the Claude CLI be installed in the devcontainer?
default: no

is_open_source:
type: bool
help: Is this library open source?
Expand Down
1 change: 1 addition & 0 deletions template/extensions/context.py.jinja-base
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ class ContextUpdater(ContextHook):
context["nuxtjs_color_mode_version"] = "{{ nuxtjs_color_mode_version }}"
context["vue_test_utils_version"] = "{{ vue_test_utils_version }}"
context["nuxt_test_utils_version"] = "{{ nuxt_test_utils_version }}"
context["vue_eslint_parser_version"] = "{{ vue_eslint_parser_version }}"

context["gha_checkout"] = "{{ gha_checkout }}"
context["gha_setup_python"] = "{{ gha_setup_python }}"
Expand Down
1 change: 1 addition & 0 deletions template/tests/copier_data/data1.yaml.jinja-base
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ repo_name: the_best_repo
repo_org_name: great-company
is_open_source: true
description: Doing amazing things
install_claude_cli: false
ssh_port_number: 12345
use_windows_in_ci: false
{% endraw %}{% if template_might_want_to_install_aws_ssm_port_forwarding_plugin %}{% raw %}install_aws_ssm_port_forwarding_plugin: true{% endraw %}{% endif %}{% raw %}
Expand Down
1 change: 1 addition & 0 deletions template/tests/copier_data/data2.yaml.jinja-base
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ repo_name: another_repo
repo_org_name: initech
is_open_source: false
description: Doing crazy things! So many things!
install_claude_cli: true
ssh_port_number: 54321
use_windows_in_ci: true
{% endraw %}{% if template_might_want_to_install_aws_ssm_port_forwarding_plugin %}{% raw %}install_aws_ssm_port_forwarding_plugin: false{% endraw %}{% endif %}{% raw %}
Expand Down
1 change: 1 addition & 0 deletions tests/copier_data/data1.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
repo_name: the_best_repo
description: Doing amazing things
install_claude_cli: true
ssh_port_number: 12345
python_ci_versions:
- 3.13.2
Expand Down
1 change: 1 addition & 0 deletions tests/copier_data/data2.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
repo_name: another_repo
description: Doing terrible things!
install_claude_cli: false
ssh_port_number: 54321
python_ci_versions:
- "3.12.7"
Expand Down
8 changes: 4 additions & 4 deletions uv.lock

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