From 30ab9284644ff7d1956b468bd8e21b9a6cd3ff71 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 --- autocti/__init__.py | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/autocti/__init__.py b/autocti/__init__.py index 0b9ce4be..35cb11db 100644 --- a/autocti/__init__.py +++ b/autocti/__init__.py @@ -79,3 +79,34 @@ conf.instance.register(__file__) __version__ = "2024.11.13.2" + +# --------------------------------------------------------------------------- +# 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, +)