Skip to content

Commit a07202c

Browse files
Merge pull request NREL#402 from softwareengineerprogrammer/main
Parameterize contingency [v3.9.35]
2 parents 40df32f + 67bd265 commit a07202c

File tree

11 files changed

+227
-75
lines changed

11 files changed

+227
-75
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.9.34
2+
current_version = 3.9.35
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.9.34
57+
version: 3.9.35
5858
version_manager: "bump2version"
5959
website: "https://github.com/NREL"
6060
year_from: "2023"

CHANGELOG.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Changelog
33
=========
44

5-
GEOPHIRES-X (2023-2025)
5+
GEOPHIRES v3 (2023-2025)
66
------------------------
77

88
3.9
@@ -108,8 +108,8 @@ Bug fixes
108108
Internal changes to support unit testing
109109

110110

111-
3.0
112-
^^^
111+
3.0: GEOPHIRES-X
112+
^^^^^^^^^^^^^^^^
113113
`release <https://github.com/NREL/GEOPHIRES-X/releases/tag/v3.0.0>`__
114114

115115
- New repository: https://github.com/NREL/GEOPHIRES-X (Originally https://github.com/NREL/python-geophires-x, renamed to GEOPHIRES-X 2023-12-15 per https://github.com/NREL/GEOPHIRES-X/issues/48.)

README.rst

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

61-
.. |commits-since| image:: https://img.shields.io/github/commits-since/softwareengineerprogrammer/GEOPHIRES-X/v3.9.34.svg
61+
.. |commits-since| image:: https://img.shields.io/github/commits-since/softwareengineerprogrammer/GEOPHIRES-X/v3.9.35.svg
6262
:alt: Commits since latest release
63-
:target: https://github.com/softwareengineerprogrammer/GEOPHIRES-X/compare/v3.9.34...main
63+
:target: https://github.com/softwareengineerprogrammer/GEOPHIRES-X/compare/v3.9.35...main
6464

6565
.. |docs| image:: https://readthedocs.org/projects/GEOPHIRES-X/badge/?style=flat
6666
:target: https://nrel.github.io/GEOPHIRES-X

docs/conf.py

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

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

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.9.34',
16+
version='3.9.35',
1717
license='MIT',
1818
description='GEOPHIRES is a free and open-source geothermal techno-economic simulator.',
1919
long_description='{}\n{}'.format(

src/geophires_x/Economics.py

Lines changed: 97 additions & 63 deletions
Large diffs are not rendered by default.

src/geophires_x/__init__.py

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

src/geophires_x_schema_generator/geophires-request.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1387,7 +1387,7 @@
13871387
]
13881388
},
13891389
"Reservoir Stimulation Capital Cost": {
1390-
"description": "Total reservoir stimulation capital cost, including contingency and indirect costs.",
1390+
"description": "Total reservoir stimulation capital cost, including indirect costs and contingency.",
13911391
"type": "number",
13921392
"units": "MUSD",
13931393
"category": "Economics",
@@ -1719,6 +1719,15 @@
17191719
"minimum": 0.0,
17201720
"maximum": 1.0
17211721
},
1722+
"Contingency Percentage": {
1723+
"description": "The contingency percentage applied to the direct capital costs for stimulation, field gathering system, exploration, and surface plant. (Note: well drilling and completion costs do not have contingency applied and are not affected by this parameter.)",
1724+
"type": "number",
1725+
"units": "%",
1726+
"category": "Economics",
1727+
"default": 15.0,
1728+
"minimum": 0.0,
1729+
"maximum": 100.0
1730+
},
17221731
"Well Drilling Cost Correlation": {
17231732
"description": "Select the built-in well drilling and completion cost correlation: 1: vertical small diameter, baseline; 2: deviated small diameter, baseline; 3: vertical large diameter, baseline; 4: deviated large diameter, baseline; 5: Simple (per-meter cost); 6: vertical small diameter, intermediate1; 7: vertical small diameter, intermediate2; 8: deviated small diameter, intermediate1; 9: deviated small diameter, intermediate2; 10: vertical large diameter, intermediate1; 11: vertical large diameter, intermediate2; 12: deviated large diameter, intermediate1; 13: deviated large diameter, intermediate2; 14: vertical open-hole, small diameter, ideal; 15: deviated liner, small diameter, ideal; 16: vertical open-hole, large diameter, ideal; 17: deviated liner, large diameter, ideal. Baseline correlations (1-4) are from NREL's 2025 cost curve update. Intermediate and ideal correlations (6-17) are from GeoVision.",
17241733
"type": "integer",

tests/base_test_case.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,11 @@ def assertAlmostEqualWithinPercentage(self, expected, actual, msg: str | None =
2727
raise ValueError(f'msg must be a string (you may have meant to pass percent={msg})')
2828

2929
if isinstance(expected, numbers.Real):
30-
self.assertAlmostEqual(expected, actual, msg=msg, delta=abs(percent / 100.0 * expected))
30+
try:
31+
self.assertAlmostEqual(expected, actual, msg=msg, delta=abs(percent / 100.0 * expected))
32+
except AssertionError as ae:
33+
difference_percent = abs(100.0 * (actual - expected) / expected)
34+
raise AssertionError(f'{actual} != {expected} within {percent}% ({difference_percent:.2f}%)') from ae
3135
else:
3236
if isinstance(expected, list) and isinstance(actual, list):
3337
suggest = f'self.assertListAlmostEqual({expected}, {actual}, msg={msg}, percent={percent})'

0 commit comments

Comments
 (0)