Skip to content

feat: CTI resurrection Phase 0 — resurrect + register PyAutoCTI #82

Closed

Description

@Jammy2211

Overview

Phase 0 of the CTI resurrection epic: PyAutoCTI, autocti_workspace and autocti_workspace_test have been unmaintained for ~2 years (last pushes 2024-11-13 / 2023-02-21) and fell out of the PyAutoLabs ecosystem. This phase brings the repos back under management (org transfer done, workspace checkout, repos.yaml registration) and makes the library importable and unit-test-green against the current autoconf/autofit/autoarray stack, deferring the visualization rewrite to Phase 1.

Plan

  • Transfer the three repos to the PyAutoLabs org (done 2026-07-16) and clone them into the workspace.
  • Register all three in PyAutoMind/repos.yaml and regenerate the routing tables (repos_sync.py --write).
  • arcticpy install spike: verify the hard arcticpy==2.6 dependency (source-only C++ tarball, Dec 2023) builds and imports on Python 3.11/3.12 with modern numpy; fall back to lazy clocker imports / patched re-release / vendoring in that order.
  • Modernise packaging: setup.py with exact autoconf/autofit/autoarray=={VERSION} pins → pyproject.toml with floor dependencies and dynamic version, matching PyAutoGalaxy.
  • Fix the ~15 non-visualization broken imports so import autocti succeeds with the plot subpackage quarantined until Phase 1.
  • Get the test_autocti suite (96 files) collecting and passing, plot tests skipped/quarantined.

Epic context (later phases get their own prompts/issues)

Phase 1 viz migration (Plotter/PlotterInterface objects → per-domain plot/*_plots.py matplotlib functions + model/visualizer.py, mirroring PyAutoGalaxy) → Phase 2 autofit sync → Phase 3 CI + ecosystem plumbing (Actions, Build/Heart/docs-hub/RTD) → Phase 4 autocti_workspace update (118 scripts / 79 notebooks) → Phase 5 autocti_workspace_test rebuild (preserving the Euclid tvac/temporal heritage) + first modern PyPI release.

Detailed implementation plan

Affected Repositories

  • PyAutoCTI (primary)
  • PyAutoMind (repos.yaml registration)

Branch Survey

Repository Current Branch Dirty?
PyAutoCTI main (remote only — not yet cloned locally; stale feature/* branches from ≤2024 to be triaged in cleanup) n/a
./PyAutoMind main clean

Suggested branch: feature/cti-resurrection-phase0

Implementation Steps

  1. Clone PyAutoLabs/{PyAutoCTI, autocti_workspace, autocti_workspace_test} into ~/Code/PyAutoLabs/.
  2. Add the three repos to PyAutoMind/repos.yaml (library / workspace / workspace_test categories, one-line roles); run python3 PyAutoMind/scripts/repos_sync.py --write; commit regenerated tables.
  3. Worktree ~/Code/PyAutoLabs-wt/cti-resurrection-phase0/ on feature/cti-resurrection-phase0 for PyAutoCTI.
  4. arcticpy spike: pip install arcticpy==2.6 into the dev venv on py3.11; if the C++ build or import fails, make autocti/clocker/* imports lazy so import autocti works without arctic, and record the arctic-refresh follow-up.
  5. Replace setup.py/requirements.txt exact-pin scheme with pyproject.toml (dynamic version, floor deps autoconf/autofit/autoarray, optional arcticpy extra) modeled on PyAutoGalaxy/pyproject.toml.
  6. Fix non-viz import drift (survey 2026-07-16): autoarray Mask → Mask1D/Mask2D; removed module aliases (array_, grid_, sparse_, mask_); autofit.non_linear.plot.{mcmc,mle,nest}_plotters fallout in search plotting hooks; quarantine autocti/plot/ + */plot/*_plotters.py + model/plotter_interface.py behind Phase 1.
  7. pytest test_autocti green (plot tests skipped), numpy-only.

Key Files

  • autocti/__init__.py — eager clocker import (arcticpy hard dep)
  • autocti/clocker/{one_d,two_d}.py — arcticpy imports
  • setup.py, requirements.txt, optional_requirements.txt — packaging modernisation
  • autocti/plot/, autocti/*/plot/, autocti/*/model/plotter_interface.py — Phase-1 quarantine boundary
  • PyAutoMind/repos.yaml — body-map registration

Original Prompt

Click to expand starting prompt

PyAutoMind prompt: draft/feature/autocti/cti_resurrection_phase0_resurrect_and_register.md

You'll see that I used gto work on CTI (PyAutoCTI, autocti_workspace, autocti_workspace_test), but its been around 2 years and these repos have become outdated, and un maintained. With fable, i now have the time and capacity to bring them back into the PyAuto ecosystem. Can you scope out an epic task which will bring them back into the ecosystem, update them to be in sync with the new autofit, update them to use the vsiualization API now used on autolens and other projects (e.g. epic removal of Plotter objects in favour of matplotlib) and whateevr else you think is required? I guess also docs clean up, etc. So, broadly speaking, look at the CTI repos and stage how we update them and then well do the work.

Activity

  1. Jammy2211 commented on Jul 16, 2026

    @Jammy2211
    CollaboratorAuthor

    Phase 0 shipped — PR #83 (pending-release)

    The library is alive again: import autocti is clean and test_autocti is green (236 passed / 5 skipped) on Python 3.12 + numpy 2.2.6 against current autoconf/autofit/autoarray.

    Milestones this phase:

    • ✅ Org transfer Jammy2211/ → PyAutoLabs/ for all three CTI repos (redirects intact); registered in PyAutoMind/repos.yaml + regenerated routing tables.
    • ✅ arcticpy 2.6 spike resolved — it builds and clocks correctly on py3.12/numpy 2.2.6. Two traps, both documented in AGENTS.md: it needs libgsl-dev headers (local dpkg-extract works without root), and a naive pip install arcticpy downgrades numpy below 2.0 — install with --no-build-isolation --no-deps. Upstream fix (wheels + relaxed numpy pin) worth pursuing later.
    • ✅ Packaging modernized: pyproject.toml + setuptools-scm floors, mirroring PyAutoGalaxy.
    • ✅ Viz layer quarantined behind Phase 1 (plot subpackage detached, Analysis visualizers log-and-return, plot tests conftest-skipped).
    • ✅ Drift fixes: prior configs gaussian_limits→limits, Mask2D rebuild in extract/, autoconf.fitsable I/O, consolidated dataset.fits save/load (matches ag), GridsInterface on Dataset1D, simulator kwarg rename, ou_sim Array2D wrapping.
    • ⏭ 5 aggregator tests skipped pending the Phase 2 AnalysisFactor/FactorGraphModel port (analysis summing removed from autofit).

    Shipped through Heart RED (6 pre-existing, CTI-unrelated reasons) on human ack 2026-07-16; merge stays human.

    Next: Phase 1 — Plotter→matplotlib visualization migration (own prompt/issue once this merges). Side-find for ag: autogalaxy/config/priors/ellipse/ellipse_multipole.yaml still carries gaussian_limits, a latent crash if those priors are ever instantiated.

  2. Jammy2211 commented on Jul 17, 2026

    @Jammy2211
    CollaboratorAuthor

    Phase 0 complete — PR #83 merged (ab4f0c8), completion record PyAutoMind/complete/2026/07/cti-resurrection-phase0.md. Closing this phase issue; Phase 1 (Plotter→matplotlib viz migration) gets its own issue next.

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