Documentation : Updates for Python documentation

This commit is contained in:
Magne Sjaastad 2019-10-25 11:20:27 +02:00
parent 76d196a91a
commit e21e4f5008
5 changed files with 50 additions and 29 deletions

View File

@ -163,6 +163,7 @@ if (RESINSIGHT_GRPC_PYTHON_EXECUTABLE)
"rips/generated/RiaVersionInfo.py"
"rips/__init__.py"
"rips/case.py"
"rips/contour_map.py"
"rips/grid.py"
"rips/gridcasegroup.py"
"rips/project.py"

View File

@ -11,84 +11,92 @@ This pages is created based on the content in the **PythonExamples** folder loca
AllCases
--------
.. literalinclude:: ../../rips/PythonExamples/AllCases.py
AppInfo
-------
.. literalinclude:: ../../rips/PythonExamples/AppInfo.py
.. literalinclude:: ../../rips/PythonExamples/all_cases.py
CaseGridGroup
-------------
.. literalinclude:: ../../rips/PythonExamples/CaseGridGroup.py
.. literalinclude:: ../../rips/PythonExamples/case_grid_group.py
CaseInfoStreamingExample
------------------------
.. literalinclude:: ../../rips/PythonExamples/CaseInfoStreamingExample.py
.. literalinclude:: ../../rips/PythonExamples/case_info_streaming_example.py
CommandExample
--------------
.. literalinclude:: ../../rips/PythonExamples/CommandExample.py
.. literalinclude:: ../../rips/PythonExamples/command_example.py
Create WBS Plot
---------------
.. literalinclude:: ../../rips/PythonExamples/create_wbs_plot.py
ErrorHandling
-------------
.. literalinclude:: ../../rips/PythonExamples/ErrorHandling.py
.. literalinclude:: ../../rips/PythonExamples/error_handling.py
ExportPlots
-----------
.. literalinclude:: ../../rips/PythonExamples/export_plots.py
ExportSnapshots
---------------
.. literalinclude:: ../../rips/PythonExamples/ExportSnapshots.py
.. literalinclude:: ../../rips/PythonExamples/export_snapshots.py
GridInformation
---------------
.. literalinclude:: ../../rips/PythonExamples/GridInformation.py
.. literalinclude:: ../../rips/PythonExamples/grid_information.py
Import Well Paths
-----------------
.. literalinclude:: ../../rips/PythonExamples/import_well_paths_and_logs.py
InputPropTestAsync
------------------
.. literalinclude:: ../../rips/PythonExamples/InputPropTestAsync.py
.. literalinclude:: ../../rips/PythonExamples/input_prop_test_async.py
InputPropTestSync
-----------------
.. literalinclude:: ../../rips/PythonExamples/InputPropTestSync.py
.. literalinclude:: ../../rips/PythonExamples/input_prop_test_sync.py
InstanceExample
---------------
.. literalinclude:: ../../rips/PythonExamples/InstanceExample.py
.. literalinclude:: ../../rips/PythonExamples/instance_example.py
LaunchWithCommandLineOptions
----------------------------
.. literalinclude:: ../../rips/PythonExamples/LaunchWithCommandLineOptions.py
.. literalinclude:: ../../rips/PythonExamples/launch_with_commandline_options.py
SelectedCases
-------------
.. literalinclude:: ../../rips/PythonExamples/SelectedCases.py
.. literalinclude:: ../../rips/PythonExamples/selected_cases.py
SetCellResult
-------------
.. literalinclude:: ../../rips/PythonExamples/SetCellResult.py
.. literalinclude:: ../../rips/PythonExamples/set_cell_result.py
SetFlowDiagnosticsResult
------------------------
.. literalinclude:: ../../rips/PythonExamples/SetFlowDiagnosticsResult.py
.. literalinclude:: ../../rips/PythonExamples/set_flow_diagnostics_result.py
SetGridProperties
-----------------
.. literalinclude:: ../../rips/PythonExamples/SetGridProperties.py
.. literalinclude:: ../../rips/PythonExamples/set_grid_properties.py
SoilAverageAsync
----------------
.. literalinclude:: ../../rips/PythonExamples/SoilAverageAsync.py
.. literalinclude:: ../../rips/PythonExamples/soil_average_async.py
SoilAverageSync
---------------
.. literalinclude:: ../../rips/PythonExamples/SoilAverageSync.py
.. literalinclude:: ../../rips/PythonExamples/soil_average_sync.py
SoilPorvAsync
-------------
.. literalinclude:: ../../rips/PythonExamples/SoilPorvAsync.py
.. literalinclude:: ../../rips/PythonExamples/soil_porv_async.py
SoilPorvSync
------------
.. literalinclude:: ../../rips/PythonExamples/SoilPorvSync.py
.. literalinclude:: ../../rips/PythonExamples/soil_porv_sync.py
ViewExample
-----------
.. literalinclude:: ../../rips/PythonExamples/ViewExample.py
.. literalinclude:: ../../rips/PythonExamples/view_example.py

View File

@ -7,7 +7,7 @@ Instance Module
Example
-------
.. literalinclude:: ../../rips/PythonExamples/InstanceExample.py
.. literalinclude:: ../../rips/PythonExamples/instance_example.py
:language: python
:lines: 5-
:emphasize-lines: 3
@ -20,11 +20,17 @@ Case Module
Example
-------
.. literalinclude:: ../../rips/PythonExamples/AllCases.py
.. literalinclude:: ../../rips/PythonExamples/all_cases.py
:language: python
:lines: 5-
:emphasize-lines: 5
Contour Map Module
==================
.. autoclass:: rips.contour_map.ContourMap
:members:
Grid Module
===========
@ -70,7 +76,7 @@ Read two properties, multiply them together and push the results back to ResInsi
This is slow and inefficient, but works.
.. literalinclude:: ../../rips/PythonExamples/InputPropTestSync.py
.. literalinclude:: ../../rips/PythonExamples/input_prop_test_async.py
:language: python
:lines: 5-
@ -80,7 +86,7 @@ Read two properties at the same time chunk by chunk, multiply each chunk togethe
This is far more efficient.
.. literalinclude:: ../../rips/PythonExamples/InputPropTestAsync.py
.. literalinclude:: ../../rips/PythonExamples/input_prop_test_sync.py
:language: python
:lines: 5-

View File

@ -251,7 +251,12 @@ class Case(PdmObject):
caseId=self.case_id)).createViewResult.viewId)
def contour_maps(self, map_type=ContourMapType.ECLIPSE):
"""Get a list of all contour maps belonging to a project"""
""" Get a list of all contour maps belonging to a project
Arguments:
map_type (enum): ContourMapType.ECLIPSE or ContourMapType.GEO_MECH
"""
pdm_objects = self.descendants(ContourMapType.get_identifier(map_type))
contour_maps = []

View File

@ -35,6 +35,7 @@ class ContourMap(View):
def export_to_text(self, export_file_name='', export_local_coordinates=False, undefined_value_label="NaN", exclude_undefined_values=False):
""" Export snapshot for the current view
Arguments:
export_file_name(str): The file location to store results in.
export_local_coordinates(bool): Should we export local coordinates, or UTM.