Skip to content

Preserve blank GUI equivalence transient step - #38

Merged
sergioald merged 1 commit into
mainfrom
fix-gui-blank-equivalence-transient-step
Jul 22, 2026
Merged

sergioald merged 1 commit into
mainfrom
fix-gui-blank-equivalence-transient-step

Conversation

@sergioald

Copy link
Copy Markdown
Owner

Summary

Preserves a blank GUI equivalence transient-step field when saving GUI configs.

Changed

  • gui_ldsfl.py

    • adds _raw_tk_string(...) for config-saving paths where blank values are meaningful;
    • changes saved gui_state["sinuo_equiv_transient_step"] to preserve the raw field value instead of falling back to "40000".
  • tests/test_gui_sinuosity_metrics.py

    • documents that blank transient-step values are preserved by the raw getter;
    • keeps _safe_tk_string(...) behaviour unchanged for live diagnostic defaults.

Why

Codex correctly flagged that PR #37 saved a blank “Equiv. transient step” GUI field as "40000".

In this field, blank is meaningful: _build_config() converts it to None, which requests all-history equivalence analysis. Saving it as "40000" means that loading the saved GUI config would silently change the diagnostic window back to post-40000-only analysis.

This follow-up preserves the user’s blank value during config saving while keeping the safe defaulting behaviour for live diagnostic calculations.

Validation

python -m py_compile gui_ldsfl.py tests/test_gui_sinuosity_metrics.py
python -m pytest tests/test_gui_sinuosity_metrics.py tests/test_gui_equivalence_controls.py
python -m pytest
python -m run_ldsfl --base-dir . --cases 1 --max-steps 100 --no-plots

Notes

This is a targeted PR #37 follow-up.

It does not change the solver algorithm, flow solvers, curvature calculation, stability estimator mathematics, CLI interface, output naming, fixture structure, or generated output format.

@sergioald
sergioald merged commit c0bdd44 into main Jul 22, 2026
3 checks passed
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.

1 participant