Skip to content

Commit 486d5bf

Browse files
committed
refactor: re-export autoconf config surface from library __init__
Expose the autoconf (Nerves) configuration/serialization surface as a deliberate public API of each science library, so workspaces and downstream code can `from autolens import conf` (and jax_wrapper, setup_colab, setup_notebook, fitsable, with_config, dictable/fitsable/test_mode helpers) rather than importing the `autoconf` package directly. This keeps the config layer an implementation detail behind the library namespace. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013ciVftxvYpefh59wSkR7jN
1 parent 61fbca9 commit 486d5bf

1 file changed

Lines changed: 31 additions & 0 deletions

File tree

autogalaxy/__init__.py

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,3 +148,34 @@ def __getattr__(name):
148148
globals()["interop"] = interop
149149
return interop
150150
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
151+
152+
# ---------------------------------------------------------------------------
153+
# Public re-export of the autoconf configuration / serialization surface.
154+
#
155+
# Workspaces, tutorials and downstream code import these names from the science
156+
# library (e.g. ``from autolens import conf``) rather than depending on the
157+
# ``autoconf`` package directly, so the underlying configuration / serialization
158+
# layer stays an implementation detail of the library.
159+
# ---------------------------------------------------------------------------
160+
from autoconf import conf
161+
from autoconf import jax_wrapper
162+
from autoconf import fitsable
163+
from autoconf import setup_colab
164+
from autoconf import setup_notebook
165+
from autoconf.conf import with_config
166+
from autoconf.dictable import from_dict, from_json, to_dict, output_to_json
167+
from autoconf.fitsable import (
168+
output_to_fits,
169+
hdu_list_for_output_from,
170+
ndarray_via_fits_from,
171+
ndarray_via_hdu_from,
172+
header_obj_from,
173+
)
174+
from autoconf.test_mode import (
175+
with_test_mode_segment,
176+
skip_visualization,
177+
skip_fit_output,
178+
skip_checks,
179+
is_test_mode,
180+
test_mode_level,
181+
)

0 commit comments

Comments
 (0)