Wire GUI equivalence stability controls - #37
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ec24bad6bb
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| 'show_completion_popup': bool(self.show_completion_popup_var.get()), | ||
| 'sinuo_window': self.sinuo_window_var.get(), | ||
| 'sinuo_rel_tol': self.sinuo_rel_tol_var.get(), | ||
| 'sinuo_equiv_transient_step': self._safe_tk_string('sinuo_equiv_transient_step_var', '40000'), |
There was a problem hiding this comment.
Preserve blank transient step when saving GUI configs
When a user leaves the new “Equiv. transient step” field blank to request all-history analysis, _build_config() correctly turns it into None, but this gui_state entry rewrites the blank value to the default string "40000". On load, the GUI applies config.run and then overwrites the field from gui_state, so a saved all-history configuration silently comes back as post-40000-only and future runs use the wrong diagnostic window. Preserve the raw empty string here or omit the GUI override when the field is blank.
Useful? React with 👍 / 👎.
Summary
Wires the equivalence-style sinuosity stability controls through the GUI and configuration layer.
Changed
ldsfl/gui_utils.pygui_ldsfl.pyldsfl/main.pyrun_ldsfl.pytests/test_gui_equivalence_controls.pyWhy
The GUI already exposed the basic sinuosity stability stop switch, but the equivalence-style diagnostic parameters were still effectively hard-coded in the GUI/live-panel path.
After PR #36, the equivalence diagnostic has a selectable statistical method, with
incrementas the safer default for unit-root-like histories andhacretained for explicit comparison. The GUI should therefore preserve, validate, display, and forward the same controls as the solver/CLI path.This PR keeps the GUI, saved config files, preview output, CLI options, and solver diagnostics consistent.
Validation
python -m py_compile ldsfl/gui_utils.py ldsfl/main.py run_ldsfl.py gui_ldsfl.py tests/test_gui_equivalence_controls.py python -m pytest tests/test_gui_equivalence_controls.py tests/test_gui_sinuosity_metrics.py python -m pytest python -m run_ldsfl --base-dir . --cases 1 --max-steps 100 --no-plots