From bb48c0384e669fa3b8d0f8e3d13e49e89c15b753 Mon Sep 17 00:00:00 2001 From: fmckenna Date: Tue, 1 Oct 2024 00:32:36 -0700 Subject: [PATCH 1/3] fmk - recursiveRemove of fir check --- WorkflowAppHydroUQ.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/WorkflowAppHydroUQ.cpp b/WorkflowAppHydroUQ.cpp index 109ee3b..c202cfb 100644 --- a/WorkflowAppHydroUQ.cpp +++ b/WorkflowAppHydroUQ.cpp @@ -38,6 +38,7 @@ UPDATES, ENHANCEMENTS, OR MODIFICATIONS. #include "WorkflowAppHydroUQ.h" #include +#include #include #include @@ -432,15 +433,20 @@ WorkflowAppHydroUQ::setMainWindow(MainWindowWorkflowApp* window) { } QString tmpDirName = QString("tmp.SimCenter"); - localWorkDir.mkdir(tmpDirName); // defaultWorkDirString should start as "tmp.SimCenter" - // { QString tmpDirectoryString = localWorkDir.absoluteFilePath(tmpDirName); QDir tmpDirectory(tmpDirectoryString); if (tmpDirectory.exists()) { + if (SCUtils::isSafeToRemoveRecursivily(tmpDirectoryString)) tmpDirectory.removeRecursively(); - } else { - tmpDirectory.mkpath(tmpDirectoryString); + else { + QString msg("The Program stopped, it was about to recursivily remove: "); + msg += tmpDirName; + fatalMessage(msg); + return; + } } + + tmpDirectory.mkpath(tmpDirectoryString); tmpDirectory.mkdir(defaultSubDir); defaultWorkDir = QDir(tmpDirectoryString); From 05307cd575250f68ba561024a866cbdd77516f16 Mon Sep 17 00:00:00 2001 From: fmckenna Date: Tue, 1 Oct 2024 23:00:23 -0700 Subject: [PATCH 2/3] fmk - updating zenodo DOI in main and Workflow --- WorkflowAppHydroUQ.cpp | 2 +- main.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/WorkflowAppHydroUQ.cpp b/WorkflowAppHydroUQ.cpp index 12a5171..29f47cc 100644 --- a/WorkflowAppHydroUQ.cpp +++ b/WorkflowAppHydroUQ.cpp @@ -1300,7 +1300,7 @@ WorkflowAppHydroUQ::getMaxNumParallelTasks() { int WorkflowAppHydroUQ::createCitation(QJsonObject &citation, QString citeFile) { - QString cit("{\"HydroUQ\": { \"citations\": [{\"citation\": \"Frank McKenna, Justin Bonus, Ajay B Harish, & Nicolette Lewis. (2024). NHERI-SimCenter/HydroUQ: Version 3.2.0 (v3.2.0). Zenodo. https://doi.org/10.5281/zenodo.4731073 \",\"description\": \"This is the overall tool reference used to indicate the version of the tool.\"},{\"citation\": \"Gregory G. Deierlein, Frank McKenna, Adam Zsarnóczay, Tracy Kijewski-Correa, Ahsan Kareem, Wael Elhaddad, Laura Lowes, Matthew J. Schoettler, and Sanjay Govindjee (2020) A Cloud-Enabled Application Framework for Simulating Regional-Scale Impacts of Natural Hazards on the Built Environment. Frontiers in the Built Environment. 6:558706. doi: 10.3389/fbuil.2020.558706\",\"description\": \" This marker paper describes the SimCenter application framework, which was designed to simulate the impacts of natural hazards on the built environment. It is a necessary attribute for publishing work resulting from the use of SimCenter tools, software, and datasets.\"}]}}"); + QString cit("{\"HydroUQ\": { \"citations\": [{\"citation\": \"Frank McKenna, Justin Bonus, Ajay B Harish, & Nicolette Lewis. (2024). NHERI-SimCenter/HydroUQ: Version 4.0.0 (v4.0.0). Zenodo. https://doi.org/10.5281/zenodo.13865413\",\"description\": \"This is the overall tool reference used to indicate the version of the tool.\"},{\"citation\": \"Gregory G. Deierlein, Frank McKenna, Adam Zsarnóczay, Tracy Kijewski-Correa, Ahsan Kareem, Wael Elhaddad, Laura Lowes, Matthew J. Schoettler, and Sanjay Govindjee (2020) A Cloud-Enabled Application Framework for Simulating Regional-Scale Impacts of Natural Hazards on the Built Environment. Frontiers in the Built Environment. 6:558706. doi: 10.3389/fbuil.2020.558706\",\"description\": \" This marker paper describes the SimCenter application framework, which was designed to simulate the impacts of natural hazards on the built environment. It is a necessary attribute for publishing work resulting from the use of SimCenter tools, software, and datasets.\"}]}}"); QJsonDocument docC = QJsonDocument::fromJson(cit.toUtf8()); if(!docC.isNull()) { diff --git a/main.cpp b/main.cpp index 0917d8a..2abf7bb 100644 --- a/main.cpp +++ b/main.cpp @@ -234,7 +234,7 @@ int main(int argc, char *argv[]) w.setVersion(version); // Citation - QString citeText("1) Frank McKenna, Justin Bonus, Ajay B Harish, & Nicolette Lewis. (2024). NHERI-SimCenter/HydroUQ: Version 4.0.0 (v4.0.0). Zenodo. https://doi.org/10.5281/zenodo.10902090 \n\n2) Gregory G. Deierlein, Frank McKenna, Adam Zsarnóczay, Tracy Kijewski-Correa, Ahsan Kareem, Wael Elhaddad, Laura Lowes, Matthew J. Schoettler, and Sanjay Govindjee (2020) A Cloud-Enabled Application Framework for Simulating Regional-Scale Impacts of Natural Hazards on the Built Environment. Frontiers in the Built Environment. 6:558706. doi: 10.3389/fbuil.2020.558706"); + QString citeText("1) Frank McKenna, Justin Bonus, Ajay B Harish, & Nicolette Lewis. (2024). NHERI-SimCenter/HydroUQ: Version 4.0.0 (v4.0.0). Zenodo. https://doi.org/10.5281/zenodo.13865413 \n\n2) Gregory G. Deierlein, Frank McKenna, Adam Zsarnóczay, Tracy Kijewski-Correa, Ahsan Kareem, Wael Elhaddad, Laura Lowes, Matthew J. Schoettler, and Sanjay Govindjee (2020) A Cloud-Enabled Application Framework for Simulating Regional-Scale Impacts of Natural Hazards on the Built Environment. Frontiers in the Built Environment. 6:558706. doi: 10.3389/fbuil.2020.558706"); w.setCite(citeText); // Link to repository From 1cc78638041c4421e1a0a177b1565729182defed Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 2 Oct 2024 16:05:01 -0700 Subject: [PATCH 3/3] fmk - updating makeZip for relases --- makeZIP.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/makeZIP.bat b/makeZIP.bat index 34d29bd..bc8ab29 100644 --- a/makeZIP.bat +++ b/makeZIP.bat @@ -3,7 +3,7 @@ REM ## make the exe .. it assumes Hydro-UQ_Windows_Download exists with vcredist cd build conan install .. --build missing -qmake ..\Hydro-UQ.pro +qmake QMAKE_CXXFLAGS+=-D_SC_RELEASE ..\Hydro-UQ.pro nmake REM ## copy application into folder and winddeployqt it