Skip to content

Commit 1ac596c

Browse files
Merge pull request NREL#286 from softwareengineerprogrammer/main
SBT docs, version bump
2 parents 3a52874 + b433a62 commit 1ac596c

File tree

12 files changed

+62
-7
lines changed

12 files changed

+62
-7
lines changed

.bumpversion.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 3.5.2
2+
current_version = 3.5.3
33
commit = True
44
tag = True
55

.cookiecutterrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ default_context:
5454
sphinx_doctest: "no"
5555
sphinx_theme: "sphinx-py3doc-enhanced-theme"
5656
test_matrix_separate_coverage: "no"
57-
version: 3.5.2
57+
version: 3.5.3
5858
version_manager: "bump2version"
5959
website: "https://github.com/NREL"
6060
year_from: "2023"

CHANGELOG.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ GEOPHIRES-X (2023-2024)
1212

1313
Milestone version for case studies, SHR temperatures, and other changes since 3.0.
1414

15+
3.5.3: SBT Reservoir Model (Slender Body Theory)
16+
1517
3.4
1618
^^^
1719

CONTRIBUTING.rst

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,28 @@ Once a version bump is merged into the main repository with a Pull Request, tags
286286
287287
(venv) ➜ python-geophires-x git:(main) git push origin --tags
288288
289+
290+
Documentation Updates
291+
---------------------
292+
293+
If a change includes new classes with parameters that should be included in documentation,
294+
add them to `get_parameter_sources in geophires_x_schema_generator <https://github.com/NREL/GEOPHIRES-X/blob/1f47d6207c4d1458b949ac2cc470b453951d27ac/src/geophires_x_schema_generator/__init__.py#L48-L75>`__.
295+
Then run `geophires_x_schema_generator/main.py <https://github.com/NREL/GEOPHIRES-X/blob/main/src/geophires_x_schema_generator/main.py>`__
296+
and commit the updated json schema files to source - `example <https://github.com/NREL/GEOPHIRES-X/pull/285/files#diff-3d85ef79807fc6c25a758a698fd3a7095750bd27ea52341700e1dad94885b5f6>`__.
297+
298+
``geophires_x_schema_generator/main.py`` should also be run if new parameters are added to existing classes or changes are made to existing parameters.
299+
300+
New classes may also be added to the appropriate module file in ``docs/reference``, i.e. `geophires_x.rst <https://github.com/NREL/GEOPHIRES-X/blob/8cf4ee9a2cc917f037ff06554c40698ef2591614/docs/reference/geophires_x.rst#L16-L15>`__
301+
302+
Schema Files
303+
------------
304+
305+
GEOPHIRES & HIP-RA schema files generated by ``geophires_x_schema_generator`` are in an `OpenAPI Specification <https://swagger.io/docs/specification/about/>`__-compatible format.
306+
These schema files can be used to build your own API or UI for GEOPHIRES.
307+
308+
* `geophires-request.json <https://github.com/NREL/GEOPHIRES-X/blob/main/src/geophires_x_schema_generator/geophires-request.json>`__
309+
* `hip-ra-x-request.json <https://github.com/NREL/GEOPHIRES-X/blob/main/src/geophires_x_schema_generator/hip-ra-x-request.json>`__
310+
289311
Tips
290312
----
291313

README.rst

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ Free software: `MIT license <LICENSE>`__
5151
:alt: Supported implementations
5252
:target: https://pypi.org/project/geophires-x
5353

54-
.. |commits-since| image:: https://img.shields.io/github/commits-since/softwareengineerprogrammer/GEOPHIRES-X/v3.5.2.svg
54+
.. |commits-since| image:: https://img.shields.io/github/commits-since/softwareengineerprogrammer/GEOPHIRES-X/v3.5.3.svg
5555
:alt: Commits since latest release
56-
:target: https://github.com/softwareengineerprogrammer/GEOPHIRES-X/compare/v3.5.2...main
56+
:target: https://github.com/softwareengineerprogrammer/GEOPHIRES-X/compare/v3.5.3...main
5757

5858
.. |docs| image:: https://readthedocs.org/projects/GEOPHIRES-X/badge/?style=flat
5959
:target: https://nrel.github.io/GEOPHIRES-X
@@ -333,6 +333,12 @@ A variety of example input ``.txt`` files and corresponding case report ``.out``
333333
* - Superhot Rock (SHR) Example 2
334334
- `example_SHR-2.txt <tests/examples/example_SHR-2.txt>`__
335335
- `example_SHR-2.out <tests/examples/example_SHR-2.out>`__
336+
* - SBT High Temperature
337+
- `example_SBT_Hi_T.txt <tests/examples/example_SBT_Hi_T.txt>`__
338+
- `example_SBT_Hi_T.out <tests/examples/example_SBT_Hi_T.out>`__
339+
* - SBT Low Temperature
340+
- `example_SBT_Lo_T.txt <tests/examples/example_SBT_Lo_T.txt>`__
341+
- `example_SBT_Lo_T.out <tests/examples/example_SBT_Lo_T.out>`__
336342

337343

338344
An interactive table of examples is available at `gtp.scientificwebservices.com/geophires <https://gtp.scientificwebservices.com/geophires>`__, under the Examples tab.

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
year = '2024'
1919
author = 'NREL'
2020
copyright = f'{year}, {author}'
21-
version = release = '3.5.2'
21+
version = release = '3.5.3'
2222

2323
pygments_style = 'trac'
2424
templates_path = ['./templates']

docs/reference/geophires_x.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ geophires_x
2323
.. automodule:: geophires_x.CylindricalReservoir
2424
:members:
2525

26+
.. automodule:: geophires_x.SBTReservoir
27+
:members:
28+
2629
.. automodule:: geophires_x.SUTRAReservoir
2730
:members:
2831

@@ -33,6 +36,9 @@ geophires_x
3336
.. automodule:: geophires_x.AGSWellBores
3437
:members:
3538

39+
.. automodule:: geophires_x.SBTWellBores
40+
:members:
41+
3642
.. automodule:: geophires_x.SUTRAWellBores
3743
:members:
3844

@@ -52,6 +58,9 @@ geophires_x
5258
.. automodule:: geophires_x.AGSEconomics
5359
:members:
5460

61+
.. automodule:: geophires_x.SBTEconomics
62+
:members:
63+
5564
.. automodule:: geophires_x.SUTRAEconomics
5665
:members:
5766

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def read(*names, **kwargs):
1313

1414
setup(
1515
name='geophires-x',
16-
version='3.5.2',
16+
version='3.5.3',
1717
license='MIT',
1818
description='GEOPHIRES is a free and open-source geothermal techno-economic simulator.',
1919
long_description='{}\n{}'.format(

src/geophires_x/Units.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,7 @@ class PressureUnit(str, Enum):
220220
PASCAL = "Pa"
221221
BAR = "bar"
222222
KBAR = "kbar"
223+
PSI = "psi"
223224

224225

225226
class AvailabilityUnit(str, Enum):

src/geophires_x/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '3.5.2'
1+
__version__ = '3.5.3'

src/geophires_x_client/geophires_x_result.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,9 @@ class GeophiresXResult:
193193
'Drilling and completion costs per well',
194194
'Drilling and completion costs per production well',
195195
'Drilling and completion costs per injection well',
196+
'Drilling and completion costs per vertical production well',
197+
'Drilling and completion costs per vertical injection well',
198+
'Drilling and completion costs per non - vertical sections',
196199
'Stimulation costs',
197200
'Surface power plant costs',
198201
'of which Absorption Chiller Cost',

tests/test_geophires_x.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -473,3 +473,15 @@ def test_project_red_larger_fractures(self):
473473

474474
self.assertEqual(result.result['RESERVOIR PARAMETERS']['Fracture width']['value'], 320.0)
475475
self.assertEqual(result.result['RESERVOIR PARAMETERS']['Fracture width']['unit'], 'meter')
476+
477+
def test_convert_output_psi_to_kpa(self):
478+
GeophiresXClient().get_geophires_result(
479+
GeophiresInputParameters(
480+
from_file_path=self._get_test_file_path(Path('examples/example_SHR-2.txt')),
481+
params={
482+
'Production Wellhead Pressure': '64.69 psi',
483+
},
484+
)
485+
)
486+
487+
# TODO validate output values (for now we are just testing an exception isn't thrown)

0 commit comments

Comments
 (0)