Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typos from recent update to v1.20.7 #1216

Merged
merged 8 commits into from
Apr 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,13 @@ 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
strat = "strat" # abbreviation of "strategy" used by Hypothesis
arange = "arange" # from numpy.arange function

[default.extend-identifiers]
# false positives
Expand Down
8 changes: 4 additions & 4 deletions foqus_lib/framework/graph/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
"""
######
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions foqus_lib/framework/sdoe/irsf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions foqus_lib/framework/session/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
"""
Expand Down Expand Up @@ -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.
Expand Down
6 changes: 3 additions & 3 deletions foqus_lib/framework/surrogate/ALAMO.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions foqus_lib/framework/surrogate/surrogate.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,15 +262,15 @@ 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.
"""
lines = [] # Join lines into a string at end (it's faster)
# 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.")
Expand Down
2 changes: 1 addition & 1 deletion foqus_lib/gui/main/mainWindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Loading