Skip to content

Commit

Permalink
Merge branch 'main' into 3_uncertainties_in_plots_and_fits
Browse files Browse the repository at this point in the history
  • Loading branch information
jackbdoughty authored Nov 20, 2024
2 parents bba3a6b + 6263f03 commit b8f9526
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 8 deletions.
9 changes: 8 additions & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,17 @@
author = "ISIS Experiment Controls"
release = "0.1"


# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

nitpicky = True
nitpick_ignore_regex = [
("py:func", r"^(?!ibex_bluesky_core\.).*$"),
("py:class", r"^(?!ibex_bluesky_core\.).*$"),
("py:class", r"^.*\.T$"),
("py:obj", r"^.*\.T$"),
]

myst_enable_extensions = ["dollarmath"]

extensions = [
Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -110,3 +110,6 @@ reportUntypedClassDecorator = true
reportUntypedFunctionDecorator = true

[tool.setuptools_scm]

[tool.build_sphinx]

2 changes: 1 addition & 1 deletion src/ibex_bluesky_core/devices/block.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

logger = logging.getLogger(__name__)

"""Block data type"""
# Block data type
T = TypeVar("T")


Expand Down
12 changes: 6 additions & 6 deletions src/ibex_bluesky_core/devices/simpledae/waiters.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
T = TypeVar("T", int, float)


class _SimpleWaiter(Waiter, Generic[T], metaclass=ABCMeta):
class SimpleWaiter(Waiter, Generic[T], metaclass=ABCMeta):
"""Wait for a single DAE variable to be greater or equal to a specified numeric value."""

def __init__(self, value: T) -> None:
Expand All @@ -47,34 +47,34 @@ def additional_readable_signals(self, dae: "SimpleDae") -> list[Device]:

@abstractmethod
def get_signal(self, dae: "SimpleDae") -> SignalR[T]:
pass
"""Get the numeric signal to wait for."""


class PeriodGoodFramesWaiter(_SimpleWaiter[int]):
class PeriodGoodFramesWaiter(SimpleWaiter[int]):
"""Wait for period good frames to reach a user-specified value."""

def get_signal(self, dae: "SimpleDae") -> SignalR[int]:
"""Wait for period good frames."""
return dae.period.good_frames


class GoodFramesWaiter(_SimpleWaiter[int]):
class GoodFramesWaiter(SimpleWaiter[int]):
"""Wait for good frames to reach a user-specified value."""

def get_signal(self, dae: "SimpleDae") -> SignalR[int]:
"""Wait for good frames."""
return dae.good_frames


class GoodUahWaiter(_SimpleWaiter[float]):
class GoodUahWaiter(SimpleWaiter[float]):
"""Wait for good microamp-hours to reach a user-specified value."""

def get_signal(self, dae: "SimpleDae") -> SignalR[float]:
"""Wait for good uah."""
return dae.good_uah


class MEventsWaiter(_SimpleWaiter[float]):
class MEventsWaiter(SimpleWaiter[float]):
"""Wait for a user-specified number of millions of events."""

def get_signal(self, dae: "SimpleDae") -> SignalR[float]:
Expand Down

0 comments on commit b8f9526

Please sign in to comment.