Skip to content

Round-trip ci: block in .nf-core.yml - #4453

Draft
ewels wants to merge 2 commits into
nf-core:devfrom
ewels:ci-block-roundtrip
Draft

Round-trip ci: block in .nf-core.yml#4453
ewels wants to merge 2 commits into
nf-core:devfrom
ewels:ci-block-roundtrip

Conversation

@ewels

@ewels ewels commented Aug 24, 2026

Copy link
Copy Markdown
Member

Tied to proof-of-concept around centralised GitHub actions in nf-core/actions. That repo adds new config scope in nf-core-config.yml and this PR lets tools know about it so that it doesn't get wiped.

Feel free to ignore until strategy around centralised actions is decided, just didn't want to forget about it.

Details

PR checklist

  • This comment contains a description of changes (with reason)
  • CHANGELOG.md is updated
  • If you've fixed a bug or added code that should be tested, add tests!
  • Documentation in docs is updated

Description

A new top-level ci: block in .nf-core.yml is consumed by the centralised workflows in nf-core/actions (keys defined in that repo at src/actions/read-config/registry.ts: nf_test_version, nextflow_versions, profiles, max_shards, nf_test_workdir, runner, nextflow_lint, awsfulltest_required_approvals, all optional).

NFCoreYamlConfig in nf_core/pydantic_models.py rebuilds .nf-core.yml from known fields only in its model_dump(), so any ci: block was silently dropped whenever tools rewrote the file (sync, bump-version), deleting a pipeline's CI configuration.

This adds an optional ci field so the block round-trips.

It is deliberately a permissive dict[str, Any] rather than a strictly typed model: nf-core/actions adds and defines these keys independently, and a strict schema here would mean every new CI setting needs a tools release plus a template sync before any pipeline could use it — reintroducing exactly the coupling that centralising the workflows removed. tools only needs to round-trip this block, not validate it.

nf-core pipelines lint needs no change: the nfcore_yml lint test only checks specific known keys and does not flag unknown top-level blocks.

Tests cover the round-trip of a config containing ci: for both repository_type values.

ewels and others added 2 commits August 24, 2026 12:48
Add an optional permissive `ci: dict` field to NFCoreYamlConfig so the
centralised nf-core/actions CI configuration survives model_dump() rewrites
(sync, bump-version). Kept as a plain dict rather than a typed model on
purpose: nf-core/actions defines these keys independently, so a strict schema
would recouple every new CI setting to a tools release.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ewels
ewels marked this pull request as draft August 24, 2026 10:49
@codecov

codecov Bot commented Aug 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.18%. Comparing base (cb623e0) to head (a10c727).

☔ 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.

@ewels ewels added the WIP Work in progress label Aug 24, 2026
ewels added a commit to nf-core/actions that referenced this pull request Aug 24, 2026
nf-core/tools#4453 adds the `ci:` block to `NFCoreYamlConfig` as a permissive
dict with a round-trip test, which is the shape this repo needs: a strict
schema would mean every new CI setting waits on a tools release and a template
sync before a pipeline could use it.

The follow-up now names the pull request and records that it is open rather
than merged, along with what that means in the meantime: a pipeline that sets a
`ci:` key can still lose it on a sync until this lands.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

WIP Work in progress

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant