Skip to content

Clarify visualize error handling#92

Open
wshlavacek wants to merge 2 commits into
RuleWorld:mainfrom
wshlavacek:visualize-error-handling
Open

Clarify visualize error handling#92
wshlavacek wants to merge 2 commits into
RuleWorld:mainfrom
wshlavacek:visualize-error-handling

Conversation

@wshlavacek
Copy link
Copy Markdown
Contributor

Summary

  • remove the print-and-reraise fallback path in BNGVisualize
  • centralize visualization execution / collection so cwd restoration happens in one place
  • re-raise real BNGErrors cleanly and wrap filesystem failures as BNGFileError
  • add focused regression coverage in tests/test_visualize_errors.py

Why

The current code mixes logging, print(...), and exception handling in a way that makes visualization failures noisier and less explicit than they need to be.

Testing

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

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.

1 participant