Python Doc : Improve formatting of tables

This commit is contained in:
Magne Sjaastad
2020-03-30 14:07:04 +02:00
parent b064159cbd
commit ead29ef70f
6 changed files with 310 additions and 266 deletions

View File

@@ -179,7 +179,7 @@ def cell_info_for_active_cells(self, porosity_model="MATRIX_MODEL"):
Returns:
List of **CellInfo** objects
### CellInfo class description
**CellInfo class description**::
Parameter | Description | Type
------------------------- | --------------------------------------------- | -----
@@ -189,7 +189,7 @@ def cell_info_for_active_cells(self, porosity_model="MATRIX_MODEL"):
local_ijk | Cell index in IJK directions of local grid | Vec3i
parent_ijk | Cell index in IJK directions of parent grid | Vec3i
### Vec3i class description
**Vec3i class description**::
Parameter | Description | Type
---------------- | -------------------------------------------- | -----
@@ -210,7 +210,9 @@ def cell_info_for_active_cells(self, porosity_model="MATRIX_MODEL"):
def time_steps(self):
"""Get a list containing all time steps
The time steps are defined by the class **TimeStepDate** :
The time steps are defined by the class **TimeStepDate**
**TimeStepDate class description**::
Type | Name
--------- | ----------
@@ -297,6 +299,8 @@ def export_well_path_completions(
"""
Export well path completions for the current case to file
**Parameters**::
Parameter | Description | Type
----------------------------| ------------------------------------------------ | -----
time_step | Time step to export for | Integer
@@ -308,7 +312,7 @@ def export_well_path_completions(
fishbones_exclude_main_bore | Exclude main bore when exporting fishbones? | bool
combination_mode | Settings for multiple completions in same cell | String Enum
##### Enum file_split
**Enum file_split**::
Option | Description
----------------------------------- | ------------
@@ -316,14 +320,14 @@ def export_well_path_completions(
"SPLIT_ON_WELL" | One file for each well with combined transmissibilities
"SPLIT_ON_WELL_AND_COMPLETION_TYPE" | One file for each completion type for each well
##### Enum compdat_export
**Enum compdat_export**::
Option | Description
------------------------------------------- | ------------
"TRANSMISSIBILITIES" | Direct export of transmissibilities
"WPIMULT_AND_DEFAULT_CONNECTION_FACTORS" | Include WPIMULT in addition to transmissibilities
##### Enum combination_mode
**Enum combination_mode**::
Option | Description
------------------- | ------------
@@ -372,6 +376,8 @@ def create_multiple_fractures(
"""
Create Multiple Fractures in one go
**Parameters**::
Parameter | Description | Type
-----------------------| ----------------------------------------- | -----
template_id | Id of the template | Integer
@@ -382,6 +388,7 @@ def create_multiple_fractures(
base_layer | Base grid k-level for fractures | Integer
spacing | Spacing between fractures | Double
action | 'APPEND_FRACTURES' or 'REPLACE_FRACTURES' | String enum
"""
if isinstance(well_path_names, str):
well_path_names = [well_path_names]
@@ -411,6 +418,8 @@ def create_lgr_for_completion(
"""
Create a local grid refinement for the completions on the given well paths
**Parameters**::
Parameter | Description | Type
--------------- | -------------------------------------- | -----
time_steps | Time step index | Integer
@@ -420,7 +429,7 @@ def create_lgr_for_completion(
refinement_k | Refinment in z-direction | Integer
split_type | Defines how to split LGRS | String enum
##### Enum split_type
**Enum split_type**::
Option | Description
------------------------| ------------
@@ -464,6 +473,8 @@ def export_flow_characteristics(
):
""" Export Flow Characteristics data to text file in CSV format
**Parameters**::
Parameter | Description | Type
------------------------- | --------------------------------------------- | -----
time_steps | Time step indices | List of Integer
@@ -498,7 +509,7 @@ def available_properties(self,
"""Get a list of available properties
Arguments:
property_type (str): string corresponding to property_type enum. Choices:
property_type (str): string corresponding to property_type enum. Choices::
- DYNAMIC_NATIVE
- STATIC_NATIVE
- SOURSIMRL

View File

@@ -225,13 +225,15 @@ class Instance:
"""
Set the export folder used for all export functions
**Parameters**::
Parameter | Description | Type
---------------- | -------------------------------------------- | -----
export_type | String specifying what to export | String
path | Path to folder | String
create_folder | Create folder if it doesn't exist? | Boolean
##### Enum export_type
**Enum export_type**::
Option | Description
--------------- | ------------
@@ -248,10 +250,13 @@ class Instance:
"""
Set the main window size in pixels
**Parameters**::
Parameter | Description | Type
--------- | ---------------- | -----
width | Width in pixels | Integer
height | Height in pixels | Integer
"""
return self.__execute_command(setMainWindowSize=Cmd.SetWindowSizeParams(
width=width, height=height))
@@ -260,6 +265,8 @@ class Instance:
"""
Set the plot window size in pixels
**Parameters**::
Parameter | Description | Type
--------- | ---------------- | -----
width | Width in pixels | Integer

View File

@@ -14,7 +14,7 @@ def apply_cell_result(self, result_type, result_variable):
"""Apply a regular cell result
Arguments:
result_type (str): String representing the result category. The valid values are
result_type (str): String representing the result category. The valid values are::
- DYNAMIC_NATIVE
- STATIC_NATIVE
- SOURSIMRL
@@ -39,6 +39,8 @@ def apply_flow_diagnostics_cell_result(
producers=None):
"""Apply a flow diagnostics cell result
**Parameters**::
Parameter | Description | Type
------------------- | ------------------------------------------------------ | -----
result_variable | String representing the result value | String
@@ -46,7 +48,7 @@ def apply_flow_diagnostics_cell_result(
injectors | List of injector names, used by 'FLOW_TR_BY_SELECTION' | String List
producers | List of injector names, used by 'FLOW_TR_BY_SELECTION' | String List
##### Enum compdat_export
**Enum compdat_export**::
Option | Description
------------------------| ------------
@@ -89,6 +91,8 @@ def export_sim_well_fracture_completions(self, time_step,
compdat_export):
"""Export fracture completions for simulation wells
**Parameters**::
Parameter | Description | Type
----------------------------| ------------------------------------------------ | -----
time_step | Time step to export for | Integer
@@ -96,7 +100,7 @@ def export_sim_well_fracture_completions(self, time_step,
file_split | Controls how export data is split into files | String enum
compdat_export | Compdat export type | String enum
##### Enum file_split
**Enum file_split**::
Option | Description
----------------------------------- | ------------
@@ -104,7 +108,7 @@ def export_sim_well_fracture_completions(self, time_step,
"SPLIT_ON_WELL" | One file for each well transmissibilities
"SPLIT_ON_WELL_AND_COMPLETION_TYPE" | One file for each completion type for each well
##### Enum compdat_export
**Enum compdat_export**::
Option | Description
-----------------------------------------| ------------

View File

@@ -179,7 +179,7 @@ def cell_info_for_active_cells(self, porosity_model="MATRIX_MODEL"):
Returns:
List of **CellInfo** objects
### CellInfo class description
**CellInfo class description**::
Parameter | Description | Type
------------------------- | --------------------------------------------- | -----
@@ -189,7 +189,7 @@ def cell_info_for_active_cells(self, porosity_model="MATRIX_MODEL"):
local_ijk | Cell index in IJK directions of local grid | Vec3i
parent_ijk | Cell index in IJK directions of parent grid | Vec3i
### Vec3i class description
**Vec3i class description**::
Parameter | Description | Type
---------------- | -------------------------------------------- | -----
@@ -210,7 +210,9 @@ def cell_info_for_active_cells(self, porosity_model="MATRIX_MODEL"):
def time_steps(self):
"""Get a list containing all time steps
The time steps are defined by the class **TimeStepDate** :
The time steps are defined by the class **TimeStepDate**
**TimeStepDate class description**::
Type | Name
--------- | ----------
@@ -297,6 +299,8 @@ def export_well_path_completions(
"""
Export well path completions for the current case to file
**Parameters**::
Parameter | Description | Type
----------------------------| ------------------------------------------------ | -----
time_step | Time step to export for | Integer
@@ -308,7 +312,7 @@ def export_well_path_completions(
fishbones_exclude_main_bore | Exclude main bore when exporting fishbones? | bool
combination_mode | Settings for multiple completions in same cell | String Enum
##### Enum file_split
**Enum file_split**::
Option | Description
----------------------------------- | ------------
@@ -316,14 +320,14 @@ def export_well_path_completions(
"SPLIT_ON_WELL" | One file for each well with combined transmissibilities
"SPLIT_ON_WELL_AND_COMPLETION_TYPE" | One file for each completion type for each well
##### Enum compdat_export
**Enum compdat_export**::
Option | Description
------------------------------------------- | ------------
"TRANSMISSIBILITIES" | Direct export of transmissibilities
"WPIMULT_AND_DEFAULT_CONNECTION_FACTORS" | Include WPIMULT in addition to transmissibilities
##### Enum combination_mode
**Enum combination_mode**::
Option | Description
------------------- | ------------
@@ -372,6 +376,8 @@ def create_multiple_fractures(
"""
Create Multiple Fractures in one go
**Parameters**::
Parameter | Description | Type
-----------------------| ----------------------------------------- | -----
template_id | Id of the template | Integer
@@ -382,6 +388,7 @@ def create_multiple_fractures(
base_layer | Base grid k-level for fractures | Integer
spacing | Spacing between fractures | Double
action | 'APPEND_FRACTURES' or 'REPLACE_FRACTURES' | String enum
"""
if isinstance(well_path_names, str):
well_path_names = [well_path_names]
@@ -411,6 +418,8 @@ def create_lgr_for_completion(
"""
Create a local grid refinement for the completions on the given well paths
**Parameters**::
Parameter | Description | Type
--------------- | -------------------------------------- | -----
time_steps | Time step index | Integer
@@ -420,7 +429,7 @@ def create_lgr_for_completion(
refinement_k | Refinment in z-direction | Integer
split_type | Defines how to split LGRS | String enum
##### Enum split_type
**Enum split_type**::
Option | Description
------------------------| ------------
@@ -464,6 +473,8 @@ def export_flow_characteristics(
):
""" Export Flow Characteristics data to text file in CSV format
**Parameters**::
Parameter | Description | Type
------------------------- | --------------------------------------------- | -----
time_steps | Time step indices | List of Integer
@@ -498,7 +509,7 @@ def available_properties(self,
"""Get a list of available properties
Arguments:
property_type (str): string corresponding to property_type enum. Choices:
property_type (str): string corresponding to property_type enum. Choices::
- DYNAMIC_NATIVE
- STATIC_NATIVE
- SOURSIMRL

View File

@@ -225,13 +225,15 @@ class Instance:
"""
Set the export folder used for all export functions
**Parameters**::
Parameter | Description | Type
---------------- | -------------------------------------------- | -----
export_type | String specifying what to export | String
path | Path to folder | String
create_folder | Create folder if it doesn't exist? | Boolean
##### Enum export_type
**Enum export_type**::
Option | Description
--------------- | ------------
@@ -248,10 +250,13 @@ class Instance:
"""
Set the main window size in pixels
**Parameters**::
Parameter | Description | Type
--------- | ---------------- | -----
width | Width in pixels | Integer
height | Height in pixels | Integer
"""
return self.__execute_command(setMainWindowSize=Cmd.SetWindowSizeParams(
width=width, height=height))
@@ -260,6 +265,8 @@ class Instance:
"""
Set the plot window size in pixels
**Parameters**::
Parameter | Description | Type
--------- | ---------------- | -----
width | Width in pixels | Integer

View File

@@ -14,7 +14,7 @@ def apply_cell_result(self, result_type, result_variable):
"""Apply a regular cell result
Arguments:
result_type (str): String representing the result category. The valid values are
result_type (str): String representing the result category. The valid values are::
- DYNAMIC_NATIVE
- STATIC_NATIVE
- SOURSIMRL
@@ -39,6 +39,8 @@ def apply_flow_diagnostics_cell_result(
producers=None):
"""Apply a flow diagnostics cell result
**Parameters**::
Parameter | Description | Type
------------------- | ------------------------------------------------------ | -----
result_variable | String representing the result value | String
@@ -46,7 +48,7 @@ def apply_flow_diagnostics_cell_result(
injectors | List of injector names, used by 'FLOW_TR_BY_SELECTION' | String List
producers | List of injector names, used by 'FLOW_TR_BY_SELECTION' | String List
##### Enum compdat_export
**Enum compdat_export**::
Option | Description
------------------------| ------------
@@ -89,6 +91,8 @@ def export_sim_well_fracture_completions(self, time_step,
compdat_export):
"""Export fracture completions for simulation wells
**Parameters**::
Parameter | Description | Type
----------------------------| ------------------------------------------------ | -----
time_step | Time step to export for | Integer
@@ -96,7 +100,7 @@ def export_sim_well_fracture_completions(self, time_step,
file_split | Controls how export data is split into files | String enum
compdat_export | Compdat export type | String enum
##### Enum file_split
**Enum file_split**::
Option | Description
----------------------------------- | ------------
@@ -104,7 +108,7 @@ def export_sim_well_fracture_completions(self, time_step,
"SPLIT_ON_WELL" | One file for each well transmissibilities
"SPLIT_ON_WELL_AND_COMPLETION_TYPE" | One file for each completion type for each well
##### Enum compdat_export
**Enum compdat_export**::
Option | Description
-----------------------------------------| ------------