From f1fa2f18d89a11ffeea8d25ec2831aca18ad3464 Mon Sep 17 00:00:00 2001 From: CamDavidsonPilon Date: Mon, 15 Jul 2024 17:48:35 -0400 Subject: [PATCH] import automations --- pioreactor/automations/dosing/__init__.py | 2 +- pioreactor/automations/led/__init__.py | 2 +- pioreactor/background_jobs/__init__.py | 2 -- pioreactor/cli/run.py | 9 +++++---- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/pioreactor/automations/dosing/__init__.py b/pioreactor/automations/dosing/__init__.py index e038c9ea..4af36bc2 100644 --- a/pioreactor/automations/dosing/__init__.py +++ b/pioreactor/automations/dosing/__init__.py @@ -9,5 +9,5 @@ from .chemostat import Chemostat from .fed_batch import FedBatch from .pid_morbidostat import PIDMorbidostat -from .silent import Silent +from .silent import Silent as DosingSilent from .turbidostat import Turbidostat diff --git a/pioreactor/automations/led/__init__.py b/pioreactor/automations/led/__init__.py index 2baebf5d..a1169fa5 100644 --- a/pioreactor/automations/led/__init__.py +++ b/pioreactor/automations/led/__init__.py @@ -2,4 +2,4 @@ from __future__ import annotations from .light_dark_cycle import LightDarkCycle -from .silent import Silent +from .silent import Silent as LEDSilent diff --git a/pioreactor/background_jobs/__init__.py b/pioreactor/background_jobs/__init__.py index 92fb7880..73cf54ba 100644 --- a/pioreactor/background_jobs/__init__.py +++ b/pioreactor/background_jobs/__init__.py @@ -1,4 +1,2 @@ # -*- coding: utf-8 -*- -# needed to import to "load" the automation subclasses, -# and hence the *-controller will register them. from __future__ import annotations diff --git a/pioreactor/cli/run.py b/pioreactor/cli/run.py index a4e64fff..191b4ea2 100644 --- a/pioreactor/cli/run.py +++ b/pioreactor/cli/run.py @@ -1,11 +1,13 @@ # -*- coding: utf-8 -*- -# run.py from __future__ import annotations import click from pioreactor import actions from pioreactor import plugin_management +from pioreactor.automations.dosing import * # noqa: F403, F401 +from pioreactor.automations.led import * # noqa: F403, F401 +from pioreactor.automations.temperature import * # noqa: F403, F401 from pioreactor.background_jobs.dosing_automation import click_dosing_automation from pioreactor.background_jobs.growth_rate_calculating import click_growth_rate_calculating from pioreactor.background_jobs.leader.mqtt_to_db_streaming import click_mqtt_to_db_streaming @@ -16,9 +18,8 @@ from pioreactor.background_jobs.stirring import click_stirring from pioreactor.background_jobs.temperature_automation import click_temperature_automation from pioreactor.whoami import am_I_leader -from pioreactor.automations.dosing import * -from pioreactor.automations.temperature import * -from pioreactor.automations.led import * + +# required to "discover" automations @click.group(short_help="run a job")