Overview
_append_to_search_zip (private, in autogalaxy/analysis/adapt_images/adapt_images.py, cross-imported by autolens/analysis/result.py) appends post-completion cache files into a search's .zip so paths.restore() — which deletes the output dir and re-extracts the zip — cannot destroy them on the next resume. That concern belongs to the paths layer: any code writing artifacts into a completed search's files/ needs it (born in PyAutoGalaxy#502 / autolens_profiling#70).
Plan
- PyAutoFit: public
AbstractPaths.preserve_in_zip(file_path) — no-op when the zip is absent; skip when the member already exists; arcname relative to output_path. Unit test: write into a zipped search's files/, preserve, restore(), assert survival.
- PyAutoGalaxy: call
result.paths.preserve_in_zip(...); delete the private helper.
- PyAutoLens: call
self.paths.preserve_in_zip(...); delete the cross-import.
- PRs ordered PyAutoFit → PyAutoGalaxy → PyAutoLens; behaviour identical throughout.
Suggested branch: feature/preserve-in-zip
Overview
_append_to_search_zip(private, inautogalaxy/analysis/adapt_images/adapt_images.py, cross-imported byautolens/analysis/result.py) appends post-completion cache files into a search's.zipsopaths.restore()— which deletes the output dir and re-extracts the zip — cannot destroy them on the next resume. That concern belongs to the paths layer: any code writing artifacts into a completed search'sfiles/needs it (born in PyAutoGalaxy#502 / autolens_profiling#70).Plan
AbstractPaths.preserve_in_zip(file_path)— no-op when the zip is absent; skip when the member already exists; arcname relative tooutput_path. Unit test: write into a zipped search'sfiles/, preserve,restore(), assert survival.result.paths.preserve_in_zip(...); delete the private helper.self.paths.preserve_in_zip(...); delete the cross-import.Suggested branch:
feature/preserve-in-zip