0.7.0 - layout invariants, fragility reduction, and new directives
A big one! 228 commits since 0.6.1, with the layout engine considerably more robust and a handful of nice new directives to play with.
Existing .mmd files render with no changes - everything new here is additive.
Highlights
Embed your maps anywhere
nf-metro render mypipeline.mmd --format html now produces a self-contained, interactive HTML file you can drop straight into a docs page or a blog post (#374).
Three new %%metro directives
off_track: ...lifts file inputs above the line tracks so they sit clear of the metro lines instead of breaking them (#265). Great for FASTA/GTF inputs hanging off a workflow.center_ports: true(or--center-ports) centres inter-section ports on the shorter section, which tidies up many fan-in/fan-out cases (#320).legend_min_height: ...lets you reserve a minimum legend height so a tall map's legend doesn't look stranded.
Richer file icons
- New
files(stacked) anddir(folder) icon types, joining the existing singlefile(#175). - All three accept an optional caption:
node[Label]:::files:Read 1, Read 2to call out exactly what's flowing in (#269).
Optional / conditional paths
Lines can now be dashed or dotted to indicate optional or conditional routes through the pipeline. Add a fourth field to your %%metro line: directive:
%%metro line: qc | Quality Control | #ff8800 | dashed
Gallery additions
- differentialabundance pipeline metro map (#319)
- genomeassembly example
- New topology fixtures:
upward_bypass,mismatched_tracks,fan_in_merge - A new nf-core Pipelines gallery page on the docs site (#239)
Better-looking maps out of the box
- Sections are now numbered in visual reading order, so "1, 2, 3..." matches how you actually scan the map (#217)
- Fan-in merge junctions route cleanly onto the trunk (#207)
- Per-line path grouping gives a consistent line z-order, so the colours stack predictably where lines cross (#305)
- Animated balls no longer fly off-piste at merge junctions (#251)
- Dozens of fan-out, fan-in, bypass, and off-track routing fixes - too many to list individually, but the cumulative effect on real pipelines is significant
Under the hood
This release also represents a substantial reliability push:
- A layout invariant framework with phase-boundary guards (
compute_layout(validate=True)), full-corpus parametrised tests, and the C13 row-gap runtime guard (#326, #371). When the layout engine misbehaves, you find out at the offending phase, not three phases later. - The layout pipeline is now organised into six named stages with flat
Stage X.Ynaming - much easier to reason about than the old monolithic phase 13 (#375, #376). - Major fragility-reduction series (#340 and follow-ups) tightening clearances, hoisting helpers, and documenting load-bearing phase pairs.
- Performance work: spatial-index validation guards with closed-form intersection (#368), cached
station_lines()(~40 call sites, O(1) amortised), pre-computed diamond groups. - Several large refactors splitting 300-500-line functions into focused helpers, deduplicating section iteration, unifying diagonal routing, and centralising corner-radius math.
Contributing
A new CONTRIBUTING.md covers the visual review workflow, the invariant ratchet, and git hygiene expectations (#341). If you've been meaning to file that "why does my map look like THIS?" issue, now's a good moment.
Full Changelog: 0.6.1...0.7.0