Skip to content

Commit

Permalink
Merge pull request #286 from softwareengineerprogrammer/main
Browse files Browse the repository at this point in the history
SBT docs, version bump
  • Loading branch information
softwareengineerprogrammer authored Sep 13, 2024
2 parents 3a52874 + b433a62 commit 1ac596c
Show file tree
Hide file tree
Showing 12 changed files with 62 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 3.5.2
current_version = 3.5.3
commit = True
tag = True

Expand Down
2 changes: 1 addition & 1 deletion .cookiecutterrc
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ default_context:
sphinx_doctest: "no"
sphinx_theme: "sphinx-py3doc-enhanced-theme"
test_matrix_separate_coverage: "no"
version: 3.5.2
version: 3.5.3
version_manager: "bump2version"
website: "https://github.com/NREL"
year_from: "2023"
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ GEOPHIRES-X (2023-2024)

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

3.5.3: SBT Reservoir Model (Slender Body Theory)

3.4
^^^

Expand Down
22 changes: 22 additions & 0 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,28 @@ Once a version bump is merged into the main repository with a Pull Request, tags
(venv) ➜ python-geophires-x git:(main) git push origin --tags
Documentation Updates
---------------------

If a change includes new classes with parameters that should be included in documentation,
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>`__.
Then run `geophires_x_schema_generator/main.py <https://github.com/NREL/GEOPHIRES-X/blob/main/src/geophires_x_schema_generator/main.py>`__
and commit the updated json schema files to source - `example <https://github.com/NREL/GEOPHIRES-X/pull/285/files#diff-3d85ef79807fc6c25a758a698fd3a7095750bd27ea52341700e1dad94885b5f6>`__.

``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.

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>`__

Schema Files
------------

GEOPHIRES & HIP-RA schema files generated by ``geophires_x_schema_generator`` are in an `OpenAPI Specification <https://swagger.io/docs/specification/about/>`__-compatible format.
These schema files can be used to build your own API or UI for GEOPHIRES.

* `geophires-request.json <https://github.com/NREL/GEOPHIRES-X/blob/main/src/geophires_x_schema_generator/geophires-request.json>`__
* `hip-ra-x-request.json <https://github.com/NREL/GEOPHIRES-X/blob/main/src/geophires_x_schema_generator/hip-ra-x-request.json>`__

Tips
----

Expand Down
10 changes: 8 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ Free software: `MIT license <LICENSE>`__
:alt: Supported implementations
:target: https://pypi.org/project/geophires-x

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

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


An interactive table of examples is available at `gtp.scientificwebservices.com/geophires <https://gtp.scientificwebservices.com/geophires>`__, under the Examples tab.
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
year = '2024'
author = 'NREL'
copyright = f'{year}, {author}'
version = release = '3.5.2'
version = release = '3.5.3'

pygments_style = 'trac'
templates_path = ['./templates']
Expand Down
9 changes: 9 additions & 0 deletions docs/reference/geophires_x.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ geophires_x
.. automodule:: geophires_x.CylindricalReservoir
:members:

.. automodule:: geophires_x.SBTReservoir
:members:

.. automodule:: geophires_x.SUTRAReservoir
:members:

Expand All @@ -33,6 +36,9 @@ geophires_x
.. automodule:: geophires_x.AGSWellBores
:members:

.. automodule:: geophires_x.SBTWellBores
:members:

.. automodule:: geophires_x.SUTRAWellBores
:members:

Expand All @@ -52,6 +58,9 @@ geophires_x
.. automodule:: geophires_x.AGSEconomics
:members:

.. automodule:: geophires_x.SBTEconomics
:members:

.. automodule:: geophires_x.SUTRAEconomics
:members:

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def read(*names, **kwargs):

setup(
name='geophires-x',
version='3.5.2',
version='3.5.3',
license='MIT',
description='GEOPHIRES is a free and open-source geothermal techno-economic simulator.',
long_description='{}\n{}'.format(
Expand Down
1 change: 1 addition & 0 deletions src/geophires_x/Units.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ class PressureUnit(str, Enum):
PASCAL = "Pa"
BAR = "bar"
KBAR = "kbar"
PSI = "psi"


class AvailabilityUnit(str, Enum):
Expand Down
2 changes: 1 addition & 1 deletion src/geophires_x/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '3.5.2'
__version__ = '3.5.3'
3 changes: 3 additions & 0 deletions src/geophires_x_client/geophires_x_result.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,9 @@ class GeophiresXResult:
'Drilling and completion costs per well',
'Drilling and completion costs per production well',
'Drilling and completion costs per injection well',
'Drilling and completion costs per vertical production well',
'Drilling and completion costs per vertical injection well',
'Drilling and completion costs per non - vertical sections',
'Stimulation costs',
'Surface power plant costs',
'of which Absorption Chiller Cost',
Expand Down
12 changes: 12 additions & 0 deletions tests/test_geophires_x.py
Original file line number Diff line number Diff line change
Expand Up @@ -473,3 +473,15 @@ def test_project_red_larger_fractures(self):

self.assertEqual(result.result['RESERVOIR PARAMETERS']['Fracture width']['value'], 320.0)
self.assertEqual(result.result['RESERVOIR PARAMETERS']['Fracture width']['unit'], 'meter')

def test_convert_output_psi_to_kpa(self):
GeophiresXClient().get_geophires_result(
GeophiresInputParameters(
from_file_path=self._get_test_file_path(Path('examples/example_SHR-2.txt')),
params={
'Production Wellhead Pressure': '64.69 psi',
},
)
)

# TODO validate output values (for now we are just testing an exception isn't thrown)

0 comments on commit 1ac596c

Please sign in to comment.