Stabilization fixes related to regression testing

* Added fmtlib to LicenseInformation.txt
* Add license info for roffcpp
* Regression Tests: Guard use of invalid bounding box
* Regression Test: Check if file is present before opening
This commit is contained in:
Magne Sjaastad 2023-01-10 11:45:37 +01:00 committed by GitHub
parent 0740bccd75
commit 8e161a5c89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 66 additions and 2 deletions

View File

@ -559,3 +559,60 @@ https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System/blob/master/LICEN
[This is the first released version of the Lesser GPL. It also counts
as the successor of the GNU Library Public License, version 2, hence
the version number 2.1.]
===============================================================================
Notice for the fmtlib library
===============================================================================
https://github.com/fmtlib/fmt
Copyright (c) 2012 - present, Victor Zverovich
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
--- Optional exception to the license ---
As an exception, if, as a result of your compiling your source code, portions
of this Software are embedded into a machine-executable object form of such
source code, you may redistribute such embedded portions in such object form
without including the above copyright and permission notices.
===============================================================================
Notice for the roffcpp library
===============================================================================
https://github.com/CeetronSolutions/roffcpp
Copyright (C) 2023- Equinor ASA
roffcpp is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
roffcpp is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
for more details.

View File

@ -28,6 +28,7 @@
#include "RiaPreferencesSystem.h"
#include "RiaStdStringTools.h"
#include <filesystem>
#include <fstream>
#include <iosfwd>
#include <iostream>
@ -71,6 +72,8 @@ std::vector<RifEclipseKeywordContent> RifEclipseTextFileReader::readKeywordAndVa
std::vector<RifEclipseKeywordContent>
RifEclipseTextFileReader::readKeywordAndValuesMemoryMappedFile( const std::string& filename )
{
if ( !std::filesystem::exists( filename ) ) return {};
mio::mmap_source mmap( filename );
std::error_code error;

View File

@ -297,7 +297,10 @@ bool RifOpmCommonEclipseSummary::openFileReader( const QString& fileName,
try
{
// The standard reader will import data from SMSPEC and UNSMRY files
m_standardReader = std::make_unique<Opm::EclIO::ESmry>( smspecFileName.toStdString(), includeRestartFiles );
if ( QFile::exists( smspecFileName ) )
{
m_standardReader = std::make_unique<Opm::EclIO::ESmry>( smspecFileName.toStdString(), includeRestartFiles );
}
}
catch ( std::exception& e )
{

View File

@ -889,6 +889,7 @@ void RivWellPathPartMgr::appendFlattenedStaticGeometryPartsToModel( cvf::ModelBa
double characteristicCellSize,
const cvf::BoundingBox& wellPathClipBoundingBox )
{
if ( !wellPathClipBoundingBox.isValid() ) return;
if ( !isWellPathWithinBoundingBox( wellPathClipBoundingBox ) ) return;
// The pipe geometry needs to be rebuilt on scale change to keep the pipes round

View File

@ -729,7 +729,7 @@ std::vector<std::vector<cvf::Vec3d>> RimExtrudedCurveIntersection::polyLines( cv
lines.push_back( wellPath()->wellPathGeometry()->wellPathPoints() );
RimCase* ownerCase = nullptr;
this->firstAncestorOrThisOfType( ownerCase );
if ( ownerCase )
if ( ownerCase && ownerCase->activeCellsBoundingBox().isValid() )
{
size_t dummy;
lines[0] = RigWellPath::clipPolylineStartAboveZ( lines[0],