From b21812ab2c8708e456992933eaffd9266349b01f Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 19 Jul 2026 11:46:42 +0000 Subject: [PATCH 1/2] refactor!: depend on and import `autonerves` (renamed from autoconf) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Update the pyproject dependency pins and all `import autoconf` / `from autoconf` statements (including the config re-export block) to the renamed package `autonerves`. Repo-name references ("PyAutoConf") are unchanged — they flip with the GitHub repo rename in the coordinated cutover. BREAKING CHANGE: this library now requires `autonerves` instead of `autoconf`. CI resolves it from the same-named PyAutoConf branch (built as autonerves). Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_013ciVftxvYpefh59wSkR7jN --- AGENTS.md | 4 +- autolens/__init__.py | 40 +++++++++---------- autolens/analysis/analysis/dataset.py | 6 +-- autolens/analysis/latent.py | 2 +- autolens/analysis/result.py | 2 +- autolens/config/latent.yaml | 2 +- autolens/imaging/fit_imaging.py | 2 +- autolens/imaging/model/analysis.py | 2 +- autolens/interferometer/fit_interferometer.py | 2 +- autolens/interferometer/model/analysis.py | 4 +- autolens/lens/los.py | 2 +- autolens/lens/plot/tracer_plots.py | 8 ++-- autolens/lens/to_inversion.py | 2 +- autolens/point/dataset.py | 4 +- docs/general/configs.md | 2 +- docs/installation/source.md | 4 +- ...ray-plot-plots-direct-matplotlib-mod.patch | 4 +- .../analysis/test_analysis_dataset.py | 4 +- test_autolens/analysis/test_analysis.py | 4 +- test_autolens/analysis/test_positions.py | 2 +- test_autolens/lens/test_tracer.py | 2 +- .../point/triangles/test_regressions.py | 2 +- test_autolens/test_config.py | 2 +- 23 files changed, 54 insertions(+), 54 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index da95a11b0..7c99fb99a 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -12,7 +12,7 @@ point-source datasets. Dependency direction: autolens sits at the top of the stack and may import all four layers below it — **autogalaxy**, **autoarray**, **autofit**, and -**autoconf**. Nothing in the ecosystem imports autolens. +**autonerves**. Nothing in the ecosystem imports autolens. ## Related repos @@ -51,7 +51,7 @@ is no black/ruff/flake8 gate — formatting is advisory. (`requires-python` in ## Configuration & defaults -autoconf supplies the packaged defaults under `autolens/config/`. Workspaces +autonerves supplies the packaged defaults under `autolens/config/`. Workspaces override them via their own `config/` directory; the test suite pushes a local config dir via `conf.instance.push(...)` in `test_autolens/conftest.py`. When a change adds a new config key, mirror it into the packaged defaults so diff --git a/autolens/__init__.py b/autolens/__init__.py index 2f4f6bb6f..19b7d518e 100644 --- a/autolens/__init__.py +++ b/autolens/__init__.py @@ -1,5 +1,5 @@ -from autoconf import jax_wrapper -from autoconf.dictable import from_dict, from_json, output_to_json, to_dict +from autonerves import jax_wrapper +from autonerves.dictable import from_dict, from_json, output_to_json, to_dict from autoarray import preprocess from autoarray.dataset.imaging.dataset import Imaging @@ -135,18 +135,18 @@ from . import util from . import potential_correction as pc -from autoconf import conf -from autoconf.fitsable import ndarray_via_hdu_from -from autoconf.fitsable import ndarray_via_fits_from -from autoconf.fitsable import header_obj_from -from autoconf.fitsable import output_to_fits -from autoconf.fitsable import hdu_list_for_output_from +from autonerves import conf +from autonerves.fitsable import ndarray_via_hdu_from +from autonerves.fitsable import ndarray_via_fits_from +from autonerves.fitsable import header_obj_from +from autonerves.fitsable import output_to_fits +from autonerves.fitsable import hdu_list_for_output_from conf.instance.register(__file__) __version__ = "2026.7.9.1" -from autoconf import check_version +from autonerves import check_version check_version(__version__) @@ -166,28 +166,28 @@ def __getattr__(name): raise AttributeError(f"module {__name__!r} has no attribute {name!r}") # --------------------------------------------------------------------------- -# Public re-export of the autoconf configuration / serialization surface. +# Public re-export of the autonerves configuration / serialization surface. # # Workspaces, tutorials and downstream code import these names from the science # library (e.g. ``from autolens import conf``) rather than depending on the -# ``autoconf`` package directly, so the underlying configuration / serialization +# ``autonerves`` package directly, so the underlying configuration / serialization # layer stays an implementation detail of the library. # --------------------------------------------------------------------------- -from autoconf import conf -from autoconf import jax_wrapper -from autoconf import fitsable -from autoconf import setup_colab -from autoconf import setup_notebook -from autoconf.conf import with_config -from autoconf.dictable import from_dict, from_json, to_dict, output_to_json -from autoconf.fitsable import ( +from autonerves import conf +from autonerves import jax_wrapper +from autonerves import fitsable +from autonerves import setup_colab +from autonerves import setup_notebook +from autonerves.conf import with_config +from autonerves.dictable import from_dict, from_json, to_dict, output_to_json +from autonerves.fitsable import ( output_to_fits, hdu_list_for_output_from, ndarray_via_fits_from, ndarray_via_hdu_from, header_obj_from, ) -from autoconf.test_mode import ( +from autonerves.test_mode import ( with_test_mode_segment, skip_visualization, skip_fit_output, diff --git a/autolens/analysis/analysis/dataset.py b/autolens/analysis/analysis/dataset.py index 1047da1f2..a71b236e8 100644 --- a/autolens/analysis/analysis/dataset.py +++ b/autolens/analysis/analysis/dataset.py @@ -17,8 +17,8 @@ import os from typing import List, Optional -from autoconf import conf -from autoconf.dictable import output_to_json +from autonerves import conf +from autonerves.dictable import output_to_json import autofit as af import autoarray as aa @@ -31,7 +31,7 @@ from autolens.analysis.positions import PositionsLH from autolens import exc -from autoconf.test_mode import skip_checks +from autonerves.test_mode import skip_checks logger = logging.getLogger(__name__) diff --git a/autolens/analysis/latent.py b/autolens/analysis/latent.py index 2d3329c96..e48352bc7 100644 --- a/autolens/analysis/latent.py +++ b/autolens/analysis/latent.py @@ -24,7 +24,7 @@ import numpy as np import autofit as af -from autoconf import conf +from autonerves import conf from autogalaxy.imaging.model.latent import ( ab_mag_via_flux_from, flux_mujy_via_ab_mag_from, diff --git a/autolens/analysis/result.py b/autolens/analysis/result.py index 9dcfcd3f6..8f4efb5b6 100644 --- a/autolens/analysis/result.py +++ b/autolens/analysis/result.py @@ -32,7 +32,7 @@ ) from autolens.lens.tracer import Tracer from autolens.point.solver import PointSolver -from autoconf.test_mode import is_test_mode, skip_checks +from autonerves.test_mode import is_test_mode, skip_checks logger = logging.getLogger(__name__) diff --git a/autolens/config/latent.yaml b/autolens/config/latent.yaml index 48ef66aa4..b67da377b 100644 --- a/autolens/config/latent.yaml +++ b/autolens/config/latent.yaml @@ -15,7 +15,7 @@ # `false` and return NaN + one warning per process if enabled without # `magzero` (rather than raising, which would discard a converged search). # -# autoconf lowercases yaml keys at read time, so the registry/yaml names +# autonerves lowercases yaml keys at read time, so the registry/yaml names # must be snake_case-lowercase (this leaks into the `latent.csv` column # header — e.g. `total_lens_flux_mujy`, not `_muJy`). diff --git a/autolens/imaging/fit_imaging.py b/autolens/imaging/fit_imaging.py index feebe9e25..5c5703208 100644 --- a/autolens/imaging/fit_imaging.py +++ b/autolens/imaging/fit_imaging.py @@ -23,7 +23,7 @@ import numpy as np from typing import Dict, List, Optional -from autoconf import cached_property +from autonerves import cached_property import autoarray as aa import autogalaxy as ag diff --git a/autolens/imaging/model/analysis.py b/autolens/imaging/model/analysis.py index 6bcf17d76..b9b592245 100644 --- a/autolens/imaging/model/analysis.py +++ b/autolens/imaging/model/analysis.py @@ -18,7 +18,7 @@ import autofit as af import autogalaxy as ag -from autoconf.fitsable import hdu_list_for_output_from +from autonerves.fitsable import hdu_list_for_output_from from autolens.analysis.analysis.dataset import AnalysisDataset from autolens.analysis.latent import LatentLens diff --git a/autolens/interferometer/fit_interferometer.py b/autolens/interferometer/fit_interferometer.py index f61bc5606..3df2364c8 100644 --- a/autolens/interferometer/fit_interferometer.py +++ b/autolens/interferometer/fit_interferometer.py @@ -18,7 +18,7 @@ import numpy as np from typing import Dict, List, Optional -from autoconf import cached_property +from autonerves import cached_property import autoarray as aa import autogalaxy as ag diff --git a/autolens/interferometer/model/analysis.py b/autolens/interferometer/model/analysis.py index 2a9f1a652..617858477 100644 --- a/autolens/interferometer/model/analysis.py +++ b/autolens/interferometer/model/analysis.py @@ -16,8 +16,8 @@ import numpy as np from typing import Optional -from autoconf.dictable import to_dict -from autoconf.fitsable import hdu_list_for_output_from +from autonerves.dictable import to_dict +from autonerves.fitsable import hdu_list_for_output_from import autofit as af import autoarray as aa diff --git a/autolens/lens/los.py b/autolens/lens/los.py index 70d71522e..0f3f35a95 100644 --- a/autolens/lens/los.py +++ b/autolens/lens/los.py @@ -22,7 +22,7 @@ import autogalaxy as ag from autogalaxy.cosmology import Planck15 -from autoconf.test_mode import is_test_mode +from autonerves.test_mode import is_test_mode # Number of LOS halos retained per plane when ``PYAUTO_TEST_MODE`` is active. # Capping the population keeps the multi-plane ray-tracing and per-galaxy diff --git a/autolens/lens/plot/tracer_plots.py b/autolens/lens/plot/tracer_plots.py index 7d872a365..5bb785b46 100644 --- a/autolens/lens/plot/tracer_plots.py +++ b/autolens/lens/plot/tracer_plots.py @@ -53,7 +53,7 @@ def plane_image_from( aa.Array2D Plane image on the (possibly zoomed) grid. """ - from autoconf import conf + from autonerves import conf shape = grid.shape_native @@ -389,7 +389,7 @@ def fits_tracer( Directory in which to write ``tracer.fits``. """ from pathlib import Path - from autoconf.fitsable import hdu_list_for_output_from + from autonerves.fitsable import hdu_list_for_output_from output_path = Path(output_path) zoom = aa.Zoom2D(mask=grid.mask) @@ -439,8 +439,8 @@ def fits_source_plane_images( """ import ast from pathlib import Path - from autoconf import conf - from autoconf.fitsable import hdu_list_for_output_from + from autonerves import conf + from autonerves.fitsable import hdu_list_for_output_from output_path = Path(output_path) shape_native = tuple(ast.literal_eval( diff --git a/autolens/lens/to_inversion.py b/autolens/lens/to_inversion.py index 88054c3b2..9ca55c55c 100644 --- a/autolens/lens/to_inversion.py +++ b/autolens/lens/to_inversion.py @@ -20,7 +20,7 @@ import numpy as np -from autoconf import cached_property +from autonerves import cached_property import autoarray as aa import autogalaxy as ag diff --git a/autolens/point/dataset.py b/autolens/point/dataset.py index 55d2b722e..7d0315853 100644 --- a/autolens/point/dataset.py +++ b/autolens/point/dataset.py @@ -15,14 +15,14 @@ Two I/O surfaces are supported: -- JSON (via :func:`autoconf.output_to_json` / :func:`autoconf.from_json`) — exact +- JSON (via :func:`autonerves.output_to_json` / :func:`autonerves.from_json`) — exact round-trip, one file per ``PointDataset``; the canonical modeling input. - CSV (via :meth:`PointDataset.to_csv` / :meth:`PointDataset.from_csv` and the module-level :func:`output_to_csv` / :func:`list_from_csv`) — one row per observed image, grouped by ``name``, so that tens or hundreds of cluster-scale point sources can be edited in a single spreadsheet. """ -from autoconf import csvable +from autonerves import csvable from typing import List, Tuple, Optional, Union import autoarray as aa diff --git a/docs/general/configs.md b/docs/general/configs.md index 2bb658ed3..a502f5a84 100644 --- a/docs/general/configs.md +++ b/docs/general/configs.md @@ -15,7 +15,7 @@ The configuration path can also be set manually in a script using the project ** command (the path to the `output` folder where the results of a non-linear search are stored is also set below): ```bash -from autoconf import conf +from autonerves import conf conf.instance.push( config_path="path/to/config", diff --git a/docs/installation/source.md b/docs/installation/source.md index 3aabbce1a..98d554bcd 100644 --- a/docs/installation/source.md +++ b/docs/installation/source.md @@ -48,7 +48,7 @@ git clone https://github.com/PyAutoLabs/PyAutoLens Next, install the **PyAuto** parent projects via pip: ```bash -pip install autoconf +pip install autonerves pip install autofit pip install autoarray pip install autogalaxy @@ -114,7 +114,7 @@ git clone https://github.com/PyAutoLabs/PyAutoLens Next, install **PyAutoConf** via pip: ```bash -pip install autoconf +pip install autonerves ``` Next, install the source build dependencies of each project via pip: diff --git a/patches/autoarray/0001-PR-A1-Add-autoarray-plot-plots-direct-matplotlib-mod.patch b/patches/autoarray/0001-PR-A1-Add-autoarray-plot-plots-direct-matplotlib-mod.patch index 4e6ae15ef..1094db1f7 100644 --- a/patches/autoarray/0001-PR-A1-Add-autoarray-plot-plots-direct-matplotlib-mod.patch +++ b/patches/autoarray/0001-PR-A1-Add-autoarray-plot-plots-direct-matplotlib-mod.patch @@ -193,7 +193,7 @@ index 00000000..20f5f267 + + # --- colour normalisation -------------------------------------------------- + if use_log10: -+ from autoconf import conf as _conf ++ from autonerves import conf as _conf + + try: + log10_min = _conf.instance["visualize"]["general"]["general"][ @@ -649,7 +649,7 @@ index 00000000..4d1cc4f0 + Either ``"figures"`` (single-panel) or ``"subplots"`` (multi-panel). + """ + try: -+ from autoconf import conf ++ from autonerves import conf + + return tuple(conf.instance["visualize"]["general"][context]["figsize"]) + except Exception: diff --git a/test_autolens/analysis/analysis/test_analysis_dataset.py b/test_autolens/analysis/analysis/test_analysis_dataset.py index b402664a0..4767169f2 100644 --- a/test_autolens/analysis/analysis/test_analysis_dataset.py +++ b/test_autolens/analysis/analysis/test_analysis_dataset.py @@ -2,8 +2,8 @@ import os import pytest -from autoconf import conf -from autoconf.dictable import from_json +from autonerves import conf +from autonerves.dictable import from_json import autofit as af import autolens as al diff --git a/test_autolens/analysis/test_analysis.py b/test_autolens/analysis/test_analysis.py index 3ee244605..d20565a3a 100644 --- a/test_autolens/analysis/test_analysis.py +++ b/test_autolens/analysis/test_analysis.py @@ -3,8 +3,8 @@ import os import pytest -from autoconf import conf -from autoconf.dictable import from_json +from autonerves import conf +from autonerves.dictable import from_json import autofit as af import autolens as al diff --git a/test_autolens/analysis/test_positions.py b/test_autolens/analysis/test_positions.py index db7bf4875..4864c3c4d 100644 --- a/test_autolens/analysis/test_positions.py +++ b/test_autolens/analysis/test_positions.py @@ -2,7 +2,7 @@ from pathlib import Path import pytest -from autoconf.dictable import output_to_json, from_json, from_dict +from autonerves.dictable import output_to_json, from_json, from_dict from autofit.tools.util import open_ import autolens as al diff --git a/test_autolens/lens/test_tracer.py b/test_autolens/lens/test_tracer.py index 981e186f8..ad2b003b2 100644 --- a/test_autolens/lens/test_tracer.py +++ b/test_autolens/lens/test_tracer.py @@ -2,7 +2,7 @@ import pytest from pathlib import Path -from autoconf.dictable import from_json, output_to_json +from autonerves.dictable import from_json, output_to_json import autofit as af import autolens as al diff --git a/test_autolens/point/triangles/test_regressions.py b/test_autolens/point/triangles/test_regressions.py index c1fc9d5db..295d662b7 100644 --- a/test_autolens/point/triangles/test_regressions.py +++ b/test_autolens/point/triangles/test_regressions.py @@ -1,4 +1,4 @@ -from autoconf.dictable import from_dict +from autonerves.dictable import from_dict import autolens as al from autolens.point.solver import PointSolver diff --git a/test_autolens/test_config.py b/test_autolens/test_config.py index c671dfa96..172fade7d 100644 --- a/test_autolens/test_config.py +++ b/test_autolens/test_config.py @@ -2,7 +2,7 @@ import pytest -from autoconf import conf +from autonerves import conf directory = Path(__file__).resolve().parent From 017f1057f28a8d994cf92d7648eb2c50751ce4e0 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 19 Jul 2026 11:54:37 +0000 Subject: [PATCH 2/2] ci: re-trigger after lib-tests head_ref fix