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.49
_commit: v0.0.55
_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): dfcd01a5 # spellchecker:disable-line
// Devcontainer context hash (do not manually edit this, it's managed by a pre-commit hook): 6ebb97a5 # spellchecker:disable-line
}
37 changes: 35 additions & 2 deletions .devcontainer/install-ci-tooling.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@
import shutil
import subprocess
import sys
import tempfile
from pathlib import Path

UV_VERSION = "0.7.8"
PNPM_VERSION = "10.11.0"
UV_VERSION = "0.7.12"
PNPM_VERSION = "10.12.1"
COPIER_VERSION = "9.7.1"
COPIER_TEMPLATES_EXTENSION_VERSION = "0.3.1"
PRE_COMMIT_VERSION = "4.2.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")
_ = parser.add_argument(
"--no-python",
Expand All @@ -27,6 +30,12 @@
_ = parser.add_argument(
"--no-node", action="store_true", default=False, help="Do not process any environments using node package managers"
)
_ = parser.add_argument(
"--install-ssm-plugin",
action="store_true",
default=INSTALL_SSM_PLUGIN_BY_DEFAULT,
help="Install the SSM plugin for AWS CLI",
)


def main():
Expand Down Expand Up @@ -108,6 +117,30 @@ def main():
else [cmd]
)
_ = subprocess.run(cmd, shell=True, check=True)
if args.install_ssm_plugin:
if is_windows:
raise NotImplementedError("SSM plugin installation is not implemented for Windows")
with tempfile.TemporaryDirectory() as tmp_dir:
local_package_path = Path(tmp_dir) / "session-manager-plugin.deb"
# Based on https://docs.aws.amazon.com/systems-manager/latest/userguide/install-plugin-debian-and-ubuntu.html
# no specific reason for that version, just pinning it for best practice
_ = subprocess.run(
[
"curl",
"https://s3.amazonaws.com/session-manager-downloads/plugin/1.2.707.0/ubuntu_64bit/session-manager-plugin.deb",
"-o",
f"{local_package_path}",
],
check=True,
)
_ = subprocess.run(
["sudo", "dpkg", "-i", str(local_package_path)],
check=True,
)
_ = subprocess.run(
["session-manager-plugin", "--version"],
check=True,
)


if __name__ == "__main__":
Expand Down
2 changes: 0 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@ updates:
dependency-type: "production"
update-types:
- "minor"
- "patch"
dev-dependencies:
dependency-type: "development"
update-types:
- "minor"
- "patch"
27 changes: 14 additions & 13 deletions extensions/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,38 +10,38 @@ class ContextUpdater(ContextHook):

@override
def hook(self, context: dict[Any, Any]) -> dict[Any, Any]:
context["uv_version"] = "0.7.8"
context["pnpm_version"] = "10.11.0"
context["uv_version"] = "0.7.12"
context["pnpm_version"] = "10.12.1"
context["pre_commit_version"] = "4.2.0"
context["pyright_version"] = "1.1.400"
context["pytest_version"] = "8.3.5"
context["pyright_version"] = "1.1.402"
context["pytest_version"] = "8.4.0"
context["pytest_randomly_version"] = "3.16.0"
context["pytest_cov_version"] = "6.1.1"
context["pytest_cov_version"] = "6.2.1"
context["copier_version"] = "9.7.1"
context["copier_templates_extension_version"] = "0.3.1"
context["sphinx_version"] = "8.1.3"
context["pulumi_version"] = "3.171.0"
context["pulumi_aws_version"] = "6.81.0"
context["pulumi_aws_native_version"] = "1.27.0"
context["pulumi_version"] = "3.177.0"
context["pulumi_aws_version"] = "6.83.0"
context["pulumi_aws_native_version"] = "1.30.0"
context["pulumi_command_version"] = "1.1.0"
context["pulumi_github_version"] = "6.7.2"
context["pulumi_okta_version"] = "4.18.0"
context["boto3_version"] = "1.38.18"
context["pulumi_okta_version"] = "4.20.0"
context["boto3_version"] = "1.38.38"
context["ephemeral_pulumi_deploy_version"] = "0.0.4"
context["pydantic_version"] = "2.11.5"
context["pyinstaller_version"] = "6.13.0"
context["setuptools_version"] = "80.7.1"
context["strawberry_graphql_version"] = "0.270.4"
context["fastapi_version"] = "0.115.12"
context["uvicorn_version"] = "0.34.2"
context["lab_auto_pulumi_version"] = "0.1.12"
context["lab_auto_pulumi_version"] = "0.1.14"

context["nuxt_ui_version"] = "^3.1.2"
context["nuxt_version"] = "^3.17.3"
context["typescript_version"] = "^5.8.2"
context["vue_version"] = "^3.5.13"
context["vue_router_version"] = "^4.5.0"
context["faker_version"] = "^9.7.0"
context["faker_version"] = "^9.8.0"
context["graphql_codegen_cli_version"] = "^5.0.5"
context["graphql_codegen_typescript_version"] = "^4.1.6"

Expand Down Expand Up @@ -69,7 +69,8 @@ def hook(self, context: dict[Any, Any]) -> dict[Any, Any]:
context["py313_version"] = "3.13.2"

context["debian_release_name"] = "bookworm"
context["alpine_image_version"] = "3.20"
context["alpine_image_version"] = "3.21"
context["nginx_image_version"] = "1.28.0"

# Kludge to be able to help symlinked jinja files in the child and grandchild templates
context["template_uses_vuejs"] = False
Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ readme = "README.md"
requires-python = ">=3.12.7"
dependencies = [
# Managed by upstream template
"pytest>=8.3.5",
"pytest-cov>=6.1.1",
"pytest>=8.4.0",
"pytest-cov>=6.2.1",
"pytest-randomly>=3.16.0",
"pyright[nodejs]==1.1.400", # temporarily pin due to bug in 1.1.401 https://github.com/microsoft/pyright/issues/10487
"pyright[nodejs]>=1.1.402",
"copier>=9.7.1",
"copier-templates-extensions>=0.3.1"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
import argparse
{% raw %}import argparse
import os
import platform
import shutil
import subprocess
import sys
import tempfile
from pathlib import Path

UV_VERSION = "0.7.8"
PNPM_VERSION = "10.11.0"
COPIER_VERSION = "9.7.1"
COPIER_TEMPLATES_EXTENSION_VERSION = "0.3.1"
PRE_COMMIT_VERSION = "4.2.0"
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 %}"
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 %}
parser = argparse.ArgumentParser(description="Install CI tooling for the repo")
_ = parser.add_argument(
"--no-python",
Expand All @@ -27,6 +30,12 @@
_ = parser.add_argument(
"--no-node", action="store_true", default=False, help="Do not process any environments using node package managers"
)
_ = parser.add_argument(
"--install-ssm-plugin",
action="store_true",
default=INSTALL_SSM_PLUGIN_BY_DEFAULT,
help="Install the SSM plugin for AWS CLI",
)


def main():
Expand Down Expand Up @@ -108,7 +117,31 @@ def main():
else [cmd]
)
_ = subprocess.run(cmd, shell=True, check=True)
if args.install_ssm_plugin:
if is_windows:
raise NotImplementedError("SSM plugin installation is not implemented for Windows")
with tempfile.TemporaryDirectory() as tmp_dir:
local_package_path = Path(tmp_dir) / "session-manager-plugin.deb"
# Based on https://docs.aws.amazon.com/systems-manager/latest/userguide/install-plugin-debian-and-ubuntu.html
# no specific reason for that version, just pinning it for best practice
_ = subprocess.run(
[
"curl",
"https://s3.amazonaws.com/session-manager-downloads/plugin/1.2.707.0/ubuntu_64bit/session-manager-plugin.deb",
"-o",
f"{local_package_path}",
],
check=True,
)
_ = subprocess.run(
["sudo", "dpkg", "-i", str(local_package_path)],
check=True,
)
_ = subprocess.run(
["session-manager-plugin", "--version"],
check=True,
)


if __name__ == "__main__":
main()
main(){% endraw %}
4 changes: 1 addition & 3 deletions template/.github/dependabot.yml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@ updates:
dependency-type: "production"
update-types:
- "minor"
- "patch"
dev-dependencies:
dependency-type: "development"
update-types:
- "minor"
- "patch"{% endraw %}
- "minor"{% endraw %}
2 changes: 1 addition & 1 deletion template/.github/workflows/publish.yaml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ jobs:
with:
time: 60s{% endraw %}{% endif %}{% raw %}
- name: Install from staging registry
run: pip install -i https://test.pypi.org/simple/ {% endraw %}{{ package_name | replace('_', '-') }}{% raw %}==${{ needs.get-values.outputs.package-version }}
run: pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://www.pypi.org/simple {% endraw %}{{ package_name | replace('_', '-') }}{% raw %}==${{ needs.get-values.outputs.package-version }}
- name: Confirm library can be imported successfully
run: python -c "import {% endraw %}{{ package_name | replace('-', '_') }}{% raw %}"

Expand Down
2 changes: 1 addition & 1 deletion template/pyproject.toml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ dev = [


# Managed by upstream template
"pyright=={% endraw %}{{ pyright_version }}{% raw %}", # temporarily pin due to bug in 1.1.401 https://github.com/microsoft/pyright/issues/10487
"pyright>={% endraw %}{{ pyright_version }}{% raw %}",
"pytest>={% endraw %}{{ pytest_version }}{% raw %}",
"pytest-cov>={% endraw %}{{ pytest_cov_version }}{% raw %}",
"pytest-randomly>={% endraw %}{{ pytest_randomly_version }}{% raw %}",
Expand Down
26 changes: 14 additions & 12 deletions uv.lock

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