Merge branch 'dev' into feature-ensemble-rft

This commit is contained in:
Gaute Lindkvist
2019-08-28 12:56:27 +02:00
committed by GitHub
46 changed files with 4450 additions and 306 deletions

View File

@@ -289,7 +289,7 @@ bool RiaApplication::openFile(const QString& fileName)
}
else if (fileType & RiaDefines::ANY_ECLIPSE_FILE)
{
loadingSucceded = RicImportGeneralDataFeature::openEclipseFilesFromFileNames(QStringList{fileName});
loadingSucceded = RicImportGeneralDataFeature::openEclipseFilesFromFileNames(QStringList{fileName}, true);
lastUsedDialogTag = RiaDefines::defaultDirectoryLabel(fileType);
}

View File

@@ -259,7 +259,7 @@ RiaApplication::ApplicationStatus RiaConsoleApplication::handleArguments(cvf::Pr
{
QStringList fileNames = RicImportGeneralDataFeature::fileNamesFromCaseNames(cvfqt::Utils::toQStringList(o.values()));
RicImportGeneralDataFeature::OpenCaseResults results =
RicImportGeneralDataFeature::openEclipseFilesFromFileNames(fileNames);
RicImportGeneralDataFeature::openEclipseFilesFromFileNames(fileNames, true);
}
if (cvf::Option o = progOpt->option("commandFile"))

View File

@@ -133,6 +133,7 @@
#ifdef USE_UNIT_TESTS
#include "gtest/gtest.h"
#endif // USE_UNIT_TESTS
#include "SummaryPlotCommands/RicSummaryPlotFeatureImpl.h"
namespace caf
{
@@ -657,6 +658,11 @@ RiaApplication::ApplicationStatus RiaGuiApplication::handleArguments(cvf::Progra
}
}
if (cvf::Option o = progOpt->option("summaryplot"))
{
RicSummaryPlotFeatureImpl::createSummaryPlotsFromArgumentLine( cvfqt::Utils::toQStringList(o.values()));
}
QString projectFileName;
if (progOpt->hasOption("last"))
@@ -777,7 +783,7 @@ RiaApplication::ApplicationStatus RiaGuiApplication::handleArguments(cvf::Progra
QStringList fileNames = RicImportGeneralDataFeature::fileNamesFromCaseNames(cvfqt::Utils::toQStringList(o.values()));
RicImportGeneralDataFeature::OpenCaseResults results =
RicImportGeneralDataFeature::openEclipseFilesFromFileNames(fileNames);
RicImportGeneralDataFeature::openEclipseFilesFromFileNames(fileNames, true);
if (results && !results.eclipseSummaryFiles.empty())
{
getOrCreateAndShowMainPlotWindow();

View File

@@ -32,6 +32,7 @@
#include "cafPdmUiFilePathEditor.h"
#include <QDate>
#include <QDir>
#include <QLocale>
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
@@ -74,7 +75,10 @@ RiaPreferences::RiaPreferences(void)
CAF_PDM_InitFieldNoDefault(&scriptDirectories, "scriptDirectory", "Shared Script Folder(s)", "", "", "");
scriptDirectories.uiCapability()->setUiEditorTypeName(caf::PdmUiFilePathEditor::uiEditorTypeName());
QString defaultTextEditor;
// TODO: This only currently works for installed ResInsight.
scriptDirectories = QCoreApplication::applicationDirPath() + "/Python/rips/PythonExamples";
QString defaultTextEditor;
#ifdef WIN32
defaultTextEditor = QString("notepad.exe");
#else
@@ -101,6 +105,7 @@ RiaPreferences::RiaPreferences(void)
CAF_PDM_InitField(&pythonExecutable, "pythonExecutable", QString("python"), "Python Executable Location", "", "", "");
pythonExecutable.uiCapability()->setUiEditorTypeName(caf::PdmUiFilePathEditor::uiEditorTypeName());
pythonExecutable.uiCapability()->setUiLabelPosition(caf::PdmUiItemInfo::TOP);
CAF_PDM_InitField(&showPythonDebugInfo, "pythonDebugInfo", false, "Show Python Debug Info", "", "", "");
CAF_PDM_InitField(&ssihubAddress, "ssihubAddress", QString("http://"), "SSIHUB Address", "", "", "");
ssihubAddress.uiCapability()->setUiLabelPosition(caf::PdmUiItemInfo::TOP);
@@ -268,8 +273,6 @@ void RiaPreferences::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering&
viewsGroup->add(&showHud);
caf::PdmUiGroup* otherGroup = uiOrdering.addNewGroup("Other");
otherGroup->add(&m_dateFormat);
otherGroup->add(&m_timeFormat);
otherGroup->add(&ssihubAddress);
otherGroup->add(&showLasCurveWithoutTvdWarning);
otherGroup->add(&holoLensDisableCertificateVerification);
@@ -300,10 +303,12 @@ void RiaPreferences::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering&
group->add(&summaryEnsembleImportMode);
}
}
else if (uiConfigName == RiaPreferences::tabNameEclipseSummary())
else if (uiConfigName == RiaPreferences::tabNamePlotting())
{
uiOrdering.add(&defaultSummaryCurvesTextFilter);
uiOrdering.add(&defaultSummaryHistoryCurveStyle);
uiOrdering.add(&m_dateFormat);
uiOrdering.add(&m_timeFormat);
}
else if (uiConfigName == RiaPreferences::tabNameScripting())
{
@@ -314,8 +319,9 @@ void RiaPreferences::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering&
#ifdef ENABLE_GRPC
caf::PdmUiGroup* pythonGroup = uiOrdering.addNewGroup("Python");
pythonGroup->add(&enableGrpcServer);
pythonGroup->add(&showPythonDebugInfo);
pythonGroup->add(&defaultGrpcPortNumber);
pythonGroup->add(&pythonExecutable);
pythonGroup->add(&pythonExecutable);
#endif
caf::PdmUiGroup* scriptGroup = uiOrdering.addNewGroup("Script files");
scriptGroup->add(&scriptDirectories);
@@ -426,9 +432,9 @@ QString RiaPreferences::tabNameEclipse()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RiaPreferences::tabNameEclipseSummary()
QString RiaPreferences::tabNamePlotting()
{
return "Summary";
return "Plotting";
}
//--------------------------------------------------------------------------------------------------
@@ -464,7 +470,7 @@ QStringList RiaPreferences::tabNames()
names << tabNameGeneral();
names << tabNameEclipse();
names << tabNameEclipseSummary();
names << tabNamePlotting();
names << tabNameScripting();
names << tabNameExport();

View File

@@ -89,6 +89,7 @@ public: // Pdm Fields
caf::PdmField<bool> octaveShowHeaderInfoWhenExecutingScripts;
caf::PdmField<QString> pythonExecutable;
caf::PdmField<bool> showPythonDebugInfo;
caf::PdmField<QString> ssihubAddress;
@@ -135,7 +136,7 @@ protected:
private:
static QString tabNameGeneral();
static QString tabNameEclipse();
static QString tabNameEclipseSummary();
static QString tabNamePlotting();
static QString tabNameScripting();
static QString tabNameExport();
static QString tabNameSystem();

View File

@@ -72,6 +72,13 @@ bool RiaArgumentParser::parseArguments(cvf::ProgramOptions* progOpt)
progOpt->registerOption("server", "[<portnumber>]", "Launch as a GRPC server. Default port is 50051", cvf::ProgramOptions::SINGLE_VALUE);
progOpt->registerOption("startdir", "<folder>", "Set startup directory.\n", cvf::ProgramOptions::SINGLE_VALUE);
progOpt->registerOption("summaryplot",
"[<plotOptions>] <eclipsesummaryvectors> [<eclipsedatafiles>]",
"Creates a summary plot using all the <eclipsedatafiles>,"
"and all the summary vectors defined in <eclipsesummaryvectors>."
"Use --summaryplot -help to show a more detailed help text.\n",
cvf::ProgramOptions::OPTIONAL_MULTI_VALUE);
progOpt->registerOption("commandFile", "<commandfile>", "Execute the command file.", cvf::ProgramOptions::SINGLE_VALUE);
progOpt->registerOption("commandFileReplaceCases",
"[<caseId>] <caseListFile>",

View File

@@ -438,7 +438,9 @@ std::vector<QString> RiaQDateTimeTools::supportedDateFormats()
dateFormats.push_back("yy;M/yy;d/M/yy");
dateFormats.push_back("yy;M/yy;M/d/yy");
dateFormats.push_back("yyyy;MM-yyyy;dd-MM-yyyy");
dateFormats.push_back("yyyy;MM.yyyy;dd.MM.yyyy");
dateFormats.push_back("yyyy;MM-yyyy;MM-dd-yyyy");
dateFormats.push_back("yyyy;MM.yyyy;MM.dd.yyyy");
dateFormats.push_back("yy;MM-yy;dd-MM-yy");
dateFormats.push_back("yy;MM-yy;MM-dd-yy");

View File

@@ -18,8 +18,8 @@
#include "RiaRegressionTestRunner.h"
#include "RiaGuiApplication.h"
#include "RiaGitDiff.h"
#include "RiaGuiApplication.h"
#include "RiaImageCompareReporter.h"
#include "RiaImageFileCompare.h"
#include "RiaLogging.h"
@@ -199,7 +199,7 @@ void RiaRegressionTestRunner::runRegressionTest()
regressionTestConfigureProject();
resizeMaximizedPlotWindows();
resizePlotWindows();
QString fullPathGeneratedFolder = testCaseFolder.absoluteFilePath(generatedFolderName);
RicSnapshotAllViewsToFileFeature::exportSnapshotOfAllViewsIntoFolder(fullPathGeneratedFolder);
@@ -499,7 +499,7 @@ void RiaRegressionTestRunner::regressionTestConfigureProject()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiaRegressionTestRunner::resizeMaximizedPlotWindows()
void RiaRegressionTestRunner::resizePlotWindows()
{
RimProject* proj = RiaApplication::instance()->project();
if (!proj) return;
@@ -515,20 +515,16 @@ void RiaRegressionTestRunner::resizeMaximizedPlotWindows()
{
if (viewWindow->isMdiWindow())
{
RimMdiWindowGeometry wndGeo = viewWindow->mdiWindowGeometry();
if (wndGeo.isMaximized)
QWidget* viewWidget = viewWindow->viewWidget();
if (viewWidget)
{
QWidget* viewWidget = viewWindow->viewWidget();
if (viewWidget)
QMdiSubWindow* mdiWindow = plotMainWindow->findMdiSubWindow(viewWidget);
if (mdiWindow)
{
QMdiSubWindow* mdiWindow = plotMainWindow->findMdiSubWindow(viewWidget);
if (mdiWindow)
{
mdiWindow->showNormal();
mdiWindow->showNormal();
viewWidget->resize(RiaRegressionTestRunner::regressionDefaultImageSize());
}
viewWidget->resize(RiaRegressionTestRunner::regressionDefaultImageSize());
}
}
}
@@ -603,8 +599,7 @@ QFileInfoList RiaRegressionTestRunner::subDirectoriesForTestExecution(const QDir
for (const auto& s : m_testFilter)
{
QString trimmed = s.trimmed();
if ((m_appendAllTestsAfterLastItemInFilter && anyMatchFound) ||
baseName.contains(trimmed, Qt::CaseInsensitive))
if ((m_appendAllTestsAfterLastItemInFilter && anyMatchFound) || baseName.contains(trimmed, Qt::CaseInsensitive))
{
foldersMatchingTestFilter.push_back(fi);
anyMatchFound = true;

View File

@@ -60,7 +60,7 @@ private:
const QDir& testDir);
static void removeDirectoryWithContent(QDir& dirToDelete);
static void resizeMaximizedPlotWindows();
static void resizePlotWindows();
static QSize regressionDefaultImageSize();
static QString diff2htmlHeaderText(const QString& testRootPath);
QFileInfoList subDirectoriesForTestExecution(const QDir& directory);