-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Description
- As a developer I would like the import namespaces to be a little leaner so that I need fewer lines of imports
- As a scientist I would like imports such as
fitting_utilsto have more concise names
For the test on CRISP our imports ended up looking like this, for relatively simple scans:
from ibex_bluesky_core.callbacks.file_logger import HumanReadableFileCallback
from ibex_bluesky_core.callbacks.fitting import LiveFit
from ibex_bluesky_core.callbacks.fitting.livefit_logger import LiveFitLogger
from ibex_bluesky_core.callbacks.fitting.fitting_utils import Fit, Linear
from ibex_bluesky_core.callbacks.plotting import LivePlot
from ibex_bluesky_core.devices import get_pv_prefix
from ibex_bluesky_core.devices.block import BlockRw, BlockWriteConfig, block_rw
from ibex_bluesky_core.devices.simpledae import SimpleDae
from ibex_bluesky_core.devices.simpledae.controllers import (
PeriodPerPointController,
RunPerPointController,
)
from ibex_bluesky_core.devices.simpledae.reducers import MonitorNormalizer
from ibex_bluesky_core.devices.simpledae.waiters import GoodFramesWaiter, PeriodGoodFramesWaiter
from ibex_bluesky_core.run_engine import get_run_engine
from ibex_bluesky_core.callbacks.fitting import fitting_utils as fit
This is a bit verbose, mostly due to having to import things from multiple levels in a hierarchy
Acceptance criteria
- Go through and add relevant public imports to
__init__.pys and__all__so that they are accessible from "higher level" modules - e.g. allsimpledaefunctionality should probably be accessible fromibex_bluesky_core.devices.simpledae. - We may consider making more of our modules
_private, so that it's clear what are the user-facing import paths and what is implementation details of the library
Notes
- We do not need to change our internal structure to do this - just expose things via imports and
__all__at the right levels.
Planning
10/01/25 - 00:40:50