Skip to content

Commit 27a1c8a

Browse files
Use null category instead of potentially confusing 'Default' for HIP-RA-X params. Include HIP-RA-X parameters in sphinx docs
1 parent 4791285 commit 27a1c8a

File tree

5 files changed

+29
-24
lines changed

5 files changed

+29
-24
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ requirements.txt
1313
.DS_Store
1414
*.lock
1515
*.json
16+
all_messages_conf.log
1617

1718
# C extensions
1819
*.so
@@ -81,6 +82,8 @@ docs/reference/geophires-request.json
8182
docs/reference/parameters.rst
8283
docs/geophires-request.json
8384
docs/parameters.rst
85+
docs/hip-ra-x-request.json
86+
docs/hip_ra_x_parameters.rst
8487
_site/
8588
/docs/geophires_x.rstx
8689
/docs/temperature.txt

docs/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Contents
88
overview
99
parameters
1010
How-to-extend-GEOPHIRES-X
11+
hip_ra_x_parameters
1112
Monte-Carlo-User-Guide
1213
.. reference/index
1314

src/geophires_x_schema_generator/__init__.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def get_parameter_sources(self) -> list[Tuple[Any, str]]:
6666
]
6767

6868
def get_schema_title(self) -> str:
69-
return 'GEOPHIRES'
69+
return 'GEOPHIRES-X'
7070

7171
def get_parameters_json(self) -> Tuple[str, str]:
7272

@@ -138,10 +138,11 @@ def generate_parameters_reference_rst(self) -> str:
138138
input_params_by_category[category][input_param_name] = input_param
139139

140140
def get_input_params_table(category_params, category_name) -> str:
141+
category_display = category_name if category_name is not None else ''
141142
input_rst = f"""
142-
{category_name}
143-
{'-' * len(category_name)}
144-
.. list-table:: {category_name} Parameters
143+
{category_display}
144+
{'-' * len(category_display)}
145+
.. list-table:: {category_display}{' ' if len(category_display) > 0 else ''}Parameters
145146
:header-rows: 1
146147
147148
* - Name
@@ -176,7 +177,7 @@ def get_input_params_table(category_params, category_name) -> str:
176177

177178
output_rst = self.get_output_params_table_rst(output_params_json)
178179

179-
rst = f"""Parameters
180+
rst = f"""{self.get_schema_title()} Parameters
180181
==========
181182
182183
.. contents::
@@ -241,7 +242,7 @@ def _get_min_and_max(param: dict, default_val='') -> Tuple:
241242
class HipRaXSchemaGenerator(GeophiresXSchemaGenerator):
242243
def get_parameter_sources(self) -> list[Tuple[Any, str]]:
243244
dummy_model = HIP_RA_X()
244-
return [(dummy_model, 'Default')]
245+
return [(dummy_model, None)]
245246

246247
def get_schema_title(self) -> str:
247248
return 'HIP-RA-X'

src/geophires_x_schema_generator/geophires-request.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"definitions": {},
33
"$schema": "http://json-schema.org/draft-04/schema#",
44
"type": "object",
5-
"title": "GEOPHIRES Schema",
5+
"title": "GEOPHIRES-X Schema",
66
"required": [
77
"Reservoir Model",
88
"Reservoir Depth",

src/geophires_x_schema_generator/hip-ra-x-request.json

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"description": "Reservoir Temperature [150 dec-C]",
2121
"type": "number",
2222
"units": "degC",
23-
"category": "Default",
23+
"category": null,
2424
"default": 0.0,
2525
"minimum": 50,
2626
"maximum": 1000
@@ -29,7 +29,7 @@
2929
"description": "Rejection Temperature [25 dec-C]",
3030
"type": "number",
3131
"units": "degC",
32-
"category": "Default",
32+
"category": null,
3333
"default": 0.0,
3434
"minimum": 0.1,
3535
"maximum": 200
@@ -38,7 +38,7 @@
3838
"description": "Reservoir Porosity [18%]",
3939
"type": "number",
4040
"units": "%",
41-
"category": "Default",
41+
"category": null,
4242
"default": 0.0,
4343
"minimum": 0.0,
4444
"maximum": 100.0
@@ -47,7 +47,7 @@
4747
"description": "Reservoir Area [81 km2]",
4848
"type": "number",
4949
"units": "km**2",
50-
"category": "Default",
50+
"category": null,
5151
"default": 0.0,
5252
"minimum": 0.0,
5353
"maximum": 10000.0
@@ -56,7 +56,7 @@
5656
"description": "Reservoir Thickness [0.286 km]",
5757
"type": "number",
5858
"units": "kilometer",
59-
"category": "Default",
59+
"category": null,
6060
"default": 0.0,
6161
"minimum": 0.0,
6262
"maximum": 10000.0
@@ -65,7 +65,7 @@
6565
"description": "Reservoir Life Cycle [30 years]",
6666
"type": "integer",
6767
"units": "yr",
68-
"category": "Default",
68+
"category": null,
6969
"default": null,
7070
"minimum": 1,
7171
"maximum": 100
@@ -74,7 +74,7 @@
7474
"description": "Rock Heat Capacity [2.84E+12 kJ/km3C]",
7575
"type": "number",
7676
"units": "kJ/km**3C",
77-
"category": "Default",
77+
"category": null,
7878
"default": 0.0,
7979
"minimum": 0.0,
8080
"maximum": 100000000000000.0
@@ -83,7 +83,7 @@
8383
"description": "Specific Heat Capacity Of Water [4.18 kJ/kgC]",
8484
"type": "number",
8585
"units": "kJ/kgC",
86-
"category": "Default",
86+
"category": null,
8787
"default": 0.0,
8888
"minimum": 3.0,
8989
"maximum": 10.0
@@ -92,7 +92,7 @@
9292
"description": "Density Of Water [1.0E+12 kg/km3]",
9393
"type": "number",
9494
"units": "kg/km**3",
95-
"category": "Default",
95+
"category": null,
9696
"default": 0.0,
9797
"minimum": 100000000000.0,
9898
"maximum": 10000000000000.0
@@ -101,7 +101,7 @@
101101
"description": "Density Of Rock [2.55E+12 kg/km3]",
102102
"type": "number",
103103
"units": "kg/km**3",
104-
"category": "Default",
104+
"category": null,
105105
"default": 0.0,
106106
"minimum": 100000000000.0,
107107
"maximum": 10000000000000.0
@@ -110,7 +110,7 @@
110110
"description": "percent of heat that is recoverable from the rock in the reservoir 0.66 for high-T reservoirs, 0.43 for low-T reservoirs (Garg and Combs (2011)",
111111
"type": "number",
112112
"units": "",
113-
"category": "Default",
113+
"category": null,
114114
"default": 0.0,
115115
"minimum": 0.0,
116116
"maximum": 1.0
@@ -119,7 +119,7 @@
119119
"description": "percent of heat that is recoverable from the fluid in the reservoir 0.66 for high-T reservoirs, 0.43 for low-T reservoirs (Garg and Combs (2011)",
120120
"type": "number",
121121
"units": "",
122-
"category": "Default",
122+
"category": null,
123123
"default": 0.0,
124124
"minimum": 0.0,
125125
"maximum": 1.0
@@ -128,7 +128,7 @@
128128
"description": "percent of fluid that is recoverable from the reservoir (0.5 = 50%)",
129129
"type": "number",
130130
"units": "",
131-
"category": "Default",
131+
"category": null,
132132
"default": 0.0,
133133
"minimum": 0.0,
134134
"maximum": 1.0
@@ -137,7 +137,7 @@
137137
"description": "depth to top of reservoir (km). Calculated based on an assumed gradient and the reservoir temperature if no value given",
138138
"type": "number",
139139
"units": "kilometer",
140-
"category": "Default",
140+
"category": null,
141141
"default": 0.0,
142142
"minimum": 0.001,
143143
"maximum": 15.0
@@ -146,7 +146,7 @@
146146
"description": "pressure of the of reservoir (in mPa). Calculated assuming hydrostatic pressure and reservoir depth & water density if no value given",
147147
"type": "number",
148148
"units": "mPa",
149-
"category": "Default",
149+
"category": null,
150150
"default": 0.0,
151151
"minimum": 0.0,
152152
"maximum": 10000.0
@@ -155,7 +155,7 @@
155155
"description": "percent of fluid that is recoverable from the reservoir (0.75 = 75%)",
156156
"type": "number",
157157
"units": "",
158-
"category": "Default",
158+
"category": null,
159159
"default": 0.0,
160160
"minimum": 0.0,
161161
"maximum": 1.0
@@ -164,7 +164,7 @@
164164
"description": "Provide a HTML output name if you want to have HTML output (no output if not provided)",
165165
"type": "string",
166166
"units": null,
167-
"category": "Default",
167+
"category": null,
168168
"default": null,
169169
"minimum": null,
170170
"maximum": null

0 commit comments

Comments
 (0)