mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Add Python linting using black (#7276)
This commit is contained in:
@@ -10,8 +10,16 @@ from .resinsight_classes import WellLogPlot
|
||||
|
||||
|
||||
@add_method(WellLogPlot)
|
||||
def export_data_as_las(self, export_folder, file_prefix='', export_tvdrkb=False, capitalize_file_names=False, resample_interval=0.0, convert_to_standard_units=False):
|
||||
""" Export LAS file(s) for the current plot
|
||||
def export_data_as_las(
|
||||
self,
|
||||
export_folder,
|
||||
file_prefix="",
|
||||
export_tvdrkb=False,
|
||||
capitalize_file_names=False,
|
||||
resample_interval=0.0,
|
||||
convert_to_standard_units=False,
|
||||
):
|
||||
"""Export LAS file(s) for the current plot
|
||||
|
||||
Arguments:
|
||||
export_folder(str): The path to export to. By default will use the global export folder
|
||||
@@ -23,20 +31,26 @@ def export_data_as_las(self, export_folder, file_prefix='', export_tvdrkb=False,
|
||||
Returns:
|
||||
A list of files exported
|
||||
"""
|
||||
res = self._execute_command(exportWellLogPlotData=Commands_pb2.ExportWellLogPlotDataRequest(exportFormat='LAS',
|
||||
viewId=self.id,
|
||||
exportFolder=export_folder,
|
||||
filePrefix=file_prefix,
|
||||
exportTvdRkb=export_tvdrkb,
|
||||
capitalizeFileNames=capitalize_file_names,
|
||||
resampleInterval=resample_interval,
|
||||
convertCurveUnits=convert_to_standard_units))
|
||||
res = self._execute_command(
|
||||
exportWellLogPlotData=Commands_pb2.ExportWellLogPlotDataRequest(
|
||||
exportFormat="LAS",
|
||||
viewId=self.id,
|
||||
exportFolder=export_folder,
|
||||
filePrefix=file_prefix,
|
||||
exportTvdRkb=export_tvdrkb,
|
||||
capitalizeFileNames=capitalize_file_names,
|
||||
resampleInterval=resample_interval,
|
||||
convertCurveUnits=convert_to_standard_units,
|
||||
)
|
||||
)
|
||||
return res.exportWellLogPlotDataResult.exportedFiles
|
||||
|
||||
|
||||
@add_method(WellLogPlot)
|
||||
def export_data_as_ascii(self, export_folder, file_prefix='', capitalize_file_names=False):
|
||||
""" Export LAS file(s) for the current plot
|
||||
def export_data_as_ascii(
|
||||
self, export_folder, file_prefix="", capitalize_file_names=False
|
||||
):
|
||||
"""Export LAS file(s) for the current plot
|
||||
|
||||
Arguments:
|
||||
export_folder(str): The path to export to. By default will use the global export folder
|
||||
@@ -46,11 +60,15 @@ def export_data_as_ascii(self, export_folder, file_prefix='', capitalize_file_na
|
||||
Returns:
|
||||
A list of files exported
|
||||
"""
|
||||
res = self._execute_command(exportWellLogPlotData=Commands_pb2.ExportWellLogPlotDataRequest(exportFormat='ASCII',
|
||||
viewId=self.id,
|
||||
exportFolder=export_folder,
|
||||
filePrefix=file_prefix,
|
||||
exportTvdRkb=False,
|
||||
capitalizeFileNames=capitalize_file_names,
|
||||
resampleInterval=0.0))
|
||||
res = self._execute_command(
|
||||
exportWellLogPlotData=Commands_pb2.ExportWellLogPlotDataRequest(
|
||||
exportFormat="ASCII",
|
||||
viewId=self.id,
|
||||
exportFolder=export_folder,
|
||||
filePrefix=file_prefix,
|
||||
exportTvdRkb=False,
|
||||
capitalizeFileNames=capitalize_file_names,
|
||||
resampleInterval=0.0,
|
||||
)
|
||||
)
|
||||
return res.exportWellLogPlotDataResult.exportedFiles
|
||||
|
||||
Reference in New Issue
Block a user