Skip to content

Commit a942afc

Browse files
authored
Merge pull request #423 from zsarnoczay/master
feat: add ATC-138 backend support and clean up sWHALE perf dispatch
2 parents 72656a3 + 824a374 commit a942afc

6 files changed

Lines changed: 408 additions & 40 deletions

File tree

modules/Workflow/WorkflowApplications.json

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1341,17 +1341,33 @@
13411341
"Name": "REDi",
13421342
"ExecutablePath": "applications/performanceAssessment/REDi/REDiWrapper.py",
13431343
"ApplicationSpecificInputs": [
1344-
{
1345-
"id": "dirnameOutput",
1346-
"type": "string",
1347-
"description": "Path to the working directory containing the Pelicun results."
1348-
},
13491344
{
13501345
"id": "riskParametersPath",
1351-
"type": "string",
1346+
"type": "path",
13521347
"description": "Path to the risk parameters json file ."
13531348
}
13541349
]
1350+
},
1351+
{
1352+
"Name": "ATC138",
1353+
"ExecutablePath": "applications/performanceAssessment/ATC138/ATC138Wrapper.py",
1354+
"ApplicationSpecificInputs": [
1355+
{
1356+
"id": "generalInputsPath",
1357+
"type": "path",
1358+
"description": "Path to the json file with mandatory input parameters."
1359+
},
1360+
{
1361+
"id": "tenantUnitsListPath",
1362+
"type": "path",
1363+
"description": "Path to the csv file with tenant unit information."
1364+
},
1365+
{
1366+
"id": "optionalInputsPath",
1367+
"type": "path",
1368+
"description": "Path to the json file with optional input parameters."
1369+
}
1370+
]
13551371
}
13561372
]
13571373
},

modules/Workflow/whale/main.py

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -612,9 +612,10 @@ def set_pref(self, preferences, ref_path):
612612
if 'PelicunDefault' in self.pref[preference]:
613613
continue
614614

615-
self.pref[preference] = resolve_path(
616-
self.pref[preference], ref_path
617-
)
615+
if ref_path:
616+
self.pref[preference] = resolve_path(
617+
self.pref[preference], ref_path
618+
)
618619

619620
def get_command_list(self, app_path, force_posix=False): # noqa: FBT002, C901
620621
"""Short description
@@ -2934,14 +2935,6 @@ def estimate_performance( # noqa: D102
29342935

29352936
command_list = workflow_app.get_command_list(app_path=self.app_dir_local)
29362937

2937-
command_list.append('--dirnameOutput')
2938-
2939-
# Only add asset id if we are running a regional assessment
2940-
if asst_id != None: # noqa: E711
2941-
command_list.append(f'{aimDir}/{asst_id}')
2942-
else:
2943-
command_list.append(f'{aimDir}')
2944-
29452938
command = create_command(command_list)
29462939

29472940
log_msg('Performance assessment command:', prepend_timestamp=False)

0 commit comments

Comments
 (0)