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.37
_commit: v0.0.38
_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 @@ -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): 53debcd8 # spellchecker:disable-line
// Devcontainer context hash (do not manually edit this, it's managed by a pre-commit hook): 5e3a0577 # spellchecker:disable-line
}
4 changes: 2 additions & 2 deletions .github/workflows/dependabot-post-update.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
jobs:
post-update:
if: ${{ github.actor == 'dependabot[bot]' }}
runs-on: ubuntu-latest
runs-on: ubuntu-24.04

steps:
- name: Checkout code
Expand All @@ -24,7 +24,7 @@ jobs:
git config user.email "github-actions[bot]@users.noreply.github.com"

- name: Update devcontainer hash
run: python3 .github/workflows/hash_git_files.py . --for-devcontainer-config-update
run: python3 .github/workflows/hash_git_files.py . --for-devcontainer-config-update --exit-zero

- name: Commit & push changes
run: |
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/hash_git_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ def main():
action="store_true",
help="Update the hash in the devcontainer.json file based on all files relevant to devcontainer context",
)
_ = parser.add_argument("--exit-zero", action="store_true", help="Exit with code 0 even if the hash changes")
Copy link

Copilot AI May 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] This addition duplicates functionality present in the template version of the script. If both copies are intended to remain synchronized, consider refactoring to reduce code duplication.

Copilot uses AI. Check for mistakes.
args = parser.parse_args()

repo_path = args.folder
Expand Down Expand Up @@ -170,7 +171,11 @@ def main():
print( # noqa: T201
f"Updated {devcontainer_json_file} with the new hash: {overall_checksum_str}"
)
sys.exit(1) # Exit with non-zero code to indicate changes were made
if args.exit_zero:
sys.exit(0)
else:
sys.exit(1)

else:
print(overall_checksum_str) # noqa: T201 # print this so that the value can be picked up via STDOUT when calling this in a CI pipeline or as a subprocess

Expand Down
4 changes: 2 additions & 2 deletions template/.github/workflows/dependabot-post-update.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
jobs:
post-update:
if: ${{ github.actor == 'dependabot[bot]' }}
runs-on: ubuntu-latest
runs-on: ubuntu-24.04

steps:
- name: Checkout code
Expand All @@ -24,7 +24,7 @@ jobs:
git config user.email "github-actions[bot]@users.noreply.github.com"

- name: Update devcontainer hash
run: python3 .github/workflows/hash_git_files.py . --for-devcontainer-config-update
run: python3 .github/workflows/hash_git_files.py . --for-devcontainer-config-update --exit-zero

- name: Commit & push changes
run: |
Expand Down
7 changes: 6 additions & 1 deletion template/.github/workflows/hash_git_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ def main():
action="store_true",
help="Update the hash in the devcontainer.json file based on all files relevant to devcontainer context",
)
_ = parser.add_argument("--exit-zero", action="store_true", help="Exit with code 0 even if the hash changes")
Copy link

Copilot AI May 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] This same addition appears in multiple locations. Consider consolidating the hash update logic into a shared module to ease future maintenance, provided that the workflows can share common code.

Copilot uses AI. Check for mistakes.
args = parser.parse_args()

repo_path = args.folder
Expand Down Expand Up @@ -170,7 +171,11 @@ def main():
print( # noqa: T201
f"Updated {devcontainer_json_file} with the new hash: {overall_checksum_str}"
)
sys.exit(1) # Exit with non-zero code to indicate changes were made
if args.exit_zero:
sys.exit(0)
else:
sys.exit(1)

else:
print(overall_checksum_str) # noqa: T201 # print this so that the value can be picked up via STDOUT when calling this in a CI pipeline or as a subprocess

Expand Down