Repository navigation
enh: sort the list of segmentation models by name - #26
Merged
paulmueller merged 1 commit intoNov 26, 2026
Merged
Conversation
The model dropdown was sorted by full path at startup, and models added
with "+" were appended at the end. Now the models are sorted by file
name, case-insensitive and with numbers compared by value ("model_2"
before "model_10"); added models are inserted at their sorted position.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #26 +/- ##
==========================================
+ Coverage 79.95% 80.08% +0.13%
==========================================
Files 23 23
Lines 1611 1622 +11
==========================================
+ Hits 1288 1299 +11
Misses 323 323 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
paulmueller
approved these changes
Nov 26, 2026
paulmueller-agent
pushed a commit
to paulmueller-agent/ChipStream
that referenced
this pull request
Nov 26, 2026
`test_gui_segm_torch_models_sorted` (DC-analysis#26) added copies of the test model with names that do not end with the MD5 sum ("Alpha.dcnm"), which dcnum rejects, and left their directory in the user settings. Every later ChipStream window preselected the machine-learning segmenter with "Alpha.dcnm", so the pipeline in `test_gui_pause_button` failed with "MD5 mismatch". - name the model copies "<name>_910c2.dcnm" and restore the "segm/torch_model_files" setting after the test - select the thresholding segmenter in `test_gui_pause_button` Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The model dropdown was sorted by full path at startup (so the directory decided the order), and models added with "+" were appended at the end of the list.
Change
torch_model_sort_key(path)inchipstream/gui/main_window.py: sorts by file name, case-insensitive, with numbers compared by value, e.g.9x,10x,Alpha,beta,model_1,Model_2,model_10. Models with the same name are ordered by their full path.Tests
test_gui_segm_torch_models_sortedadds copies of the test model namedmodel_10,Model_2,beta,Alpha,model_1(in that order) and checks that the list showsAlpha,beta,model_1,Model_2,model_10. It checks the same order again in a newChipStreamwindow (startup path). It fails onmainand passes with the change. The other GUI tests for the model list (test_gui_segm_torch_model_remove) and the expert settings pass.Lint
lint-compareagainstmain: ruff 0 → 0, pyright 1.1.408 0 → 0, flake8 clean.🤖 Generated with Claude Code