Skip to content

Preserve fuel labels in GraphML exports - #246

Open
Shubham-Padkonde wants to merge 1 commit into
OSeMOSYS:masterfrom
Shubham-Padkonde:fix/graphml-fuel-labels
Open

Shubham-Padkonde wants to merge 1 commit into
OSeMOSYS:masterfrom
Shubham-Padkonde:fix/graphml-fuel-labels

Conversation

@Shubham-Padkonde

Copy link
Copy Markdown

Fixes #200.

Fuel nodes deliberately have blank labels in the rendered energy-system diagram, but exporting those blanks to GraphML leaves editors such as yEd without a readable fuel name.

Populate missing fuel labels with the node identifier in a copy used for GraphML export. Keep custom labels, the original graph, and the graph passed to the diagram renderer unchanged.

The regression round-trips the actual GraphML file and checks labels and edges, plus unchanged diagram labels. Only the external Graphviz image-rendering call is mocked.

Validation on Python 3.13: the missing-label regression fails before the fix; the full test suite passes afterward (254 passed, 1 existing skip). Black passes. Flake8 passes with the repository's setup.cfg (python -m flake8 --config setup.cfg src/otoole/visualise/res.py tests/test_visualise.py, exit 0). git diff --check passes.

Prepared with Codex assistance.

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.

[Bug]: graphML file issue regarding fuel nodes

1 participant