rustworkx icon indicating copy to clipboard operation
rustworkx copied to clipboard

Bugfix/json preserves node gaps

Open d-miketa opened this issue 2 months ago • 3 comments

Addresses https://github.com/Qiskit/rustworkx/issues/1516: JSON roundtrip is broken whenever the graph contains deleted (or contracted) nodes.

This leaves just the GraphML format as incapable of a clean round-trip.

d-miketa avatar Oct 16 '25 11:10 d-miketa

Pull Request Test Coverage Report for Build 18563991601

Details

  • 57 of 71 (80.28%) changed or added relevant lines in 4 files are covered.
  • 2 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.05%) to 94.108%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/json/mod.rs 28 32 87.5%
src/json/node_link_data.rs 27 37 72.97%
<!-- Total: 57 71
Files with Coverage Reduction New Missed Lines %
src/digraph.rs 1 98.11%
src/graph.rs 1 97.05%
<!-- Total: 2
Totals Coverage Status
Change from base Build 18083333380: -0.05%
Covered Lines: 18177
Relevant Lines: 19315

💛 - Coveralls

coveralls avatar Oct 16 '25 14:10 coveralls

I will take a look at this during the weekend. Thanks for sending the fix for an issue you found!

IvanIsCoding avatar Oct 17 '25 12:10 IvanIsCoding

Also, you'll need to solve some minor conflicts with #1510

IvanIsCoding avatar Oct 24 '25 22:10 IvanIsCoding