diff --git a/src/dasmon_app/dasmon_listener/listener_daemon.py b/src/dasmon_app/dasmon_listener/listener_daemon.py index f1d73ba8..0744ee97 100644 --- a/src/dasmon_app/dasmon_listener/listener_daemon.py +++ b/src/dasmon_app/dasmon_listener/listener_daemon.py @@ -1,6 +1,7 @@ """ DASMON listener daemon """ + import sys import argparse diff --git a/src/webmon_app/reporting/dasmon/legacy_status.py b/src/webmon_app/reporting/dasmon/legacy_status.py index cbba6f13..404f6a87 100644 --- a/src/webmon_app/reporting/dasmon/legacy_status.py +++ b/src/webmon_app/reporting/dasmon/legacy_status.py @@ -4,6 +4,7 @@ @author: M. Doucet, Oak Ridge National Laboratory @copyright: 2015 Oak Ridge National Laboratory """ + import httplib2 import json import logging diff --git a/src/webmon_app/reporting/dasmon/models.py b/src/webmon_app/reporting/dasmon/models.py index 3c4ec1ac..b7302336 100644 --- a/src/webmon_app/reporting/dasmon/models.py +++ b/src/webmon_app/reporting/dasmon/models.py @@ -3,6 +3,7 @@ @author: M. Doucet, Oak Ridge National Laboratory @copyright: 2015 Oak Ridge National Laboratory """ + from django.db import models from reporting.report.models import Instrument diff --git a/src/webmon_app/reporting/dasmon/view_util.py b/src/webmon_app/reporting/dasmon/view_util.py index b5e41df6..209481c8 100644 --- a/src/webmon_app/reporting/dasmon/view_util.py +++ b/src/webmon_app/reporting/dasmon/view_util.py @@ -4,6 +4,7 @@ @author: M. Doucet, Oak Ridge National Laboratory @copyright: 2014 Oak Ridge National Laboratory """ + from reporting.report.models import Instrument, DataRun, WorkflowSummary from reporting.dasmon.models import ( Parameter, diff --git a/src/webmon_app/reporting/pvmon/models.py b/src/webmon_app/reporting/pvmon/models.py index 6e934736..b9665789 100644 --- a/src/webmon_app/reporting/pvmon/models.py +++ b/src/webmon_app/reporting/pvmon/models.py @@ -4,6 +4,7 @@ @author: M. Doucet, Oak Ridge National Laboratory @copyright: 2014 Oak Ridge National Laboratory """ + from django.db import models from reporting.report.models import Instrument diff --git a/src/webmon_app/reporting/pvmon/views.py b/src/webmon_app/reporting/pvmon/views.py index c1fa8f80..a54f2526 100644 --- a/src/webmon_app/reporting/pvmon/views.py +++ b/src/webmon_app/reporting/pvmon/views.py @@ -1,6 +1,7 @@ """ Live PV monitoring """ + from django.http import HttpResponse from django.shortcuts import render, get_object_or_404 from django.urls import reverse diff --git a/src/webmon_app/reporting/reduction/view_util.py b/src/webmon_app/reporting/reduction/view_util.py index 84e7b228..01902e53 100644 --- a/src/webmon_app/reporting/reduction/view_util.py +++ b/src/webmon_app/reporting/reduction/view_util.py @@ -4,6 +4,7 @@ @author: M. Doucet, Oak Ridge National Laboratory @copyright: 2014 Oak Ridge National Laboratory """ + from django.conf import settings from django.urls import reverse import logging diff --git a/src/webmon_app/reporting/report/models.py b/src/webmon_app/reporting/report/models.py index 283ae0cc..68828373 100644 --- a/src/webmon_app/reporting/report/models.py +++ b/src/webmon_app/reporting/report/models.py @@ -3,4 +3,5 @@ reporting app. The models are defined in the workflow manager and should be installed on the system before running the app. """ + from workflow.database.report.models import * # noqa: F401, F403 diff --git a/src/webmon_app/reporting/report/view_util.py b/src/webmon_app/reporting/report/view_util.py index 0f0d1980..41d1f04c 100644 --- a/src/webmon_app/reporting/report/view_util.py +++ b/src/webmon_app/reporting/report/view_util.py @@ -4,6 +4,7 @@ @author: M. Doucet, Oak Ridge National Laboratory @copyright: 2014 Oak Ridge National Laboratory """ + import logging import json import datetime diff --git a/src/webmon_app/reporting/reporting_app/settings/develop.py b/src/webmon_app/reporting/reporting_app/settings/develop.py index 4ec81782..a6a5b03c 100644 --- a/src/webmon_app/reporting/reporting_app/settings/develop.py +++ b/src/webmon_app/reporting/reporting_app/settings/develop.py @@ -1,4 +1,5 @@ """This is the settings to be used for a local developer build inside of docker""" + from .base import * # noqa import ldap diff --git a/src/webmon_app/reporting/reporting_app/settings/envtest.py b/src/webmon_app/reporting/reporting_app/settings/envtest.py index ba3a9243..4c829093 100644 --- a/src/webmon_app/reporting/reporting_app/settings/envtest.py +++ b/src/webmon_app/reporting/reporting_app/settings/envtest.py @@ -1,4 +1,5 @@ """This is the settings to be used for a remote test deploy""" + from .base import * # noqa # symbols to make flake8 happy diff --git a/src/webmon_app/reporting/reporting_app/settings/prod.py b/src/webmon_app/reporting/reporting_app/settings/prod.py index 4f9d1573..61272614 100644 --- a/src/webmon_app/reporting/reporting_app/settings/prod.py +++ b/src/webmon_app/reporting/reporting_app/settings/prod.py @@ -1,4 +1,5 @@ """This is the settings to be used for a remote production deploy""" + from .base import * # noqa from os import environ diff --git a/src/webmon_app/reporting/reporting_app/settings/unittest.py b/src/webmon_app/reporting/reporting_app/settings/unittest.py index 524f11c9..4d53e45b 100644 --- a/src/webmon_app/reporting/reporting_app/settings/unittest.py +++ b/src/webmon_app/reporting/reporting_app/settings/unittest.py @@ -1,4 +1,5 @@ """This configuration is meant for running the unittests outside of docker""" + from .base import * # noqa from .base import INSTALLED_APPS diff --git a/src/webmon_app/reporting/reporting_app/view_util.py b/src/webmon_app/reporting/reporting_app/view_util.py index 02a70156..1c1d4f05 100644 --- a/src/webmon_app/reporting/reporting_app/view_util.py +++ b/src/webmon_app/reporting/reporting_app/view_util.py @@ -3,6 +3,7 @@ @copyright: 2014 Oak Ridge National Laboratory """ + from django.conf import settings import logging diff --git a/src/webmon_app/reporting/reporting_app/wsgi.py b/src/webmon_app/reporting/reporting_app/wsgi.py index 47766d89..516b69f1 100644 --- a/src/webmon_app/reporting/reporting_app/wsgi.py +++ b/src/webmon_app/reporting/reporting_app/wsgi.py @@ -13,6 +13,7 @@ framework. """ + import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "reporting.reporting_app.settings.develop") diff --git a/src/webmon_app/reporting/users/views.py b/src/webmon_app/reporting/users/views.py index 0efe6d56..5c3399b5 100644 --- a/src/webmon_app/reporting/users/views.py +++ b/src/webmon_app/reporting/users/views.py @@ -1,6 +1,7 @@ """ User management """ + from django.shortcuts import render, redirect from django.urls import reverse from django.contrib.auth import login, logout, authenticate diff --git a/src/workflow_app/workflow/states.py b/src/workflow_app/workflow/states.py index e4ca05a3..c826dde7 100644 --- a/src/workflow_app/workflow/states.py +++ b/src/workflow_app/workflow/states.py @@ -4,6 +4,7 @@ To add an action for a specific queue, add a StateAction class with the name of the queue in lower-case, replacing periods with underscores. """ + from .state_utilities import logged_action from .settings import POSTPROCESS_ERROR, CATALOG_DATA_READY from .settings import REDUCTION_DATA_READY, REDUCTION_CATALOG_DATA_READY diff --git a/src/workflow_app/workflow/workflow_process.py b/src/workflow_app/workflow/workflow_process.py index 94c662e4..00d13733 100644 --- a/src/workflow_app/workflow/workflow_process.py +++ b/src/workflow_app/workflow/workflow_process.py @@ -1,6 +1,7 @@ """ Actual process that each data run must go through. """ + import json import logging import datetime diff --git a/tests/simple_producer.py b/tests/simple_producer.py index 0c6dac8e..d5c06a9f 100644 --- a/tests/simple_producer.py +++ b/tests/simple_producer.py @@ -1,6 +1,7 @@ """ Example of a simple non-listening producer """ + import stomp import json import time diff --git a/tests/workflow_command.py b/tests/workflow_command.py index 4fefaa2e..b9850747 100644 --- a/tests/workflow_command.py +++ b/tests/workflow_command.py @@ -2,6 +2,7 @@ ActiveMQ client used to issue commands to the post-processing workflow. NOTE: Only works for runs that are already in the DB """ + from report.models import Instrument, DataRun from workflow.settings import BROKERS, ICAT_USER, ICAT_PASSCODE import argparse