From 66ea86d8ad817d817e119d4a77a751fcefdfcc1d Mon Sep 17 00:00:00 2001 From: Ludovico Bianchi Date: Thu, 28 Sep 2023 20:37:11 -0500 Subject: [PATCH] Run isort --profile=black --- foqus_lib/framework/surrogate/ALAMO.py | 4 ++-- foqus_lib/framework/uq/LocalExecutionModule.py | 4 ++-- foqus_lib/gui/main/settingsFrame.py | 6 +++--- foqus_lib/gui/model/dmfUploadDialog.py | 1 - foqus_lib/gui/ouu/ouuSetupFrame.py | 10 ++++------ 5 files changed, 11 insertions(+), 14 deletions(-) diff --git a/foqus_lib/framework/surrogate/ALAMO.py b/foqus_lib/framework/surrogate/ALAMO.py index cf9907e53..3ae505288 100644 --- a/foqus_lib/framework/surrogate/ALAMO.py +++ b/foqus_lib/framework/surrogate/ALAMO.py @@ -43,11 +43,10 @@ import threading import time import traceback +from multiprocessing.connection import Client import numpy as np -from multiprocessing.connection import Client - from foqus_lib.framework.listen import listen from foqus_lib.framework.session.session import exePath @@ -61,6 +60,7 @@ except: pass + def checkAvailable(): """Plug-ins should have this function to check availability of any additional required software. If requirements are not available diff --git a/foqus_lib/framework/uq/LocalExecutionModule.py b/foqus_lib/framework/uq/LocalExecutionModule.py index 34d38734c..b3bc86867 100644 --- a/foqus_lib/framework/uq/LocalExecutionModule.py +++ b/foqus_lib/framework/uq/LocalExecutionModule.py @@ -1135,9 +1135,9 @@ def run(self): # print outputStatus emulatorFileName = "emulatorData" self.data.writeToPsuade(emulatorFileName) - from .RSAnalyzer import ( + from .RSAnalyzer import ( # importing at top creates circular import RSAnalyzer, - ) # importing at top creates circular import + ) LocalExecutionModule.runStarted = True Common.initFolder(RSAnalyzer.dname) diff --git a/foqus_lib/gui/main/settingsFrame.py b/foqus_lib/gui/main/settingsFrame.py index bbafdec2e..11d421aba 100644 --- a/foqus_lib/gui/main/settingsFrame.py +++ b/foqus_lib/gui/main/settingsFrame.py @@ -27,12 +27,12 @@ from io import StringIO from pprint import pprint -from foqus_lib.framework.uq.LocalExecutionModule import * -from foqus_lib.gui.main.turbineConfig import * - from PyQt5 import QtCore, uic from PyQt5.QtWidgets import QFileDialog, QInputDialog, QMessageBox +from foqus_lib.framework.uq.LocalExecutionModule import * +from foqus_lib.gui.main.turbineConfig import * + if os.name == "nt": import win32process diff --git a/foqus_lib/gui/model/dmfUploadDialog.py b/foqus_lib/gui/model/dmfUploadDialog.py index 98634dafa..6458d41b8 100644 --- a/foqus_lib/gui/model/dmfUploadDialog.py +++ b/foqus_lib/gui/model/dmfUploadDialog.py @@ -22,7 +22,6 @@ import os import platform import subprocess - from io import StringIO from urllib.request import urlopen diff --git a/foqus_lib/gui/ouu/ouuSetupFrame.py b/foqus_lib/gui/ouu/ouuSetupFrame.py index 67970e152..c7bafedf1 100644 --- a/foqus_lib/gui/ouu/ouuSetupFrame.py +++ b/foqus_lib/gui/ouu/ouuSetupFrame.py @@ -22,12 +22,6 @@ import matplotlib from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas from matplotlib.figure import Figure - -from foqus_lib.framework.listen import listen -from foqus_lib.framework.uq.flowsheetToUQModel import flowsheetToUQModel - -from .nodeToUQModel import nodeToUQModel - from PyQt5 import QtCore, uic from PyQt5.QtGui import QCursor from PyQt5.QtWidgets import ( @@ -41,14 +35,18 @@ QVBoxLayout, ) +from foqus_lib.framework.listen import listen from foqus_lib.framework.ouu.OUU import OUU from foqus_lib.framework.uq.Common import * +from foqus_lib.framework.uq.flowsheetToUQModel import flowsheetToUQModel from foqus_lib.framework.uq.LocalExecutionModule import * # from foqus_lib.gui.uq.Preview import * # from InputPriorTable import InputPriorTable from foqus_lib.gui.common.InputPriorTable import InputPriorTable +from .nodeToUQModel import nodeToUQModel + mypath = os.path.dirname(__file__) _ouuSetupFrameUI, _ouuSetupFrame = uic.loadUiType( os.path.join(mypath, "ouuSetupFrame.ui")