mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#6878 Export Completion: Make subset of settings available from Python
Python code linting changes detected by black
This commit is contained in:
@@ -116,6 +116,9 @@ message ExportWellPathCompRequest
|
||||
bool includeFishbones = 7;
|
||||
bool excludeMainBoreForFishbones = 8;
|
||||
CompdatCombinationMode combinationMode = 9;
|
||||
string customFileName = 10;
|
||||
bool exportComments = 11;
|
||||
bool exportWelspec = 12;
|
||||
}
|
||||
|
||||
message ExportSimWellPathFracRequest
|
||||
|
@@ -376,6 +376,9 @@ def export_well_path_completions(
|
||||
include_fishbones=True,
|
||||
fishbones_exclude_main_bore=True,
|
||||
combination_mode="INDIVIDUALLY",
|
||||
export_welspec=True,
|
||||
export_comments=True,
|
||||
custom_file_name="",
|
||||
):
|
||||
"""
|
||||
Export well path completions for the current case to file
|
||||
@@ -392,6 +395,9 @@ def export_well_path_completions(
|
||||
include_fishbones | Export fishbones? | bool
|
||||
fishbones_exclude_main_bore | Exclude main bore when exporting fishbones? | bool
|
||||
combination_mode | Settings for multiple completions in same cell | String Enum
|
||||
export_welspec | Export WELSPEC keyword | bool
|
||||
export_comments | Export completion data source as comment | bool
|
||||
custom_file_name | Custom filename when file_split is "UNIFIED_FILE"| String
|
||||
|
||||
**Enum file_split**::
|
||||
|
||||
@@ -429,6 +435,9 @@ def export_well_path_completions(
|
||||
includeFishbones=include_fishbones,
|
||||
excludeMainBoreForFishbones=fishbones_exclude_main_bore,
|
||||
combinationMode=combination_mode,
|
||||
exportWelspec=export_welspec,
|
||||
exportComments=export_comments,
|
||||
customFileName=custom_file_name,
|
||||
)
|
||||
)
|
||||
|
||||
|
@@ -0,0 +1,27 @@
|
||||
import sys
|
||||
import os
|
||||
import tempfile
|
||||
|
||||
sys.path.insert(1, os.path.join(sys.path[0], "../../"))
|
||||
import rips
|
||||
|
||||
import dataroot
|
||||
|
||||
|
||||
def test_10k(rips_instance, initialize_test):
|
||||
case_root_path = dataroot.PATH + "/TEST10K_FLT_LGR_NNC"
|
||||
project_path = case_root_path + "/well_completions_pytest.rsp"
|
||||
project = rips_instance.project.open(path=project_path)
|
||||
|
||||
export_folder = tempfile.gettempdir()
|
||||
# export_folder = "e:/temp/msj"
|
||||
|
||||
rips_instance.set_export_folder(export_type="COMPLETIONS", path=export_folder)
|
||||
|
||||
case = project.cases()[0]
|
||||
case.export_well_path_completions(
|
||||
time_step=1,
|
||||
well_path_names=["Well-1"],
|
||||
file_split="UNIFIED_FILE",
|
||||
custom_file_name="msj.jadda",
|
||||
)
|
Reference in New Issue
Block a user