Fix pseudo state and blockers propagation - #1526
Conversation
The functional is determined by the pseudos in the dictionary, so if the dictionary is empty (or the app is locked), we should not update the functional.
Blockers were overwritting each other instead of being accumulated. Here we ensure that steps trigger a blockers update when any of their sub-models introduce a blocker, in which they accumulate said blockers. The same is done for the advanced configuration settings panel, which also has sub-models.
| self._reset() | ||
|
|
||
| def _on_blockers_change(self, _): | ||
| self._model.update_blockers() |
There was a problem hiding this comment.
Triggering an update here sets the advanced model's blockers to the sum of all sub-advanced model blockers. This is later collected by a similar mechanism in the configuration step.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1526 +/- ##
==========================================
+ Coverage 75.29% 75.31% +0.02%
==========================================
Files 115 115
Lines 7367 7373 +6
==========================================
+ Hits 5547 5553 +6
Misses 1820 1820
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
|
||
| def _on_blockers_change(self, _): | ||
| if self._model.state is not State.INIT: | ||
| self._model.update_blockers() |
There was a problem hiding this comment.
The update triggers the accumulation of all configuration settings panel blockers.
| self._defaults["functional"] = functional | ||
| self.functional = self._get_default("functional") | ||
|
|
||
| def get_cutoffs_by_index(self, index: int) -> list[float]: |
There was a problem hiding this comment.
Keeping update methods together 🙂
Thanks @yakutovicha. Replied. Regarding the moves, as stated, I'd like to keep like-things together for ease of maintainability 🙂 |
This PR addresses the following two issues:
Nonefunctionals.