diff --git a/docs/explanations/events.md b/docs/explanations/events.md index ff0388fe28..7823408f15 100644 --- a/docs/explanations/events.md +++ b/docs/explanations/events.md @@ -16,14 +16,14 @@ a plan has started, finished, paused, errored etc. See the example below: ![sequence of event emission compared to plan start/finish, in a complicated case](../images/bluesky-events.png) Note the gap between the start of the plan and the issue of the first [`run start document`](https://blueskyproject.io/event-model/main/user/explanations/data-model.html#run-start-document), and the similar gap -for the stop document vs end of the plan, thsse are typically used for setup and cleanup. +for the stop document vs end of the plan, these are typically used for setup and cleanup. Also note that a plan can produce an arbitrary number of runs. This decoupling is fine in an IPython terminal because a human user can see when a plan has started, can see when it's finished and can see which runs are associated with which plans. ## New Events -For the case of automation, we introduce a new set of events outside of the event model, specifically +For the case of automation, we introduce a new set of events outside the event model, specifically pertaining to the running of the plan and state of the `RunEngine`. At a minimum, an event is emitted every time the engine: diff --git a/src/blueapi/log.py b/src/blueapi/log.py index e7614567fd..1f28ad70bb 100644 --- a/src/blueapi/log.py +++ b/src/blueapi/log.py @@ -90,6 +90,7 @@ def set_up_stream_handler( Args: logger: Logger to attach handler to logging_config: LoggingConfig + filters: list of filters """ stream_handler = logging.StreamHandler() stream_handler.setLevel(logging_config.level) @@ -137,7 +138,7 @@ class IBMColorBlindSafeColors(enum.Enum): class ColorFormatter(logging.Formatter): - """Colors level_name of log using IBM color blind safe palette.""" + """Colors level_name of log using IBM color-blind safe palette.""" def _level_colour(self, level_no: int) -> tuple[int, int, int] | None: match level_no: diff --git a/src/blueapi/service/main.py b/src/blueapi/service/main.py index 9711f20053..74b6e8193e 100644 --- a/src/blueapi/service/main.py +++ b/src/blueapi/service/main.py @@ -364,7 +364,6 @@ def get_tasks( Retrieve tasks based on their status. The status of a newly created task is 'unstarted'. """ - tasks = [] if task_status: add_span_attributes({"status": task_status}) try: diff --git a/src/blueapi/worker/task_worker.py b/src/blueapi/worker/task_worker.py index 62435d2618..e1ed4970a9 100644 --- a/src/blueapi/worker/task_worker.py +++ b/src/blueapi/worker/task_worker.py @@ -213,7 +213,7 @@ def get_tasks_by_status(self, status: TaskStatusEnum) -> list[TrackableTask]: """ Retrieve a list of tasks based on their status. Args: - TaskStatusEnum: The status to filter tasks by. + status TaskStatusEnum: The status to filter tasks by. Returns: list[TrackableTask]: A list of tasks that match the given status. """