Skip to content

Commit

Permalink
Spell-check shaker-maker tool for the green check-mark (note: spell-c…
Browse files Browse the repository at this point in the history
…hecked contries --> countries in DatabaseMetadata.json, this may cause a bug or fix one)
  • Loading branch information
JustinBonus committed Sep 29, 2024
1 parent 7451b14 commit 7555ac8
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion modules/createEVENT/stochasticWave/CMakeLists.txt
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
simcenter_add_python_script(SCRIPT StochasticWave.py)
simcenter_add_python_script(SCRIPT Ex4_WaveLoads.py)
simcenter_add_python_script(SCRIPT StochasticWaveLoadsJONSWAP.py)
2 changes: 1 addition & 1 deletion modules/createEVENT/stochasticWave/StochasticWave.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3
#!/usr/bin/env python3 # noqa: EXE001

"""Generate the event file using Stochastic Waves."""

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3
#!/usr/bin/env python3 # noqa: EXE001

"""Compute inline/total hydrodynamic force and moments on a monopile using Morison's equation""" # noqa: D400

Expand Down
2 changes: 1 addition & 1 deletion modules/tools/ShakerMaker/DatabaseMetadata.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"Contries":[
"Countries":[
"Chile",
"United States"
],
Expand Down
6 changes: 3 additions & 3 deletions modules/tools/ShakerMaker/ShakerMakersubmitjob.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
queue = jobinfo['queue']


# chane hh:mm:ss to minutes
# change hh:mm:ss to minutes
maxminutes = (
int(maxminutes.split(':')[0]) * 60
+ int(maxminutes.split(':')[1])
Expand All @@ -44,7 +44,7 @@

filenames = []
for filename in faultfiles:
# // seperate the filename from the whole path
# // separate the filename from the whole path
filename = os.path.basename(filename) # noqa: PTH119, PLW2901
filenames.append(filename)
faultinfo['Faultfilenames'] = filenames
Expand Down Expand Up @@ -80,7 +80,7 @@

# %%
# =============================================================================
# uploding files
# uploading files
# =============================================================================
print('Uploading files to DesignSafe') # noqa: T201
# create shakermaker directory if it does not exist
Expand Down
4 changes: 2 additions & 2 deletions modules/tools/ShakerMaker/TapisFiles/ShakerMakermodel.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# %% # noqa: INP001, D100
#############################################################
# This is shaker Maker model created for runing simulations #
# for the EE-UQ app. #
# This script creates Shaker Maker model for simulations #
# within the EE-UQ app. #
# This code created by Amin Pakzad and Pedro Arduino based #
# on the initial code by Jose Abell and Jorge Crempien #
# date = September 2024 #
Expand Down
18 changes: 9 additions & 9 deletions modules/tools/ShakerMaker/faultplotter.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def PlotSources(info): # noqa: C901, N802, D103
faultinfopath = tmpLocation + '/fault/faultInfo.json'
faultinfo = json.load(open(faultinfopath)) # noqa: SIM115, PTH123

# // load the source time fuction in the faultinfo path
# // load the source time function in the faultinfo path
sourcetimeinfopath = tmpLocation + '/fault/SourceTimeFunction.py'
# // load the source time function
source_time_function = load_function_from_file(
Expand Down Expand Up @@ -226,13 +226,13 @@ def PlotSources(info): # noqa: C901, N802, D103

if info['plotlayers'].lower() in ['yes', 'true']:
thickness = info['thickness']
# insert zero at the begining
# insert zero at the beginning
thickness.insert(0, 0)
# cummulative thickness
cummulative = np.cumsum(thickness)
if zmax < cummulative[-1]:
zamx = cummulative[-1] + cummulative[-1] * 0.8 # noqa: F841
cummulative[-1] = zmax + cummulative[-1] * 0.8
# cumulative thickness
cumulative = np.cumsum(thickness)
if zmax < cumulative[-1]:
zamx = cumulative[-1] + cumulative[-1] * 0.8 # noqa: F841
cumulative[-1] = zmax + cumulative[-1] * 0.8
for j in range(len(thickness) - 1):
pl.add_mesh(
pv.Cube(
Expand All @@ -241,8 +241,8 @@ def PlotSources(info): # noqa: C901, N802, D103
xmax,
ymin,
ymax,
cummulative[j],
cummulative[j + 1],
cumulative[j],
cumulative[j + 1],
]
),
color=colors[j],
Expand Down

0 comments on commit 7555ac8

Please sign in to comment.