Skip to content

Template: add metro-map workflow diagram feature - #4478

Draft
ewels wants to merge 8 commits into
nf-core:devfrom
ewels:nf-metro
Draft

ewels wants to merge 8 commits into
nf-core:devfrom
ewels:nf-metro

Conversation

@ewels

@ewels ewels commented Sep 21, 2026 •

Copy link
Copy Markdown
Member

Description

Adds a new opt-in metro_map template feature that gives every new pipeline a starter nf-metro map workflow diagram, plus the automation to keep its rendered images in sync. This builds on the recent manifest.diagram support (#4460).

Adds the following:

  • assets/metro_map.mmd: a starter tube-map with FastQC + MultiQC
  • Four images rendered to docs/images/ at pipeline-creation time via nf-metro: a static SVG, an animated SVG, and light/dark PNGs.
  • A seqeralabs/nf-metro pre-commit hook keeps the images in sync whenever the .mmd changes.
  • manifest.diagram is still commented out with a TODO, as is the animated SVG is shown in the README (to avoid many identical boilerplate maps).
  • nf-metro added as a dependency (it is self-contained — resvg-py + pillow, no browser).

Note

This depends on nf-metro's %%metro output: per-file overrides and the repo-root scoping of --reject-output-outside-source, both of which are now upstream but not yet released.

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
  • nf-core pipelines lint passes on a generated pipeline

🤖 Generated with Claude Code

ewels and others added 3 commits September 21, 2026 18:22
Add a new opt-in `metro_map` template feature that ships a starter
metro-map diagram and keeps its rendered images in sync with nf-metro.

- assets/metro_map.mmd: starter tube-map built from the template flow
  (FastQC / MultiQC), adapting to the fastqc/multiqc feature toggles. All
  outputs and their per-file options (animation, colour mode) are declared
  in the .mmd via %%metro output:, so no CLI flags are needed.
- Renders four images to docs/images/ at create time (static + animated
  SVG, light + dark PNG) via nf-metro, matching the Action/hook defaults so
  there is no first-push churn.
- .github/workflows/metro-map.yml: regenerate images on .mmd change or
  workflow_dispatch and commit them back.
- Pre-commit hook (seqeralabs/nf-metro) keeps the images in sync locally.
- Register the static SVG as manifest.diagram and show the animated SVG in
  the README.
- New `metro_map` feature toggle (default on) so it can be skipped
  independently of nf-core module usage.
- Add nf-metro as a dependency.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The pre-commit hook and create-time render keep the images in sync; the
CI Action can follow in a separate PR.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ewels
ewels changed the base branch from main to dev September 21, 2026 20:33
@codecov

codecov Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.40%. Comparing base (b9d9e05) to head (4605b9b).
⚠️ Report is 13 commits behind head on dev.

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

nf-core-bot and others added 3 commits September 21, 2026 20:50
Regenerate the metro-map images on .mmd change or workflow_dispatch and
commit them back, complementing the pre-commit hook.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
prettier cannot parse the `{% %}` Jinja tags in the template's
metro-map.yml and .pre-commit-config.yaml, matching how the other
Jinja-containing template workflows are already ignored.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ewels

ewels commented Sep 21, 2026

Copy link
Copy Markdown
Member Author

CI tests will fail until nf-metro 2.2.0 is released with the new %%output stuff.

Comment thread nf_core/pipeline-template/assets/metro_map.mmd
Co-authored-by: Maxime U Garcia <max.u.garcia@gmail.com>

This branch has not been deployed

No deployments
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