Skip to content

Validate model and network block dispatch#99

Merged
jrfaeder merged 1 commit into
RuleWorld:mainfrom
wshlavacek:block-dispatch-validation
May 12, 2026
Merged

Validate model and network block dispatch#99
jrfaeder merged 1 commit into
RuleWorld:mainfrom
wshlavacek:block-dispatch-validation

Conversation

@wshlavacek
Copy link
Copy Markdown
Contributor

Summary

  • resolve model and network block dispatch through explicit supported-name maps instead of raw getattr lookup
  • preserve supported aliases like reaction_rules while raising a clear ValueError for unsupported block names
  • add focused upstream-safe tests for both supported and unsupported dispatch paths

Testing

  • uv run pytest tests/test_block_dispatch_validation.py -q
  • uv run pytest tests/test_bionetgen.py::test_bionetgen_model tests/test_bng_parsing.py::test_network_parse -q
  • uvx black --check bionetgen/modelapi/model.py bionetgen/network/network.py tests/test_block_dispatch_validation.py

@jrfaeder jrfaeder merged commit 880e10e 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