Declarative YAML test coverage for gxformat2.cytoscape#196
Merged
jmchilton merged 1 commit intogalaxyproject:mainfrom Apr 27, 2026
Merged
Declarative YAML test coverage for gxformat2.cytoscape#196jmchilton merged 1 commit intogalaxyproject:mainfrom
jmchilton merged 1 commit intogalaxyproject:mainfrom
Conversation
Mirrors the gxformat2.mermaid PR (galaxyproject#194). Adds gxformat2/examples/expectations/cytoscape.yml with 13 cases covering node/edge structure, input step types, subworkflow shape, multi-data inputs, tool_shed_repository → repo_link, and a real-workflow smoke. Registers cytoscape_elements_to_list / cytoscape_node_ids / cytoscape_edge_ids in OPERATIONS so downstream ports (TypeScript galaxy-tool-util) can sync and reuse the same cases. Thin tests/test_cytoscape.py retained for things that aren't a pure function of (workflow dict) -> result: CLI JSON/HTML output modes, render_html, _input_type_str on a string-list input, and the Java interop generator. Fix tests/test_cytoscape.py::test_interop_generation leaking a tmp*.gxwf.* pair into tests/examples/cytoscape/ on every run — write_cytoscape_elements_for_string now takes an explicit filename and write_cytoscape_elements skips a self-copy when src == dst.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #196 +/- ##
=======================================
Coverage 41.03% 41.03%
=======================================
Files 51 51
Lines 1974 1974
Branches 441 441
=======================================
Hits 810 810
Misses 1047 1047
Partials 117 117
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
gxformat2/examples/expectations/cytoscape.ymlwith 13 declarative cases coveringcytoscape_elementsoutput (group counts, input node shape, tool step shape, edge shape, int input step type, subworkflow classes, subworkflow edges with named output, multi-data inputs, real-workflowrepo_linkfromtool_shed_repository, and a real-workflow node-id smoke). Consumed by the existingDeclarativeTestSuiteharness so downstream ports (TypeScriptgalaxy-tool-util) can sync and reuse them.cytoscape_elements_to_list,cytoscape_node_ids,cytoscape_edge_idsintests/test_interop_tests.pyOPERATIONS. The two_idsvariants return list-of-string forvalue_set/value_any_containsassertions;_to_listreturns the canonical flat list-of-dicts.synthetic-*/real-*files — no new workflow fixtures.tests/test_cytoscape.pyretained for things that aren't a pure function of (workflow dict) → result: CLI JSON/HTML output modes,render_html,_input_type_stron astring[]input, and the Java interop generator.test_interop_generationwas leaking atmp*.gxwf.yml/tmp*.gxwf.cytoscape.jsonpair intotests/examples/cytoscape/on each run becausewrite_cytoscape_elements_for_stringnamed its staging file viatempfile.NamedTemporaryFile. Now takes an explicitfilenamearg (with_report.gxwf.yml);write_cytoscape_elementsskips its self-copy when src == dst.Mirrors #194 (mermaid) one-for-one.
Test plan
pytest tests/— 642 passed, 8 skipped (no regressions; 13 new declarative cases × 2 = 28 over the previous 631 + 1 thinned-out test ≈ 642)tests/examples/cytoscape/with exactly 4 deterministic files (no newtmp*accumulation)cytoscape.ymlviamake sync-workflow-expectations(will land alongside the TS cytoscape port, see WF_VIZ_1)