Skip to content

feat: new pre-commit hook to update Nextflow manifest version#193

Merged
kelly-sovacool merged 8 commits into
mainfrom
copilot/create-pre-commit-hook-for-nextflow
Jun 10, 2026
Merged

feat: new pre-commit hook to update Nextflow manifest version#193
kelly-sovacool merged 8 commits into
mainfrom
copilot/create-pre-commit-hook-for-nextflow

Conversation

Copilot AI commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Changes

  • added ccbr-hooks sync-nextflow-version
  • registered it in .pre-commit-hooks.yaml
  • added tests for update/skip/error/no-op behavior and improved hook coverage
  • updated hook docs in README.md, CHANGELOG.md, and hooks module metadata

Behavior:

  • skips when repo-root nextflow.config is absent
  • raises an error if nextflow.config exists but repo-root VERSION is missing
  • lets manifest.version lookup errors bubble up
  • updates manifest.version in nextflow.config from VERSION

Validation:

python -m pytest tests/test_hooks.py --cov=ccbr_tools.hooks.sync_nextflow_version --cov-report=term-missing ✅
pre-commit run --files ...changed files... ✅
codeql_checker ✅ no alerts
secret scan ✅ no secrets

Issues

see CCBR/CCBR_NextflowTemplate#76

Pull request created by AI Agent

@codecov

codecov Bot commented Jun 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.47%. Comparing base (83d7b57) to head (9c986f6).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #193      +/-   ##
==========================================
+ Coverage   72.84%   73.47%   +0.63%     
==========================================
  Files          27       28       +1     
  Lines        1893     1938      +45     
==========================================
+ Hits         1379     1424      +45     
  Misses        514      514              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@kelly-sovacool kelly-sovacool changed the title Creating pre-commit hook for Nextflow configuration feat: new pre-commit hook to update Nextflow manifest version Jun 10, 2026

@kelly-sovacool kelly-sovacool left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Comment thread CHANGELOG.md Outdated
Comment thread .pre-commit-config.yaml Outdated
Comment thread src/ccbr_tools/hooks/sync_nextflow_version.py Outdated
Comment thread src/ccbr_tools/hooks/sync_nextflow_version.py Outdated
Comment thread src/ccbr_tools/hooks/sync_nextflow_version.py Outdated
Comment thread src/ccbr_tools/hooks/sync_nextflow_version.py Outdated
Comment thread src/ccbr_tools/hooks/sync_nextflow_version.py Outdated
Copilot AI requested a review from kelly-sovacool June 10, 2026 18:22
@kelly-sovacool kelly-sovacool marked this pull request as ready for review June 10, 2026 19:11

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds a new ccbr-hooks sync-nextflow-version pre-commit hook intended to keep a Nextflow repo’s nextflow.config manifest.version synchronized with the repo-root VERSION file, and wires it into the hooks CLI, hook registry, docs, and tests.

Changes:

  • Implement sync-nextflow-version hook (CLI + update_manifest_version() helper) to update manifest.version from VERSION.
  • Register the hook in ccbr-hooks and .pre-commit-hooks.yaml.
  • Add/extend tests and update README/CHANGELOG/docs metadata to reference the new hook.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tests/test_hooks.py Adds unit tests for manifest updating and CLI behaviors (update/skip/error/no-op), plus CLI help coverage.
src/ccbr_tools/hooks/sync_nextflow_version.py New hook implementation and helper for updating manifest.version inside nextflow.config.
src/ccbr_tools/hooks/__main__.py Registers sync-nextflow-version with the ccbr-hooks Click command group.
src/ccbr_tools/hooks/__init__.py Updates hooks module docstring to include the new hook.
README.md Updates pre-commit example list to include the new hook.
CHANGELOG.md Adds changelog entry documenting the new hook.
.pre-commit-hooks.yaml Registers the hook for pre-commit, scoped to VERSION/nextflow.config changes.

Comment thread tests/test_hooks.py Outdated
Comment thread tests/test_hooks.py Outdated
Comment thread src/ccbr_tools/hooks/sync_nextflow_version.py Outdated
Comment thread src/ccbr_tools/hooks/sync_nextflow_version.py
kelly-sovacool and others added 2 commits June 10, 2026 15:44
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@kelly-sovacool kelly-sovacool merged commit 12ea8da into main Jun 10, 2026
11 checks passed
@kelly-sovacool kelly-sovacool deleted the copilot/create-pre-commit-hook-for-nextflow branch June 10, 2026 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants