Skip to content

refactor: promote search-zip preservation to a public paths method #1389

Closed

Description

@Jammy2211

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

Activity

  1. added a commit that references this issue on Jul 17, 2026
  2. Jammy2211 commented on Jul 17, 2026

    @Jammy2211
    CollaboratorAuthor

    Phase 1 shipped — 2026-07-17

    Phase 2 (remaining, blocked): switch callers and delete the private helper once potential-correction-port frees PyAutoGalaxy/PyAutoLens:

    • PyAutoGalaxy: adapt_images.py → result.paths.preserve_in_zip(cache_path); delete _append_to_search_zip.
    • PyAutoLens: result.py → self.paths.preserve_in_zip(cache_path); drop the autogalaxy cross-import.
    • Also then: remove the bypass-.completed stopgap in autolens_profiling/pipeline_resume/slam_resume.py (no-op since PyAutoFit#1388) once compile-census-final frees that repo — same cleanup batch.
  3. Jammy2211 commented on Jul 17, 2026

    @Jammy2211
    CollaboratorAuthor

    Phase 2 shipped — 2026-07-17, all riders closed

    Everything in this issue's checklist is done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions