diff --git a/ApplicationCode/GrpcInterface/Python/doc/source/rips.rst b/ApplicationCode/GrpcInterface/Python/doc/source/rips.rst index f20e954542..6e5e14daa5 100644 --- a/ApplicationCode/GrpcInterface/Python/doc/source/rips.rst +++ b/ApplicationCode/GrpcInterface/Python/doc/source/rips.rst @@ -1,40 +1,26 @@ Instance Module -================ +=============== .. autoclass:: rips.Instance :members: Example --------- +------- -.. literalinclude:: ../../rips/examples/InstanceExample.py +.. literalinclude:: ../../rips/PythonExamples/InstanceExample.py :language: python :lines: 5- :emphasize-lines: 3 -App Module -=========== - -.. autoclass:: rips.App - :members: - -Example --------- - -.. literalinclude:: ../../rips/examples/AppInfo.py - :language: python - :lines: 5- - :emphasize-lines: 5 - Case Module -============ +=========== .. autoclass:: rips.Case :members: Example ------- -.. literalinclude:: ../../rips/examples/AllCases.py +.. literalinclude:: ../../rips/PythonExamples/AllCases.py :language: python :lines: 5- :emphasize-lines: 5 @@ -47,8 +33,8 @@ Commands Module :undoc-members: Example --------- -.. literalinclude:: ../../rips/examples/CommandExample.py +------- +.. literalinclude:: ../../rips/PythonExamples/CommandExample.py :language: python :lines: 5- @@ -72,7 +58,7 @@ Example print(dimensions.k) GridCaseGroup Module -=========== +==================== .. autoclass:: rips.GridCaseGroup :members: @@ -91,18 +77,18 @@ Properties Module :members: View Module -================= +=========== .. autoclass:: rips.View :members: - Synchronous Example --------------------- +Synchronous Example +------------------- Read two properties, multiply them together and push the results back to ResInsight in a naïve way, by reading PORO into a list, then reading PERMX into a list, then multiplying them both in a resulting list and finally transferring back the list. This is slow and inefficient, but works. -.. literalinclude:: ../../rips/examples/InputPropTestSync.py +.. literalinclude:: ../../rips/PythonExamples/InputPropTestSync.py :language: python :lines: 5- @@ -112,7 +98,7 @@ Read two properties at the same time chunk by chunk, multiply each chunk togethe This is far more efficient. -.. literalinclude:: ../../rips/examples/InputPropTestAsync.py +.. literalinclude:: ../../rips/PythonExamples/InputPropTestAsync.py :language: python :lines: 5- diff --git a/ApplicationCode/GrpcInterface/Python/rips/Properties.py b/ApplicationCode/GrpcInterface/Python/rips/Properties.py index 8b25d29033..38af187e25 100644 --- a/ApplicationCode/GrpcInterface/Python/rips/Properties.py +++ b/ApplicationCode/GrpcInterface/Python/rips/Properties.py @@ -62,18 +62,16 @@ class Properties: """Get a list of available properties Arguments: - propertyType (str): string corresponding to propertyType enum. - - Can be one of the following: - - 'DYNAMIC_NATIVE' - 'STATIC_NATIVE' - 'SOURSIMRL' - 'GENERATED' - 'INPUT_PROPERTY' - 'FORMATION_NAMES' - 'FLOW_DIAGNOSTICS' - 'INJECTION_FLOODING' + propertyType (str): string corresponding to propertyType enum. Can be one of the following: + - DYNAMIC_NATIVE + - STATIC_NATIVE + - SOURSIMRL + - GENERATED + - INPUT_PROPERTY + - FORMATION_NAMES + - FLOW_DIAGNOSTICS + - INJECTION_FLOODING + porosityModel(str): 'MATRIX_MODEL' or 'FRACTURE_MODEL'. """ diff --git a/ApplicationCode/GrpcInterface/Python/rips/View.py b/ApplicationCode/GrpcInterface/Python/rips/View.py index d895e1bf34..91040bb6fa 100644 --- a/ApplicationCode/GrpcInterface/Python/rips/View.py +++ b/ApplicationCode/GrpcInterface/Python/rips/View.py @@ -34,12 +34,18 @@ class View (PdmObject): def applyCellResult(self, resultType, resultVariable): """Apply a regular cell result + Arguments: - resultType [str]: String representing the result category - The valid values are: "DYNAMIC_NATIVE", "STATIC_NATIVE", "SOURSIMRL", - "GENERATED", "INPUT_PROPERTY", "FORMATION_NAMES", - "FLOW_DIAGNOSTICS" and "INJECTION_FLOODING" - resultVariable [str]: String representing the result value. + resultType (str): String representing the result category. The valid values are + - DYNAMIC_NATIVE + - STATIC_NATIVE + - SOURSIMRL + - GENERATED + - INPUT_PROPERTY + - FORMATION_NAMES + - FLOW_DIAGNOSTICS + - INJECTION_FLOODING + resultVariable (str): String representing the result variable. """ cellResult = self.cellResult() cellResult.setValue("ResultType", resultType) @@ -54,17 +60,18 @@ class View (PdmObject): """Apply a flow diagnostics cell result Arguments: - resultVariable [str]: String representing the result value + resultVariable (str): String representing the result value The valid values are 'TOF', 'Fraction', 'MaxFractionTracer' and 'Communication'. - selectionMode [str]: String specifying which tracers to select. - The valid values are FLOW_TR_INJ_AND_PROD (all injector and producer tracers) - FLOW_TR_PRODUCERS (all producers) - FLOW_TR_INJECTORS (all injectors) - FLOW_TR_BY_SELECTION (specify individual tracers in the - injectorTracers and producerTracers variables) - injectorTracers [list]: List of injector names (strings) to select. + selectionMode (str): String specifying which tracers to select. + The valid values are + - FLOW_TR_INJ_AND_PROD (all injector and producer tracers), + - FLOW_TR_PRODUCERS (all producers) + - FLOW_TR_INJECTORS (all injectors), + - FLOW_TR_BY_SELECTION (specify individual tracers in the + injectorTracers and producerTracers variables) + injectorTracers (list): List of injector names (strings) to select. Requires selectionMode to be 'FLOW_TR_BY_SELECTION'. - producerTracers [list]: List of producer tracers (strings) to select. + producerTracers (list): List of producer tracers (strings) to select. Requires selectionMode to be 'FLOW_TR_BY_SELECTION'. """ cellResult = self.cellResult()