Deduplicate block setattr logging helpers#100
Conversation
|
@wshlavacek Please check the conficts |
|
@jrfaeder conflicts resolved and the branch has been rebased onto current main. The focused block setattr logging tests pass locally, so it should be ready for another look. |
bf84943 to
319d926
Compare
|
CI root cause looks narrower than the PR UI suggests: I do not currently see a live merge conflict, but I do see a reproducible warning-message regression causing the full deploy matrix to fail. The helper dedup changed parameter and compartment warning text from the existing field-specific wording ("keeping existing value" / "keeping existing size") to generic wording ("keeping existing parameter" / "keeping existing compartment"). Upstream tests in tests/test_block_warning_paths.py still assert the older wording, so we now fail the same four assertions across every platform. I reproduced those four failures locally as well. Tentative fix plan:
I am keeping this PR in draft until that repair is in. |
Summary
__setattr__logging paths into shared helpers in the model and network block modulesBNGLoggerand fold the duplicate OrderedDict import-guard cleanup into the same refactorTesting
uv run pytest tests/test_block_setattr_logging.py -quv run pytest tests/test_bionetgen.py::test_bionetgen_model tests/test_bionetgen.py::test_action_loading tests/test_bng_parsing.py::test_network_parse -quvx black --check bionetgen/modelapi/blocks.py bionetgen/network/blocks.py bionetgen/modelapi/structs.py tests/test_block_setattr_logging.py