Skip to content

Commit d0f4449

Browse files
authored
Publish patch (#49)
## Why is this change necessary? In CI, when installing from the pypi testing registry, project sub-dependencies weren't always there ## How does this change address the issue? Added the main PyPI registry as backup ## What side effects does this change have? None ## How is this change tested? Isn't ## Other Pulled in some upstream template updates
1 parent e4faf55 commit d0f4449

File tree

11 files changed

+111
-46
lines changed

11 files changed

+111
-46
lines changed

.copier-answers.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Changes here will be overwritten by Copier
2-
_commit: v0.0.49
2+
_commit: v0.0.55
33
_src_path: gh:LabAutomationAndScreening/copier-base-template.git
44
description: Copier template for creating Python libraries and executables
55
python_ci_versions:

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,5 +61,5 @@
6161
"initializeCommand": "sh .devcontainer/initialize-command.sh",
6262
"onCreateCommand": "sh .devcontainer/on-create-command.sh",
6363
"postStartCommand": "sh .devcontainer/post-start-command.sh"
64-
// Devcontainer context hash (do not manually edit this, it's managed by a pre-commit hook): dfcd01a5 # spellchecker:disable-line
64+
// Devcontainer context hash (do not manually edit this, it's managed by a pre-commit hook): 6ebb97a5 # spellchecker:disable-line
6565
}

.devcontainer/install-ci-tooling.py

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,16 @@
44
import shutil
55
import subprocess
66
import sys
7+
import tempfile
8+
from pathlib import Path
79

8-
UV_VERSION = "0.7.8"
9-
PNPM_VERSION = "10.11.0"
10+
UV_VERSION = "0.7.12"
11+
PNPM_VERSION = "10.12.1"
1012
COPIER_VERSION = "9.7.1"
1113
COPIER_TEMPLATES_EXTENSION_VERSION = "0.3.1"
1214
PRE_COMMIT_VERSION = "4.2.0"
1315
GITHUB_WINDOWS_RUNNER_BIN_PATH = r"C:\Users\runneradmin\.local\bin"
16+
INSTALL_SSM_PLUGIN_BY_DEFAULT = False
1417
parser = argparse.ArgumentParser(description="Install CI tooling for the repo")
1518
_ = parser.add_argument(
1619
"--no-python",
@@ -27,6 +30,12 @@
2730
_ = parser.add_argument(
2831
"--no-node", action="store_true", default=False, help="Do not process any environments using node package managers"
2932
)
33+
_ = parser.add_argument(
34+
"--install-ssm-plugin",
35+
action="store_true",
36+
default=INSTALL_SSM_PLUGIN_BY_DEFAULT,
37+
help="Install the SSM plugin for AWS CLI",
38+
)
3039

3140

3241
def main():
@@ -108,6 +117,30 @@ def main():
108117
else [cmd]
109118
)
110119
_ = subprocess.run(cmd, shell=True, check=True)
120+
if args.install_ssm_plugin:
121+
if is_windows:
122+
raise NotImplementedError("SSM plugin installation is not implemented for Windows")
123+
with tempfile.TemporaryDirectory() as tmp_dir:
124+
local_package_path = Path(tmp_dir) / "session-manager-plugin.deb"
125+
# Based on https://docs.aws.amazon.com/systems-manager/latest/userguide/install-plugin-debian-and-ubuntu.html
126+
# no specific reason for that version, just pinning it for best practice
127+
_ = subprocess.run(
128+
[
129+
"curl",
130+
"https://s3.amazonaws.com/session-manager-downloads/plugin/1.2.707.0/ubuntu_64bit/session-manager-plugin.deb",
131+
"-o",
132+
f"{local_package_path}",
133+
],
134+
check=True,
135+
)
136+
_ = subprocess.run(
137+
["sudo", "dpkg", "-i", str(local_package_path)],
138+
check=True,
139+
)
140+
_ = subprocess.run(
141+
["session-manager-plugin", "--version"],
142+
check=True,
143+
)
111144

112145

113146
if __name__ == "__main__":

.github/dependabot.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,7 @@ updates:
2222
dependency-type: "production"
2323
update-types:
2424
- "minor"
25-
- "patch"
2625
dev-dependencies:
2726
dependency-type: "development"
2827
update-types:
2928
- "minor"
30-
- "patch"

extensions/context.py

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,38 +10,38 @@ class ContextUpdater(ContextHook):
1010

1111
@override
1212
def hook(self, context: dict[Any, Any]) -> dict[Any, Any]:
13-
context["uv_version"] = "0.7.8"
14-
context["pnpm_version"] = "10.11.0"
13+
context["uv_version"] = "0.7.12"
14+
context["pnpm_version"] = "10.12.1"
1515
context["pre_commit_version"] = "4.2.0"
16-
context["pyright_version"] = "1.1.400"
17-
context["pytest_version"] = "8.3.5"
16+
context["pyright_version"] = "1.1.402"
17+
context["pytest_version"] = "8.4.0"
1818
context["pytest_randomly_version"] = "3.16.0"
19-
context["pytest_cov_version"] = "6.1.1"
19+
context["pytest_cov_version"] = "6.2.1"
2020
context["copier_version"] = "9.7.1"
2121
context["copier_templates_extension_version"] = "0.3.1"
2222
context["sphinx_version"] = "8.1.3"
23-
context["pulumi_version"] = "3.171.0"
24-
context["pulumi_aws_version"] = "6.81.0"
25-
context["pulumi_aws_native_version"] = "1.27.0"
23+
context["pulumi_version"] = "3.177.0"
24+
context["pulumi_aws_version"] = "6.83.0"
25+
context["pulumi_aws_native_version"] = "1.30.0"
2626
context["pulumi_command_version"] = "1.1.0"
2727
context["pulumi_github_version"] = "6.7.2"
28-
context["pulumi_okta_version"] = "4.18.0"
29-
context["boto3_version"] = "1.38.18"
28+
context["pulumi_okta_version"] = "4.20.0"
29+
context["boto3_version"] = "1.38.38"
3030
context["ephemeral_pulumi_deploy_version"] = "0.0.4"
3131
context["pydantic_version"] = "2.11.5"
3232
context["pyinstaller_version"] = "6.13.0"
3333
context["setuptools_version"] = "80.7.1"
3434
context["strawberry_graphql_version"] = "0.270.4"
3535
context["fastapi_version"] = "0.115.12"
3636
context["uvicorn_version"] = "0.34.2"
37-
context["lab_auto_pulumi_version"] = "0.1.12"
37+
context["lab_auto_pulumi_version"] = "0.1.14"
3838

3939
context["nuxt_ui_version"] = "^3.1.2"
4040
context["nuxt_version"] = "^3.17.3"
4141
context["typescript_version"] = "^5.8.2"
4242
context["vue_version"] = "^3.5.13"
4343
context["vue_router_version"] = "^4.5.0"
44-
context["faker_version"] = "^9.7.0"
44+
context["faker_version"] = "^9.8.0"
4545
context["graphql_codegen_cli_version"] = "^5.0.5"
4646
context["graphql_codegen_typescript_version"] = "^4.1.6"
4747

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

7171
context["debian_release_name"] = "bookworm"
72-
context["alpine_image_version"] = "3.20"
72+
context["alpine_image_version"] = "3.21"
73+
context["nginx_image_version"] = "1.28.0"
7374

7475
# Kludge to be able to help symlinked jinja files in the child and grandchild templates
7576
context["template_uses_vuejs"] = False

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ readme = "README.md"
66
requires-python = ">=3.12.7"
77
dependencies = [
88
# Managed by upstream template
9-
"pytest>=8.3.5",
10-
"pytest-cov>=6.1.1",
9+
"pytest>=8.4.0",
10+
"pytest-cov>=6.2.1",
1111
"pytest-randomly>=3.16.0",
12-
"pyright[nodejs]==1.1.400", # temporarily pin due to bug in 1.1.401 https://github.com/microsoft/pyright/issues/10487
12+
"pyright[nodejs]>=1.1.402",
1313
"copier>=9.7.1",
1414
"copier-templates-extensions>=0.3.1"
1515

template/.devcontainer/install-ci-tooling.py renamed to template/.devcontainer/install-ci-tooling.py.jinja

Lines changed: 40 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
1-
import argparse
1+
{% raw %}import argparse
22
import os
33
import platform
44
import shutil
55
import subprocess
66
import sys
7+
import tempfile
8+
from pathlib import Path
79

8-
UV_VERSION = "0.7.8"
9-
PNPM_VERSION = "10.11.0"
10-
COPIER_VERSION = "9.7.1"
11-
COPIER_TEMPLATES_EXTENSION_VERSION = "0.3.1"
12-
PRE_COMMIT_VERSION = "4.2.0"
10+
UV_VERSION = "{% endraw %}{{ uv_version }}{% raw %}"
11+
PNPM_VERSION = "{% endraw %}{{ pnpm_version }}{% raw %}"
12+
COPIER_VERSION = "{% endraw %}{{ copier_version }}{% raw %}"
13+
COPIER_TEMPLATES_EXTENSION_VERSION = "{% endraw %}{{ copier_templates_extension_version }}{% raw %}"
14+
PRE_COMMIT_VERSION = "{% endraw %}{{ pre_commit_version }}{% raw %}"
1315
GITHUB_WINDOWS_RUNNER_BIN_PATH = r"C:\Users\runneradmin\.local\bin"
16+
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 %}
1417
parser = argparse.ArgumentParser(description="Install CI tooling for the repo")
1518
_ = parser.add_argument(
1619
"--no-python",
@@ -27,6 +30,12 @@
2730
_ = parser.add_argument(
2831
"--no-node", action="store_true", default=False, help="Do not process any environments using node package managers"
2932
)
33+
_ = parser.add_argument(
34+
"--install-ssm-plugin",
35+
action="store_true",
36+
default=INSTALL_SSM_PLUGIN_BY_DEFAULT,
37+
help="Install the SSM plugin for AWS CLI",
38+
)
3039

3140

3241
def main():
@@ -108,7 +117,31 @@ def main():
108117
else [cmd]
109118
)
110119
_ = subprocess.run(cmd, shell=True, check=True)
120+
if args.install_ssm_plugin:
121+
if is_windows:
122+
raise NotImplementedError("SSM plugin installation is not implemented for Windows")
123+
with tempfile.TemporaryDirectory() as tmp_dir:
124+
local_package_path = Path(tmp_dir) / "session-manager-plugin.deb"
125+
# Based on https://docs.aws.amazon.com/systems-manager/latest/userguide/install-plugin-debian-and-ubuntu.html
126+
# no specific reason for that version, just pinning it for best practice
127+
_ = subprocess.run(
128+
[
129+
"curl",
130+
"https://s3.amazonaws.com/session-manager-downloads/plugin/1.2.707.0/ubuntu_64bit/session-manager-plugin.deb",
131+
"-o",
132+
f"{local_package_path}",
133+
],
134+
check=True,
135+
)
136+
_ = subprocess.run(
137+
["sudo", "dpkg", "-i", str(local_package_path)],
138+
check=True,
139+
)
140+
_ = subprocess.run(
141+
["session-manager-plugin", "--version"],
142+
check=True,
143+
)
111144

112145

113146
if __name__ == "__main__":
114-
main()
147+
main(){% endraw %}

template/.github/dependabot.yml.jinja

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,7 @@ updates:
2222
dependency-type: "production"
2323
update-types:
2424
- "minor"
25-
- "patch"
2625
dev-dependencies:
2726
dependency-type: "development"
2827
update-types:
29-
- "minor"
30-
- "patch"{% endraw %}
28+
- "minor"{% endraw %}

template/.github/workflows/publish.yaml.jinja

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ jobs:
164164
with:
165165
time: 60s{% endraw %}{% endif %}{% raw %}
166166
- name: Install from staging registry
167-
run: pip install -i https://test.pypi.org/simple/ {% endraw %}{{ package_name | replace('_', '-') }}{% raw %}==${{ needs.get-values.outputs.package-version }}
167+
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 }}
168168
- name: Confirm library can be imported successfully
169169
run: python -c "import {% endraw %}{{ package_name | replace('-', '_') }}{% raw %}"
170170

template/pyproject.toml.jinja

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ dev = [
2525

2626

2727
# Managed by upstream template
28-
"pyright=={% endraw %}{{ pyright_version }}{% raw %}", # temporarily pin due to bug in 1.1.401 https://github.com/microsoft/pyright/issues/10487
28+
"pyright>={% endraw %}{{ pyright_version }}{% raw %}",
2929
"pytest>={% endraw %}{{ pytest_version }}{% raw %}",
3030
"pytest-cov>={% endraw %}{{ pytest_cov_version }}{% raw %}",
3131
"pytest-randomly>={% endraw %}{{ pytest_randomly_version }}{% raw %}",

0 commit comments

Comments
 (0)