Parent PRD
#245
What to build
Wire the napari processor to read cleanup_drop_keys from SettingsConfig (delivered by Slice 3 / #248) and pass it through to ImInfo.remove_marked_intermediates (delivered by Slice 1 / #246):
- In
nellie_napari/nellie_processor.py's run_feature_export():
- Replace the
remove_intermediates_checked = self.nellie.settings.remove_intermediates_checkbox.isChecked() line with cleanup_drop_keys = self.nellie.settings.to_config().cleanup_drop_keys.
- Pass
cleanup_drop_keys (a frozenset[str]) through to the _run_feature_export worker (replacing the old remove_intermediates_checked: bool parameter).
- In
_run_feature_export:
- Change parameter
remove_intermediates_checked: bool → cleanup_drop_keys: frozenset[str].
- Replace
if remove_intermediates_checked: ... self.current_im_info.remove_intermediates() with if cleanup_drop_keys: ... self.current_im_info.remove_marked_intermediates(cleanup_drop_keys). The if cleanup_drop_keys test on a frozenset is True iff non-empty, matching the legacy "checkbox checked" semantic.
- Keep the
try/except around the cleanup call (legacy was wrapped to surface "Error removing intermediates" via show_info).
Acceptance criteria
Blocked by
User stories addressed
From PRD #245:
- User story 8 (cleanup fires after Hierarchy regardless of how Hierarchy was invoked).
This slice completes the round-trip for user stories 1, 2, 3 (via Slice 3 + this wiring), making the per-output policy actually effective at run time.
Wiki context
wiki/pipeline.md — processor mirrors run.py's stage list; this wiring keeps that parallel.
wiki/decisions/0014-intermediates-policy-frozenset.md — confirms the wiring's contract: empty drop set → no cleanup.
Parent PRD
#245
What to build
Wire the napari processor to read
cleanup_drop_keysfromSettingsConfig(delivered by Slice 3 / #248) and pass it through toImInfo.remove_marked_intermediates(delivered by Slice 1 / #246):nellie_napari/nellie_processor.py'srun_feature_export():remove_intermediates_checked = self.nellie.settings.remove_intermediates_checkbox.isChecked()line withcleanup_drop_keys = self.nellie.settings.to_config().cleanup_drop_keys.cleanup_drop_keys(afrozenset[str]) through to the_run_feature_exportworker (replacing the oldremove_intermediates_checked: boolparameter)._run_feature_export:remove_intermediates_checked: bool→cleanup_drop_keys: frozenset[str].if remove_intermediates_checked: ... self.current_im_info.remove_intermediates()withif cleanup_drop_keys: ... self.current_im_info.remove_marked_intermediates(cleanup_drop_keys). Theif cleanup_drop_keystest on a frozenset isTrueiff non-empty, matching the legacy "checkbox checked" semantic.try/exceptaround the cleanup call (legacy was wrapped to surface "Error removing intermediates" viashow_info).Acceptance criteria
nellie_processor.run_feature_export()reads the drop set fromSettingsConfig.cleanup_drop_keys, not from the (now-removed)remove_intermediates_checkbox._run_feature_export()passes the drop set toImInfo.remove_marked_intermediates, and only when the set is non-empty.run_nellie()) with "CSVs only" selected → cleanup still runs after Hierarchy (consistent with the legacy behavior, per PRD §Out of scope and User story 8).to_configround-trip test (Slice 3) and theremove_marked_intermediatestests (Slice 1). Optionally add a smoke-style integration test in an existing processor test file if one exists.pytest -q --ignore=tests/test_*_perf.pypasses — full regression on the test suite.Blocked by
remove_marked_intermediates).SettingsConfig.cleanup_drop_keysfield and the new widget).User stories addressed
From PRD #245:
This slice completes the round-trip for user stories 1, 2, 3 (via Slice 3 + this wiring), making the per-output policy actually effective at run time.
Wiki context
wiki/pipeline.md—processormirrorsrun.py's stage list; this wiring keeps that parallel.wiki/decisions/0014-intermediates-policy-frozenset.md— confirms the wiring's contract: empty drop set → no cleanup.