Skip to content

Commit 1b8d36e

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 6e4e72c commit 1b8d36e

1 file changed

Lines changed: 31 additions & 0 deletions

File tree

autolens/__init__.py

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,3 +164,34 @@ def __getattr__(name):
164164
globals()["interop"] = interop
165165
return interop
166166
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
167+
168+
# ---------------------------------------------------------------------------
169+
# Public re-export of the autoconf configuration / serialization surface.
170+
#
171+
# Workspaces, tutorials and downstream code import these names from the science
172+
# library (e.g. ``from autolens import conf``) rather than depending on the
173+
# ``autoconf`` package directly, so the underlying configuration / serialization
174+
# layer stays an implementation detail of the library.
175+
# ---------------------------------------------------------------------------
176+
from autoconf import conf
177+
from autoconf import jax_wrapper
178+
from autoconf import fitsable
179+
from autoconf import setup_colab
180+
from autoconf import setup_notebook
181+
from autoconf.conf import with_config
182+
from autoconf.dictable import from_dict, from_json, to_dict, output_to_json
183+
from autoconf.fitsable import (
184+
output_to_fits,
185+
hdu_list_for_output_from,
186+
ndarray_via_fits_from,
187+
ndarray_via_hdu_from,
188+
header_obj_from,
189+
)
190+
from autoconf.test_mode import (
191+
with_test_mode_segment,
192+
skip_visualization,
193+
skip_fit_output,
194+
skip_checks,
195+
is_test_mode,
196+
test_mode_level,
197+
)

0 commit comments

Comments
 (0)