From 1f973b07cbd7665ab0a33f1e98f985413fafd191 Mon Sep 17 00:00:00 2001 From: Brandon Paul <86113916+bpaul4@users.noreply.github.com> Date: Wed, 10 Apr 2024 05:54:27 -0700 Subject: [PATCH 1/8] Add arange as known exception --- .typos.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/.typos.toml b/.typos.toml index bf138d558..acdb15130 100644 --- a/.typos.toml +++ b/.typos.toml @@ -30,6 +30,7 @@ astroid = "astroid" # Python package name Gess = "Gess" # false positives strat = "strat" # abbreviation of "strategy" used by Hypothesis +arange = "arange" # from numpy.arange function [default.extend-identifiers] # false positives From ec8a730611713b34e03a070e79db6479d4bb21dd Mon Sep 17 00:00:00 2001 From: Brandon Paul <86113916+bpaul4@users.noreply.github.com> Date: Wed, 10 Apr 2024 05:59:44 -0700 Subject: [PATCH 2/8] Update mainWindow.py --- foqus_lib/gui/main/mainWindow.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/foqus_lib/gui/main/mainWindow.py b/foqus_lib/gui/main/mainWindow.py index 3098d9c13..6c27e4bda 100644 --- a/foqus_lib/gui/main/mainWindow.py +++ b/foqus_lib/gui/main/mainWindow.py @@ -1574,7 +1574,7 @@ def updateRecentlyOpened(self): self.dat.foqusSettings.addRecentlyOpenedFile(self.dat.currentFile) self.openRecentMainMenu.clear() self.openRecentAction = [] - for i, f in enumerate(self.dat.foqusSettings.getRecentlyOpendFiles()): + for i, f in enumerate(self.dat.foqusSettings.getRecentlyOpenedFiles()): self.openRecentAction.append(QAction(f, self)) self.openRecentAction[i].setIcon(QIcon()) self.openRecentAction[i].triggered.connect( From 313b2f186819ca85fedf5a08d8863d6460882902 Mon Sep 17 00:00:00 2001 From: Brandon Paul <86113916+bpaul4@users.noreply.github.com> Date: Wed, 10 Apr 2024 06:03:56 -0700 Subject: [PATCH 3/8] Update graph.py --- foqus_lib/framework/graph/graph.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/foqus_lib/framework/graph/graph.py b/foqus_lib/framework/graph/graph.py index 312bcf49a..554e6fc92 100644 --- a/foqus_lib/framework/graph/graph.py +++ b/foqus_lib/framework/graph/graph.py @@ -660,7 +660,7 @@ def solveListValTurbine(self, valueList=None, maxSend=20, sid=None, jobIds=[]): one time, for a large number of jobs the amount of input can get to large for Turbine to receive all at once. sid = A turbine session ID to reconnect to. If a previous - run was disconnected this will hook back up and contiune + run was disconnected this will hook back up and continue to receive results until the session is done. """ ###### @@ -2045,9 +2045,9 @@ def sccOrderCalc(self, sccNodes, ie, oe): done = False for i in range(len(sccNodes)): for j in range(len(sccNodes)): - for ine in ie[i]: - for oute in oe[j]: - if ine == oute: + for in_edge in ie[i]: + for out_edge in oe[j]: + if in_edge == out_edge: adjlist[j].append(i) adjlistR[i].append(j) done = True From 8f4f688f6f8530515268c96ca9782bdb4a7b0406 Mon Sep 17 00:00:00 2001 From: Brandon Paul <86113916+bpaul4@users.noreply.github.com> Date: Wed, 10 Apr 2024 06:07:14 -0700 Subject: [PATCH 4/8] Update ALAMO.py --- foqus_lib/framework/surrogate/ALAMO.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/foqus_lib/framework/surrogate/ALAMO.py b/foqus_lib/framework/surrogate/ALAMO.py index 6b37ec544..0e7637a60 100644 --- a/foqus_lib/framework/surrogate/ALAMO.py +++ b/foqus_lib/framework/surrogate/ALAMO.py @@ -847,11 +847,11 @@ def writeAlamoInputFile( ignore.extend(np.array(val).flatten()) af.write("ignore {0}\n".format(" ".join(map(str, ignore)))) # TOLMEANERROR - tme = [] + tolmeanerror = [] for x in self.output: val = self.getOutputVarOption("TOLMEANERROR", x) - tme.extend(np.array(val).flatten()) - af.write("tolmeanerror {0}\n".format(" ".join(map(str, tme)))) + tolmeanerror.extend(np.array(val).flatten()) + af.write("tolmeanerror {0}\n".format(" ".join(map(str, tolmeanerror)))) # TOLRELMETRIC trm = [] for x in self.output: From 47280259b460ad8b23c1fa82e194dd5c1fdca95a Mon Sep 17 00:00:00 2001 From: Brandon Paul <86113916+bpaul4@users.noreply.github.com> Date: Wed, 10 Apr 2024 06:08:45 -0700 Subject: [PATCH 5/8] Update surrogate.py --- foqus_lib/framework/surrogate/surrogate.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/foqus_lib/framework/surrogate/surrogate.py b/foqus_lib/framework/surrogate/surrogate.py index 1d432b2e5..798bfda85 100644 --- a/foqus_lib/framework/surrogate/surrogate.py +++ b/foqus_lib/framework/surrogate/surrogate.py @@ -262,7 +262,7 @@ def terminate(self): def writePluginTop(self, method="Generic", comments=[], importLines=[]): """ - Write the code for the top protion of a flowsheet plugin + Write the code for the top portion of a flowsheet plugin that does the standard imports and variable definitions in the class init. Returns string. """ @@ -270,7 +270,7 @@ def writePluginTop(self, method="Generic", comments=[], importLines=[]): # The first comment is needed for FOQUS to identify file as # a Python flowsheet model plugin. lines.append("# FOQUS_PYMODEL_PLUGIN") - # Some comments just for users lookin into the file + # Some comments just for users looking into the file lines.append("#") lines.append("# {0} surrogate export".format(method)) lines.append("# THIS FILE WAS AUTOMATICALLY GENERATED.") From fdee7f5ff35428fbb87d3b9e0a2a6950347aa487 Mon Sep 17 00:00:00 2001 From: Brandon Paul <86113916+bpaul4@users.noreply.github.com> Date: Wed, 10 Apr 2024 06:11:31 -0700 Subject: [PATCH 6/8] Update irsf.py probably initials, add periods so it's not flagged --- foqus_lib/framework/sdoe/irsf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/foqus_lib/framework/sdoe/irsf.py b/foqus_lib/framework/sdoe/irsf.py index 85f4363b6..7cfce407e 100644 --- a/foqus_lib/framework/sdoe/irsf.py +++ b/foqus_lib/framework/sdoe/irsf.py @@ -195,11 +195,11 @@ def update_pareto_front( cond1 = ( np.multiply(g1, ge2) + np.multiply(g2, ge1) - ) == 0 # PN: should be able to simplify this + ) == 0 # P.N.: should be able to simplify this cond1 = cond1.flatten() cond2 = np.sum( np.multiply(l1, le2) + np.multiply(l2, le1) + np.multiply(eq1, eq2) - ) # PN: and this + ) # P.N.: and this if np.any(cond1): n_desX = len(newdesX) From 6cdc20e8755c79294288caf9ea8577b59b949ac0 Mon Sep 17 00:00:00 2001 From: Brandon Paul <86113916+bpaul4@users.noreply.github.com> Date: Wed, 10 Apr 2024 06:14:33 -0700 Subject: [PATCH 7/8] Add yhat, iy as known variable names to except --- .typos.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.typos.toml b/.typos.toml index acdb15130..3ff7cca6b 100644 --- a/.typos.toml +++ b/.typos.toml @@ -26,6 +26,8 @@ FO = "FO" # TODO: probably an abbreviation? sur = "sur" # abbreviation for 'surrogate' nd = "nd" # used as a variable name in sdoeAnalysisDialog astroid = "astroid" # Python package name +yhat = "yhat" # used as a variable name in SurrogateParser +iy = "iy" # used as a variable name in SurrogateParser # proper nouns Gess = "Gess" # false positives From 5edc6b1f67f24401fea50a367a170f0efce7236c Mon Sep 17 00:00:00 2001 From: Brandon Paul <86113916+bpaul4@users.noreply.github.com> Date: Wed, 10 Apr 2024 06:15:31 -0700 Subject: [PATCH 8/8] Update session.py --- foqus_lib/framework/session/session.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/foqus_lib/framework/session/session.py b/foqus_lib/framework/session/session.py index d75af70d8..ce6176c19 100644 --- a/foqus_lib/framework/session/session.py +++ b/foqus_lib/framework/session/session.py @@ -415,7 +415,7 @@ def save( updateCurrentFile == True: changes the current FOQUS session file to filename (only if filenale != None) changeLogMsg: A change log entry - confidence: Confidence in the qulity of the session + confidence: Confidence in the quality of the session bkp: save two files so you have a backup to keep tarck of all saved versions. """ @@ -862,7 +862,7 @@ def checkRecentlyOpenedFiles(self): self.recentlyOpenedFiles = files return files - def getRecentlyOpendFiles(self): + def getRecentlyOpenedFiles(self): """ Just returns the list of files. This is here in case we decide to add some validation step.