Skip to content

Commit

Permalink
Python updates
Browse files Browse the repository at this point in the history
  • Loading branch information
magnesj committed Dec 11, 2023
1 parent db8f31f commit e3fd02a
Show file tree
Hide file tree
Showing 5 changed files with 133 additions and 90 deletions.
170 changes: 86 additions & 84 deletions docs/rips/generated/Commands_pb2.py

Large diffs are not rendered by default.

13 changes: 11 additions & 2 deletions docs/rips/generated/Commands_pb2.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ class CompdatCombinationMode(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
INDIVIDUALLY: _ClassVar[CompdatCombinationMode]
COMBINED: _ClassVar[CompdatCombinationMode]

class ExportVisibleCellsKeywordType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
__slots__ = []
FLUXNUM: _ClassVar[ExportVisibleCellsKeywordType]
MULTNUM: _ClassVar[ExportVisibleCellsKeywordType]
ACTNUM: _ClassVar[ExportVisibleCellsKeywordType]

class ExportFolderType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
__slots__ = []
COMPLETIONS: _ClassVar[ExportFolderType]
Expand Down Expand Up @@ -76,6 +82,9 @@ WPIMULT_AND_DEFAULT_CONNECTION_FACTORS: CompdatExportType
NO_COMPLETIONS: CompdatExportType
INDIVIDUALLY: CompdatCombinationMode
COMBINED: CompdatCombinationMode
FLUXNUM: ExportVisibleCellsKeywordType
MULTNUM: ExportVisibleCellsKeywordType
ACTNUM: ExportVisibleCellsKeywordType
COMPLETIONS: ExportFolderType
SNAPSHOTS: ExportFolderType
PROPERTIES: ExportFolderType
Expand Down Expand Up @@ -240,11 +249,11 @@ class ExportVisibleCellsRequest(_message.Message):
INACTIVECELLSVALUE_FIELD_NUMBER: _ClassVar[int]
caseId: int
viewId: int
exportKeyword: str
exportKeyword: ExportVisibleCellsKeywordType
visibleActiveCellsValue: int
hiddenActiveCellsValue: int
inactiveCellsValue: int
def __init__(self, caseId: _Optional[int] = ..., viewId: _Optional[int] = ..., exportKeyword: _Optional[str] = ..., visibleActiveCellsValue: _Optional[int] = ..., hiddenActiveCellsValue: _Optional[int] = ..., inactiveCellsValue: _Optional[int] = ...) -> None: ...
def __init__(self, caseId: _Optional[int] = ..., viewId: _Optional[int] = ..., exportKeyword: _Optional[_Union[ExportVisibleCellsKeywordType, str]] = ..., visibleActiveCellsValue: _Optional[int] = ..., hiddenActiveCellsValue: _Optional[int] = ..., inactiveCellsValue: _Optional[int] = ...) -> None: ...

class SetExportFolderRequest(_message.Message):
__slots__ = ["type", "path", "createFolder"]
Expand Down
2 changes: 1 addition & 1 deletion docs/rips/generated/RiaVersionInfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# Just sets version constants

RESINSIGHT_MAJOR_VERSION : str = "2023"
RESINSIGHT_MINOR_VERSION : str = "10"
RESINSIGHT_MINOR_VERSION : str = "12"
RESINSIGHT_PATCH_VERSION : str = "0"

PYTHON_GRPC_PROTOC_VERSION : str = "libprotoc 23.4"
36 changes: 35 additions & 1 deletion docs/rips/generated/generated_classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -756,6 +756,16 @@ def append_perforation_interval(self, start_md: float=0, end_md: float=0, diamet
return self._call_pdm_method_return_value("AppendPerforationInterval", Perforation, start_md=start_md, end_md=end_md, diameter=diameter, skin_factor=skin_factor)


def completion_settings(self) -> Optional[WellPathCompletionSettings]:
"""Completion Settings
Returns:
WellPathCompletionSettings
"""
children = self.children("CompletionSettings", WellPathCompletionSettings)
return children[0] if len(children) > 0 else None


def completions(self) -> Optional[WellPathCompletions]:
"""Completions
Expand Down Expand Up @@ -1197,6 +1207,7 @@ class RimStatisticalCalculation(Reservoir):
percentile_calculation_type (str): One of [NearestObservationPercentile, HistogramEstimatedPercentile, InterpolatedObservationPercentile]
porosity_model (str): One of [MATRIX_MODEL, FRACTURE_MODEL]
result_type (str): One of [DYNAMIC_NATIVE, STATIC_NATIVE, SOURSIMRL, GENERATED, INPUT_PROPERTY, FORMATION_NAMES, ALLAN_DIAGRAMS, FLOW_DIAGNOSTICS, INJECTION_FLOODING]
selected_time_steps (List[int]): Time Step Selection
static_properties_to_calculate (List[str]): Stat Prop
use_zero_as_inactive_cell_value (bool): Use Zero as Inactive Cell Value
well_data_source_case (str): Well Data Source Case
Expand All @@ -1218,6 +1229,7 @@ def __init__(self, pb2_object: Optional[PdmObject_pb2.PdmObject]=None, channel:
self.percentile_calculation_type: str = "InterpolatedObservationPercentile"
self.porosity_model: str = "MATRIX_MODEL"
self.result_type: str = "DYNAMIC_NATIVE"
self.selected_time_steps: List[int] = []
self.static_properties_to_calculate: List[str] = []
self.use_zero_as_inactive_cell_value: bool = False
self.well_data_source_case: str = "None"
Expand Down Expand Up @@ -1275,7 +1287,7 @@ class FractureTemplate(PdmObjectBase):
Attributes:
azimuth_angle (float): Azimuth Angle
conductivity_factor (float): Conductivity
conductivity_type (str): One of [InfiniteConductivity, FiniteConductivity]
conductivity_type (str): One of [InfiniteConductivity, FiniteConductivity, FiniteConductivityInfiniteWellPI]
d_factor_scale_factor (float): D-factor
height_scale_factor (float): Height
orientation (str): One of [Azimuth, Longitudinal, Transverse]
Expand Down Expand Up @@ -2065,6 +2077,27 @@ def __init__(self, pb2_object: Optional[PdmObject_pb2.PdmObject]=None, channel:
if FileWellPath.__custom_init__ is not None:
FileWellPath.__custom_init__(self, pb2_object=pb2_object, channel=channel)

class WellPathCompletionSettings(PdmObjectBase):
"""
Attributes:
group_name_for_export (str): Group Name
msw_liner_diameter (float): MSW Liner Diameter
msw_roughness (float): MSW Roughness
well_name_for_export (str): Well Name
well_type_for_export (str): One of [OIL, GAS, WATER, LIQUID]
"""
__custom_init__ = None #: Assign a custom init routine to be run at __init__

def __init__(self, pb2_object: Optional[PdmObject_pb2.PdmObject]=None, channel: Optional[grpc.Channel]=None) -> None:
self.group_name_for_export: str = ""
self.msw_liner_diameter: float = 0.152
self.msw_roughness: float = 1e-05
self.well_name_for_export: str = ""
self.well_type_for_export: str = "OIL"
PdmObjectBase.__init__(self, pb2_object, channel)
if WellPathCompletionSettings.__custom_init__ is not None:
WellPathCompletionSettings.__custom_init__(self, pb2_object=pb2_object, channel=channel)

class WellPathCompletions(PdmObjectBase):
__custom_init__ = None #: Assign a custom init routine to be run at __init__

Expand Down Expand Up @@ -2306,6 +2339,7 @@ def class_dict() -> Dict[str, Type[PdmObjectBase]]:
classes['WellLogPlotTrack'] = WellLogPlotTrack
classes['WellPath'] = WellPath
classes['WellPathCollection'] = WellPathCollection
classes['WellPathCompletionSettings'] = WellPathCompletionSettings
classes['WellPathCompletions'] = WellPathCompletions
classes['WellPathFracture'] = WellPathFracture
classes['WellPathGeometry'] = WellPathGeometry
Expand Down
2 changes: 0 additions & 2 deletions docs/rips/tests/test_grids.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
from typing import Any, Dict, List, TypedDict
import math

from generated.generated_classes import Case

sys.path.insert(1, os.path.join(sys.path[0], "../../"))
import rips

Expand Down

0 comments on commit e3fd02a

Please sign in to comment.