From cfbb6ca559a21b411713e9721e76ec2db3439a60 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 18 Jul 2026 21:02:08 +0000 Subject: [PATCH] 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 Claude-Session: https://claude.ai/code/session_013ciVftxvYpefh59wSkR7jN --- autoarray/__init__.py | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/autoarray/__init__.py b/autoarray/__init__.py index dfd83c9f..e39937da 100644 --- a/autoarray/__init__.py +++ b/autoarray/__init__.py @@ -107,3 +107,34 @@ conf.instance.register(__file__) __version__ = "2026.7.9.1" + +# --------------------------------------------------------------------------- +# Public re-export of the autoconf 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 +# 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 ( + output_to_fits, + hdu_list_for_output_from, + ndarray_via_fits_from, + ndarray_via_hdu_from, + header_obj_from, +) +from autoconf.test_mode import ( + with_test_mode_segment, + skip_visualization, + skip_fit_output, + skip_checks, + is_test_mode, + test_mode_level, +)