Skip to content

Commit cb66db6

Browse files
Jammy2211claude
andauthored
refactor!: depend on and import autonerves (renamed from autoconf) (#394)
* refactor!: depend on and import `autonerves` (renamed from autoconf) 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 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013ciVftxvYpefh59wSkR7jN * ci: re-trigger after lib-tests head_ref fix --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 062b61a commit cb66db6

48 files changed

Lines changed: 99 additions & 99 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

AGENTS.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ numerical-utility layer: masks, arrays, (y,x) grids, imaging/interferometer
1010
datasets, inversions/pixelizations, convolution/over-sampling operators, and
1111
the grid decorators used throughout PyAutoGalaxy and PyAutoLens.
1212

13-
Dependency direction: autoarray depends on **autoconf** only. It does **not**
13+
Dependency direction: autoarray depends on **autonerves** only. It does **not**
1414
import `autofit`, `autogalaxy`, or `autolens` — never add such an import.
15-
Shared utilities (e.g. `test_mode`, `jax_wrapper`) belong in autoconf.
15+
Shared utilities (e.g. `test_mode`, `jax_wrapper`) belong in autonerves.
1616

1717
## Related repos
1818

@@ -55,7 +55,7 @@ is no black/ruff/flake8 gate — formatting is advisory. (`requires-python` in
5555

5656
## Configuration & defaults
5757

58-
autoconf supplies the packaged defaults under `autoarray/config/`. Workspaces
58+
autonerves supplies the packaged defaults under `autoarray/config/`. Workspaces
5959
override them via their own `config/` directory; the test suite pushes a local
6060
config dir via `conf.instance.push(...)` in `test_autoarray/conftest.py`. When
6161
a change adds a new config key, mirror it into the packaged defaults so
@@ -97,7 +97,7 @@ from `AbstractNDArray`; `.array` returns the raw `numpy.ndarray` / `jax.Array`.
9797

9898
## Key rules / footguns
9999

100-
- Import direction: autoconf only — never `autofit` / `autogalaxy` / `autolens`.
100+
- Import direction: autonerves only — never `autofit` / `autogalaxy` / `autolens`.
101101
- Grid-consuming functions decorated with `@aa.decorators.to_array` / `to_grid`
102102
/ `to_vector_yx` must return a **raw array** — the decorator wraps it. (Write
103103
`aa.decorators.*`; `aa.grid_dec` is a deprecated alias.)

autoarray/__init__.py

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
from autoconf import jax_wrapper
2-
from autoconf.dictable import register_parser
3-
from autoconf import conf
1+
from autonerves import jax_wrapper
2+
from autonerves.dictable import register_parser
3+
from autonerves import conf
44

55
conf.instance.register(__file__)
66

@@ -97,40 +97,40 @@
9797
from .structures.visibilities import Visibilities
9898
from .structures.visibilities import VisibilitiesNoiseMap
9999

100-
from autoconf import conf
101-
from autoconf.fitsable import ndarray_via_hdu_from
102-
from autoconf.fitsable import ndarray_via_fits_from
103-
from autoconf.fitsable import header_obj_from
104-
from autoconf.fitsable import output_to_fits
105-
from autoconf.fitsable import hdu_list_for_output_from
100+
from autonerves import conf
101+
from autonerves.fitsable import ndarray_via_hdu_from
102+
from autonerves.fitsable import ndarray_via_fits_from
103+
from autonerves.fitsable import header_obj_from
104+
from autonerves.fitsable import output_to_fits
105+
from autonerves.fitsable import hdu_list_for_output_from
106106

107107
conf.instance.register(__file__)
108108

109109
__version__ = "2026.7.9.1"
110110

111111
# ---------------------------------------------------------------------------
112-
# Public re-export of the autoconf configuration / serialization surface.
112+
# Public re-export of the autonerves configuration / serialization surface.
113113
#
114114
# Workspaces, tutorials and downstream code import these names from the science
115115
# library (e.g. ``from autolens import conf``) rather than depending on the
116-
# ``autoconf`` package directly, so the underlying configuration / serialization
116+
# ``autonerves`` package directly, so the underlying configuration / serialization
117117
# layer stays an implementation detail of the library.
118118
# ---------------------------------------------------------------------------
119-
from autoconf import conf
120-
from autoconf import jax_wrapper
121-
from autoconf import fitsable
122-
from autoconf import setup_colab
123-
from autoconf import setup_notebook
124-
from autoconf.conf import with_config
125-
from autoconf.dictable import from_dict, from_json, to_dict, output_to_json
126-
from autoconf.fitsable import (
119+
from autonerves import conf
120+
from autonerves import jax_wrapper
121+
from autonerves import fitsable
122+
from autonerves import setup_colab
123+
from autonerves import setup_notebook
124+
from autonerves.conf import with_config
125+
from autonerves.dictable import from_dict, from_json, to_dict, output_to_json
126+
from autonerves.fitsable import (
127127
output_to_fits,
128128
hdu_list_for_output_from,
129129
ndarray_via_fits_from,
130130
ndarray_via_hdu_from,
131131
header_obj_from,
132132
)
133-
from autoconf.test_mode import (
133+
from autonerves.test_mode import (
134134
with_test_mode_segment,
135135
skip_visualization,
136136
skip_fit_output,

autoarray/abstract_ndarray.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
if TYPE_CHECKING:
1515
from autoarray.structures.abstract_structure import Structure
1616

17-
from autoconf import conf
17+
from autonerves import conf
1818

1919

2020
def to_new_array(func):
@@ -66,7 +66,7 @@ def wrapper(self, other):
6666

6767

6868
def _register_as_pytree(cls):
69-
"""Register ``cls`` with ``jax.tree_util`` via the lazy autoconf wrapper.
69+
"""Register ``cls`` with ``jax.tree_util`` via the lazy autonerves wrapper.
7070
7171
Gated: only called when a subclass instance is constructed on the JAX path
7272
(``xp is not np``). The registration is class-scoped via
@@ -75,7 +75,7 @@ def _register_as_pytree(cls):
7575
"""
7676
if cls in _pytree_registered_classes:
7777
return
78-
from autoconf.jax_wrapper import register_pytree_node
78+
from autonerves.jax_wrapper import register_pytree_node
7979

8080
register_pytree_node(cls, cls.instance_flatten, cls.instance_unflatten)
8181
_pytree_registered_classes.add(cls)
@@ -101,8 +101,8 @@ def register_instance_pytree(cls, no_flatten=()):
101101
"""
102102
if cls in _pytree_registered_classes:
103103
return
104-
from autoconf.jax_wrapper import register_pytree_node
105-
from autoconf.tools.decorators import cached_property_names
104+
from autonerves.jax_wrapper import register_pytree_node
105+
from autonerves.tools.decorators import cached_property_names
106106

107107
# Extend the caller-supplied no_flatten set with every
108108
# ``cached_property``-style descriptor on ``cls`` so derived caches
@@ -180,7 +180,7 @@ def instance_flatten(cls, instance):
180180
"""
181181
Flatten an instance of an autoarray class into a tuple of its attributes (i.e.. a pytree)
182182
"""
183-
from autoconf.tools.decorators import cached_property_names
183+
from autonerves.tools.decorators import cached_property_names
184184

185185
# Union the class-level ``__no_flatten__`` opt-out with any
186186
# ``cached_property`` descriptor names so derived caches don't

autoarray/dataset/interferometer/dataset.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
import numpy as np
33
from typing import Optional
44

5-
from autoconf.fitsable import ndarray_via_fits_from
6-
from autoconf import cached_property
5+
from autonerves.fitsable import ndarray_via_fits_from
6+
from autonerves import cached_property
77

88
from autoarray.dataset.abstract.dataset import AbstractDataset
99
from autoarray.dataset.grids import GridsDataset

autoarray/dataset/plot/imaging_plots.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ def fits_imaging(
219219
overwrite : bool
220220
If ``True`` existing files are replaced.
221221
"""
222-
from autoconf.fitsable import output_to_fits, hdu_list_for_output_from, write_hdu_list
222+
from autonerves.fitsable import output_to_fits, hdu_list_for_output_from, write_hdu_list
223223

224224
header_dict = dataset.data.mask.header_dict if hasattr(dataset.data.mask, "header_dict") else None
225225

autoarray/dataset/plot/interferometer_plots.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ def fits_interferometer(
177177
overwrite : bool
178178
If ``True`` existing files are replaced.
179179
"""
180-
from autoconf.fitsable import output_to_fits, hdu_list_for_output_from, write_hdu_list
180+
from autonerves.fitsable import output_to_fits, hdu_list_for_output_from, write_hdu_list
181181

182182
if file_path is not None:
183183
values_list = []

autoarray/inversion/inversion/abstract.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import numpy as np
44
from typing import Dict, List, Optional, Type, Union
55

6-
from autoconf import cached_property, is_test_mode
6+
from autonerves import cached_property, is_test_mode
77

88
from autoarray.dataset.imaging.dataset import Imaging
99
from autoarray.dataset.interferometer.dataset import Interferometer

autoarray/inversion/inversion/imaging/mapping.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import numpy as np
22
from typing import Dict, List, Optional, Union
33

4-
from autoconf import cached_property
4+
from autonerves import cached_property
55

66
from autoarray.dataset.imaging.dataset import Imaging
77
from autoarray.inversion.inversion.dataset_interface import DatasetInterface

autoarray/inversion/inversion/imaging/sparse.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import numpy as np
22
from typing import Dict, List, Optional, Union
33

4-
from autoconf import cached_property
4+
from autonerves import cached_property
55

66
from autoarray.dataset.imaging.dataset import Imaging
77
from autoarray.inversion.inversion.dataset_interface import DatasetInterface

autoarray/inversion/inversion/imaging_numba/sparse.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import numpy as np
22
from typing import Dict, List, Optional, Union
33

4-
from autoconf import cached_property
4+
from autonerves import cached_property
55

66
from autoarray.dataset.imaging.dataset import Imaging
77
from autoarray.inversion.inversion.dataset_interface import DatasetInterface

0 commit comments

Comments
 (0)