Skip to content

Commit 145946a

Browse files
Jammy2211claude
andauthored
refactor: re-export autoconf config surface from library __init__ (#92)
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. Claude-Session: https://claude.ai/code/session_013ciVftxvYpefh59wSkR7jN Co-authored-by: Claude <noreply@anthropic.com>
1 parent 31caac1 commit 145946a

1 file changed

Lines changed: 31 additions & 0 deletions

File tree

autocti/__init__.py

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,3 +79,34 @@
7979
conf.instance.register(__file__)
8080

8181
__version__ = "2024.11.13.2"
82+
83+
# ---------------------------------------------------------------------------
84+
# Public re-export of the autoconf configuration / serialization surface.
85+
#
86+
# Workspaces, tutorials and downstream code import these names from the science
87+
# library (e.g. ``from autolens import conf``) rather than depending on the
88+
# ``autoconf`` package directly, so the underlying configuration / serialization
89+
# layer stays an implementation detail of the library.
90+
# ---------------------------------------------------------------------------
91+
from autoconf import conf
92+
from autoconf import jax_wrapper
93+
from autoconf import fitsable
94+
from autoconf import setup_colab
95+
from autoconf import setup_notebook
96+
from autoconf.conf import with_config
97+
from autoconf.dictable import from_dict, from_json, to_dict, output_to_json
98+
from autoconf.fitsable import (
99+
output_to_fits,
100+
hdu_list_for_output_from,
101+
ndarray_via_fits_from,
102+
ndarray_via_hdu_from,
103+
header_obj_from,
104+
)
105+
from autoconf.test_mode import (
106+
with_test_mode_segment,
107+
skip_visualization,
108+
skip_fit_output,
109+
skip_checks,
110+
is_test_mode,
111+
test_mode_level,
112+
)

0 commit comments

Comments
 (0)