Skip to content

Commit 248fa01

Browse files
committed
Fix merge issues and ci fix
1 parent 6389361 commit 248fa01

File tree

8 files changed

+30
-33
lines changed

8 files changed

+30
-33
lines changed

geos-geomechanics/src/geos/geomechanics/model/MohrCircle.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,4 +113,3 @@ def computePrincipalComponents( self: Self, stressVector: npt.NDArray[ np.float6
113113
"""
114114
# get stress principal components
115115
self.m_p3, self.m_p2, self.m_p1 = ( computeStressPrincipalComponentsFromStressVector( stressVector ) )
116-

geos-geomechanics/src/geos/geomechanics/processing/geomechanicsCalculatorFunctions.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -925,4 +925,3 @@ def computeNormalShearStress( stressTensor: npt.NDArray[ np.float64 ],
925925
tauVec: npt.NDArray[ np.float64 ] = T - np.dot( sigmaN, directionVector )
926926
tau: float = float( np.linalg.norm( tauVec ) )
927927
return ( sigmaN, tau )
928-

geos-geomechanics/tests/testsFunctionsGeomechanicsCalculator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,9 +247,9 @@ def test_shearCapacityUtilization( self: Self ) -> None:
247247

248248
# calculation
249249
obtained: npt.NDArray[ np.float64 ] = fcts.shearCapacityUtilization( traction, rockCohesion, frictionAngle )
250-
expected: npt.NDArray[ np.float64 ] = np.array( [ 0.899, 0.923, 0.982, 1.004, 1.048 ] )
250+
expected: list[ float ] = [ 0.899, 0.923, 0.982, 1.004, 1.048 ]
251251

252-
self.assertSequenceEqual( np.round( obtained, 3 ).flatten().tolist(), expected.tolist() )
252+
self.assertSequenceEqual( np.round( obtained, 3 ).flatten().tolist(), expected )
253253

254254
def test_computeStressPrincipalComponents( self: Self ) -> None:
255255
"""Test calculation of stress principal components from stress tensor."""

geos-geomechanics/tests/testsMohrCircle.py

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def test_MohrCoulombInit( self: Self ) -> None:
7575
def test_computeShearStress( self: Self ) -> None:
7676
"""Test calculation of shear stress from normal stress."""
7777
# inputs
78-
stressNormal: npt.NDArray[ np.float64 ] = np.linspace( 5.0e8, 1.0e9, 100 )
78+
stressNormal: npt.NDArray[ np.float64 ] = np.linspace( 5.0e8, 1.0e9, 100 ).astype( float )
7979
# expected values
8080
expectedValues: npt.NDArray[ np.float64 ] = np.array( [
8181
888163490.0,
@@ -184,7 +184,7 @@ def test_computeShearStress( self: Self ) -> None:
184184
obtained: npt.NDArray[ np.float64 ] = np.array( mohrCoulomb.computeShearStress( stressNormal ) )
185185

186186
# test results
187-
self.assertSequenceEqual( expectedValues.tolist(), np.round( obtained ).tolist() )
187+
self.assertSequenceEqual( expectedValues.tolist(), np.round( obtained ).tolist() ) # type: ignore[arg-type]
188188

189189
def test_computeFailureEnvelop1( self: Self ) -> None:
190190
"""Test calculation of failure envelop from minimum normal stress."""
@@ -221,8 +221,12 @@ def test_computeFailureEnvelop1( self: Self ) -> None:
221221
normalStressObtained, shearStressObtained = mohrCoulomb.computeFailureEnvelop( stressNormalMax, n=10 )
222222

223223
# test results
224-
self.assertSequenceEqual( normalStressExpected.tolist(), np.round( normalStressObtained ).tolist() )
225-
self.assertSequenceEqual( shearStressExpected.tolist(), np.round( shearStressObtained ).tolist() )
224+
self.assertSequenceEqual(
225+
normalStressExpected.tolist(), # type: ignore[arg-type]
226+
np.round( normalStressObtained ).tolist() )
227+
self.assertSequenceEqual(
228+
shearStressExpected.tolist(), # type: ignore[arg-type]
229+
np.round( shearStressObtained ).tolist() )
226230

227231
def test_computeFailureEnvelop2( self: Self ) -> None:
228232
"""Test calculation of failure envelop in user-defined range."""
@@ -262,5 +266,9 @@ def test_computeFailureEnvelop2( self: Self ) -> None:
262266
n=10 )
263267

264268
# test results
265-
self.assertSequenceEqual( normalStressExpected.tolist(), np.round( normalStressObtained ).tolist() )
266-
self.assertSequenceEqual( shearStressExpected.tolist(), np.round( shearStressObtained ).tolist() )
269+
self.assertSequenceEqual(
270+
normalStressExpected.tolist(), # type: ignore[arg-type]
271+
np.round( normalStressObtained ).tolist() )
272+
self.assertSequenceEqual(
273+
shearStressExpected.tolist(), # type: ignore[arg-type]
274+
np.round( shearStressObtained ).tolist() )

geos-posp/setup.py

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,15 @@
22
from setuptools import setup
33

44
# This is where you add any fancy path resolution to the local lib:
5-
geos_geomecha_path: str = (Path(__file__).parent.parent / "geos-geomechanics").as_uri()
6-
geos_utils_path: str = (Path(__file__).parent.parent / "geos-utils").as_uri()
7-
8-
setup(
9-
install_requires=[
10-
"vtk >= 9.3",
11-
"numpy >= 1.26",
12-
"pandas >= 2.2",
13-
"typing_extensions >= 4.12",
14-
"types-setuptools >= 78.1.0",
15-
f"geos-geomechanics @ {geos_geomecha_path}",
16-
f"geos-utils @ {geos_utils_path}",
17-
]
18-
)
5+
geos_geomecha_path: str = ( Path( __file__ ).parent.parent / "geos-geomechanics" ).as_uri()
6+
geos_utils_path: str = ( Path( __file__ ).parent.parent / "geos-utils" ).as_uri()
197

8+
setup( install_requires=[
9+
"vtk >= 9.3",
10+
"numpy >= 1.26",
11+
"pandas >= 2.2",
12+
"typing_extensions >= 4.12",
13+
"types-setuptools >= 78.1.0",
14+
f"geos-geomechanics @ {geos_geomecha_path}",
15+
f"geos-utils @ {geos_utils_path}",
16+
] )

geos-posp/src/PVplugins/PVGeomechanicsAnalysis.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
from vtkmodules.vtkCommonCore import vtkInformation, vtkInformationVector
1515
from vtkmodules.vtkCommonDataModel import vtkPointSet, vtkUnstructuredGrid
1616

17-
1817
dir_path = os.path.dirname( os.path.realpath( __file__ ) )
1918
parent_dir_path = os.path.dirname( dir_path )
2019
if parent_dir_path not in sys.path:
@@ -322,12 +321,7 @@ def RequestData(
322321
int: 1 if calculation successfully ended, 0 otherwise.
323322
"""
324323
try:
325-
<<<<<<< HEAD
326324
self.m_logger.info( f"Apply filter {__name__}" )
327-
from filters.GeomechanicsCalculator import GeomechanicsCalculator
328-
=======
329-
self.m_logger.info(f"Apply filter {__name__}")
330-
>>>>>>> main
331325

332326
inData = self.GetInputData( inInfoVec, 0, 0 )
333327
assert inData is not None

geos-posp/src/PVplugins/PVGeosLogReader.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,9 @@ def __init__( self: Self ) -> None:
144144
self.m_propertiesWells.AddArray( prop )
145145

146146
self.m_propertiesAquifers: vtkDAS = vtkDAS()
147-
self.m_propertiesAquifers.AddObserver( "ModifiedEvent",
148-
createModifiedCallback( self ) ) # type: ignore[arg-type]
147+
self.m_propertiesAquifers.AddObserver(
148+
"ModifiedEvent", # type: ignore[arg-type]
149+
createModifiedCallback( self ) )
149150
propsAquifers: list[ str ] = [
150151
"Volume",
151152
"VolumetricRate",

geos-posp/src/PVplugins/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,3 @@
1111
m_path = os.path.abspath( os.path.join( dir_path, python_root, m, 'src' ) )
1212
if m_path not in sys.path:
1313
sys.path.insert( 0, m_path )
14-

0 commit comments

Comments
 (0)