Skip to content

Fix / in step labels breaking source reference parsing#148

Merged
jmchilton merged 2 commits intomainfrom
fix_slash_labels
Mar 20, 2026
Merged

Fix / in step labels breaking source reference parsing#148
jmchilton merged 2 commits intomainfrom
fix_slash_labels

Conversation

@jmchilton
Copy link
Member

Summary

  • Add resolve_source_reference() helper in model.py that matches known labels (longest first) before falling back to split("/"), handling labels like Host/Contaminant Reference Genome
  • Update converter.py (BaseConversionContext.step_output()), normalize.py (_replace_anonymous_output_references, _ensure_implicit_step_outs), and cytoscape.py (to_cytoscape) to use the new helper
  • Add unit tests for the helper and integration/round-trip tests with / in labels

Closes #145

Test plan

  • All 101 tests pass (88 existing + 13 new)
  • Unit tests for resolve_source_reference cover: simple labels, slash-in-label with/without output, multiple slashes, longest-match ordering, fallback behavior
  • Integration tests verify to-native conversion and full round-trip with / in input labels, step labels, and chained connections

🤖 Generated with Claude Code

@codecov
Copy link

codecov bot commented Mar 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 41.03%. Comparing base (321bfaa) to head (5a029d5).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #148   +/-   ##
=======================================
  Coverage   41.03%   41.03%           
=======================================
  Files          51       51           
  Lines        1974     1974           
  Branches      441      441           
=======================================
  Hits          810      810           
  Misses       1047     1047           
  Partials      117      117           
Flag Coverage Δ
unittests 41.03% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Add resolve_source_reference() helper that matches known labels
(longest first) before falling back to split on `/`. Fixes converter,
normalize, and cytoscape call sites.

Closes #145

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@jmchilton jmchilton merged commit 40a49c0 into main Mar 20, 2026
18 checks passed
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.

Step labels containing '/' break source reference parsing on reimport

1 participant