Skip to content

Unify gdiff GraphML and traversal error handling#91

Merged
jrfaeder merged 1 commit into
RuleWorld:mainfrom
wshlavacek:gdiff-error-handling
May 12, 2026
Merged

Unify gdiff GraphML and traversal error handling#91
jrfaeder merged 1 commit into
RuleWorld:mainfrom
wshlavacek:gdiff-error-handling

Conversation

@wshlavacek
Copy link
Copy Markdown
Contributor

Summary

  • raise BNGFileError for malformed or unsupported GraphML node shapes instead of surfacing vague runtime/print behavior
  • make _get_node_from_keylist() return cleanly when child graphs use list vs dict node layouts
  • add focused gdiff regression coverage in tests/test_gdiff.py

Why

The current code reports malformed GraphML inconsistently and keylist traversal can fail on legitimate node-shape variations. This makes failures harder to diagnose than they need to be.

Testing

  • uv run python -m pytest -q tests/test_gdiff.py
  • uvx black --check bionetgen/core/tools/gdiff.py tests/test_gdiff.py

@jrfaeder jrfaeder merged commit 78eba97 into RuleWorld:main May 12, 2026
17 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.

2 participants