Add override_state_values support to initialize_from#632
Add override_state_values support to initialize_from#632skrawcz merged 8 commits intoapache:mainfrom
Conversation
|
@Smitaambiger cool. Can you add a unit test for this please? |
|
@skrawcz |
|
@skrawcz Please let me know if you’d like the test structured differently or placed elsewhere. Happy to update! |
skrawcz
left a comment
There was a problem hiding this comment.
Thanks. Some minor clean up please.
|
@Smitaambiger your test also fails:
|
…mbiger/burr into override-state-initialize
|
@skrawcz Thanks for the review! I’ve addressed the requested cleanup and test failure:
I verified the change locally with: pytest tests/core/test_application.py -k override_state_values
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
======== 1 passed, 124 deselected, 2 warnings in 0.60s ========= |
There was a problem hiding this comment.
Thanks @Smitaambiger for the contribution. Sorry it took a while to review.
In future to make things run a little faster, please run the pre-commit checks locally, as well as the tests.
|
Thanks @skrawcz for the review and for merging! |
@skrawcz Related to #416
This PR adds an optional
override_state_valuesparameter toApplicationBuilder.initialize_from, allowing callers to override or augment state values when initializing from a persisted state.Changes
override_state_valuesparameter toinitialize_fromHow I tested this
Notes
This change is backward-compatible and only applies when
override_state_valuesis explicitly passed.