Skip to content

Commit ad7c56b

Browse files
authored
Copier update (pre-commit bumps) (#71)
Pull in upstream template changes <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Clarified install instructions on where to source and place the setup script. * **Chores** * Upgraded developer tooling versions (uv, pnpm, Pulumi, FastAPI, Uvicorn, and frontend utilities). * Hardened installer with timeouts and retry logic. * Added JSON Schema checks for GitHub workflows; broadened Prettier exclusions. * Updated lint settings to ignore docstrings for magic methods. * Disabled credential persistence in checkout steps across workflows and updated tagging action version. * Added optional debugging to display full GitHub context. * Adjusted security tooling to ignore a benign template-injection case. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent 85d995b commit ad7c56b

File tree

18 files changed

+80
-22
lines changed

18 files changed

+80
-22
lines changed

.copier-answers.yml

Lines changed: 2 additions & 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.71
2+
_commit: v0.0.73
33
_src_path: gh:LabAutomationAndScreening/copier-base-template.git
44
description: Copier template for creating Python libraries and executables
55
python_ci_versions:
@@ -8,6 +8,7 @@ python_ci_versions:
88
python_version: 3.12.7
99
repo_name: copier-python-package-template
1010
repo_org_name: LabAutomationAndScreening
11+
repo_org_name_for_copyright: Lab Automation & Screening
1112
ssh_port_number: 55874
1213
template_might_want_to_install_aws_ssm_port_forwarding_plugin: true
1314
template_uses_javascript: false

.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): 86b774f4 # spellchecker:disable-line
64+
// Devcontainer context hash (do not manually edit this, it's managed by a pre-commit hook): a57008fa # spellchecker:disable-line
6565
}

.devcontainer/install-ci-tooling.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
import tempfile
88
from pathlib import Path
99

10-
UV_VERSION = "0.8.17"
11-
PNPM_VERSION = "10.16.1"
10+
UV_VERSION = "0.8.19"
11+
PNPM_VERSION = "10.17.1"
1212
COPIER_VERSION = "9.10.2"
1313
COPIER_TEMPLATE_EXTENSIONS_VERSION = "0.3.3"
1414
PRE_COMMIT_VERSION = "4.3.0"
@@ -65,7 +65,7 @@ def main():
6565
)
6666
else:
6767
_ = subprocess.run(
68-
f"curl -fsSL https://astral.sh/uv/{UV_VERSION}/install.sh | sh",
68+
f"curl -fsSL --connect-timeout 20 --max-time 40 --retry 3 --retry-delay 5 --retry-connrefused --proto '=https' https://astral.sh/uv/{UV_VERSION}/install.sh | sh",
6969
check=True,
7070
shell=True,
7171
env=uv_env,

.github/reusable_workflows/build-docker-image.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ jobs:
6666

6767
- name: Checkout code
6868
uses: actions/[email protected]
69+
with:
70+
persist-credentials: false
6971

7072
- name: OIDC Auth for ECR
7173
if: ${{ inputs.push-role-name != 'no-push' }}

.github/workflows/ci.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ jobs:
5454
steps:
5555
- name: Checkout code
5656
uses: actions/[email protected]
57+
with:
58+
persist-credentials: false
5759

5860
- name: Move python script that replaces private package registry information to temp folder so it doesn't get deleted
5961
run: |

.github/workflows/get-values.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,13 @@ jobs:
2424
dependabot-commit-created: ${{ steps.update-hash.outputs.commit-created }}
2525
pr-short-num: ${{ steps.find-pr-num.outputs.number }}
2626
steps:
27+
- name: Display full GitHub context
28+
run: echo '${{ toJSON(github) }}'
29+
2730
- name: Checkout code
2831
uses: actions/[email protected]
32+
with:
33+
persist-credentials: false
2934

3035
- name: Update Devcontainer Hash
3136
if: ${{ github.actor == 'dependabot[bot]' && github.event_name == 'push' }}

.github/workflows/pre-commit.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,13 @@ jobs:
3535
uses: actions/[email protected]
3636
with:
3737
ref: ${{ github.ref_name }} # explicitly get the head of the branch, which will include any new commits pushed if this is a dependabot branch
38+
persist-credentials: false
3839

3940
- name: Checkout code not during push
4041
if: ${{ github.event_name != 'push' }}
4142
uses: actions/[email protected]
43+
with:
44+
persist-credentials: false
4245

4346
- name: Install latest versions of packages
4447
uses: ./.github/actions/install_deps

.github/workflows/tag-on-merge.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ jobs:
1717
with:
1818
ref: ${{ github.event.pull_request.merge_commit_sha }}
1919
fetch-depth: '0'
20+
persist-credentials: false
2021
- name: Bump version and push tag
21-
uses: mathieudutour/[email protected]
22+
uses: mathieudutour/github-tag-action@a22cf08638b34d5badda920f9daf6e72c477b07b # v6.2
2223
with:
2324
github_token: ${{ secrets.GITHUB_TOKEN }}

.github/zizmor.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
rules:
2+
template-injection:
3+
ignore:
4+
# this is just echo-ing out the github context to be visible for debugging, it's not executing commands
5+
- get-values.yaml:28

.pre-commit-config.yaml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ repos:
102102
.*pyrightconfig\.json|
103103
)$
104104
105-
- repo: https://github.com/pre-commit/mirrors-prettier # TODO: switch to a different approach...this was archived in 2024
106-
rev: f12edd9c7be1c20cfa42420fd0e6df71e42b51ea # frozen: v4.0.0-alpha.8
105+
- repo: https://github.com/rbubley/mirrors-prettier
106+
rev: 5ba47274f9b181bce26a5150a725577f3c336011 # frozen: v3.6.2
107107
hooks:
108108
- id: prettier
109109
# TODO: get template YAML and MD files more in line with prettier expectations so we can start using prettier on those too
@@ -125,6 +125,7 @@ repos:
125125
.*/vendor_files/.*|
126126
.*/schema.graphql|
127127
.*generated/graphql.ts|
128+
template/.*|
128129
)$
129130
files: (.*.json)|(.*.ts)|(.*.jsx)|(.*.tsx)|(.*.yaml)|(.*.yml)|(.*.md)|(.*.html)|(.*.css)|(.*.scss)|(.*.less)|(.*.vue)|(.*.graphql)|(.*.gql)
130131

@@ -178,6 +179,11 @@ repos:
178179
- id: check-merge-conflict
179180
- id: check-case-conflict
180181

182+
- repo: https://github.com/python-jsonschema/check-jsonschema
183+
rev: 83987cd6ad8943c7f029b500b14aaf82c00a01fa # frozen: 0.34.0
184+
hooks:
185+
- id: check-github-workflows
186+
181187
- repo: https://github.com/maresb/check-json5
182188
rev: 893a2b5a0a27c3540bd8fcafe2968ccc05237179 # 1.0
183189
hooks:
@@ -205,6 +211,11 @@ repos:
205211
hooks:
206212
- id: detect-private-key
207213

214+
# - repo: https://github.com/woodruffw/zizmor-pre-commit # TODO: implement this: https://github.com/LabAutomationAndScreening/copier-base-template/issues/95
215+
# rev: b933184438555436e38621f46ceb0c417cbed400 # frozen: v1.13.0
216+
# hooks:
217+
# - id: zizmor
218+
208219
# Linting
209220

210221
- repo: https://github.com/Lucas-C/pre-commit-hooks-markup
@@ -215,15 +226,15 @@ repos:
215226
exclude: docs/.*\.rst$
216227

217228
- repo: https://github.com/hadolint/hadolint
218-
rev: 87de847754330ad47ae16bdfe2d1a757ccb4b4d4 # frozen: v2.13.1
229+
rev: 4e697ba704fd23b2409b947a319c19c3ee54d24f # frozen: v2.14.0
219230
hooks:
220231
- id: hadolint-docker
221232
name: Lint Dockerfiles
222233
exclude: .*\.jinja$
223234
description: Runs hadolint to lint Dockerfiles
224235

225236
- repo: https://github.com/astral-sh/ruff-pre-commit
226-
rev: 13a6bda8ea7612b3aec844ded16569d424b9a1ab # frozen: v0.13.0
237+
rev: a113f03edeabb71305f025e6e14bd2cd68660e29 # frozen: v0.13.1
227238
hooks:
228239
- id: ruff
229240
name: ruff-src

0 commit comments

Comments
 (0)