Skip to content

Clean up block warning paths#97

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

Clean up block warning paths#97
jrfaeder merged 1 commit into
RuleWorld:mainfrom
wshlavacek:block-warning-cleanup

Conversation

@wshlavacek
Copy link
Copy Markdown
Contributor

Summary

  • clean up warning-only block setattr paths in the model and network block modules
  • keep existing items unchanged when warning-only assignments receive unsupported values
  • add focused upstream-safe regression tests for those warning paths

Testing

  • uv run pytest tests/test_block_warning_paths.py -q
  • uv run pytest tests/test_bng_parsing.py::test_network_parse -q
  • uvx black --check bionetgen/modelapi/blocks.py bionetgen/network/blocks.py tests/test_block_warning_paths.py

@jrfaeder jrfaeder merged commit 7dddd22 into RuleWorld:main May 12, 2026
17 checks passed
wshlavacek added a commit to wshlavacek/PyBioNetGen that referenced this pull request May 13, 2026
…edup

The deduplicated `_set_item_attribute` helper rewrote the numeric-coercion
failure warning to "keeping existing {kind}", which regressed the
"keeping existing value"/"keeping existing size" wording that PR RuleWorld#97 (now
in main) standardized on. The merged `tests/test_block_warning_paths.py`
asserts the original wording, so all CI matrix jobs failed after rebase.

Restore "keeping existing {num_field} <existing>" (informative trailer
from PR RuleWorld#97 included) and align the new `test_block_setattr_logging.py`
parameter/compartment fixtures with the canonical messages.
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