napari/settings: replace single checkbox with per-output retention group + presets (Slice 3 of #245)#252
Merged
Conversation
…oup + presets (Slice 3 of #245) Replaces the legacy "Remove intermediate files" checkbox with a new ``IntermediateRetentionGroup`` widget composed of: - A preset radio row at top (Keep everything / Masks + CSVs only / CSVs only / Custom). Custom is auto-selected when the per-output selection diverges from any named preset; not user-clickable. - Eight stage-grouped subgroups (Filter, Label, Network, Markers, Tracking, Voxel reassignment, Hierarchy, Pipeline input) holding one checkbox per key in ``DROPPABLE_KEYS``. Checkbox semantics: **checked = drop**. Each checkbox carries a tooltip describing the source stage and downstream consumers (re-run implications). Selecting a named preset radio sets the per-output checkboxes to match the preset's drop set. Toggling any individual checkbox flips the radio to "Custom"; toggling back to the preset's exact drop set re-selects the preset. ``SettingsConfig`` schema change: ``remove_intermediates: bool`` → ``cleanup_drop_keys: frozenset[str]``. ``to_config`` reads the widget's ``drop_keys()``; ``apply_config`` calls ``set_drop_keys(...)`` which also syncs the preset radio. 17 new tests in ``tests/test_napari_settings.py`` pin: default state ("Keep everything", empty drop set); checkbox count and membership; tooltips present; preset → drop-set mapping (×3); ``set_drop_keys`` round-trip (×3); preset radio reflects loaded drop set (named + Custom); checkbox toggle after preset switches to Custom (and back); unknown / CSV keys rejected; ``SettingsConfig`` field schema and round-trip. Note: ``nellie_processor.py`` still references the now-removed ``remove_intermediates_checkbox``; that attribute lookup will fail at runtime in ``run_feature_export`` until Slice 4 (#249) re-wires it. No tests exercise that path so the regression suite stays green (715 passed). Closes #248 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This was referenced May 12, 2026
Merged
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.
Summary
IntermediateRetentionGroupwidget (innellie_napari/nellie_settings.py) replaces the single "Remove intermediate files" checkbox: 4-radio preset row + 8 stage-grouped subgroups holding 14 checkboxes (one per key inDROPPABLE_KEYS).SettingsConfigschema:remove_intermediates: bool→cleanup_drop_keys: frozenset[str].to_config/apply_configupdated.tests/test_napari_settings.pypin the contract via the publicdrop_keys()/set_drop_keys(...)API.nellie_processor.py) still reads the now-removedremove_intermediates_checkboxattribute. Slice 4 (#249) re-wires it. No test exercises that path, so the suite stays green.Closes #248. Builds on #246 (Slice 1).
Test plan
uv run pytest tests/test_napari_settings.py tests/test_run_cleanup.py tests/test_verifier_iminfo.py -q— 90 passeduv run pytest -q --ignore=tests/test_*_perf.py— 715 passed, 0 regressions🤖 Generated with Claude Code