Skip to content

Commit 95e2122

Browse files
Merge pull request NREL#270 from softwareengineerprogrammer/main
Implement GeophiresInputEnum.__ne__
2 parents 052c23d + 76c51f4 commit 95e2122

File tree

8 files changed

+17
-9
lines changed

8 files changed

+17
-9
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.1
2+
current_version = 3.5.2
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.1
57+
version: 3.5.2
5858
version_manager: "bump2version"
5959
website: "https://github.com/NREL"
6060
year_from: "2023"

README.rst

Lines changed: 2 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.1.svg
54+
.. |commits-since| image:: https://img.shields.io/github/commits-since/softwareengineerprogrammer/GEOPHIRES-X/v3.5.2.svg
5555
:alt: Commits since latest release
56-
:target: https://github.com/softwareengineerprogrammer/GEOPHIRES-X/compare/v3.5.1...main
56+
:target: https://github.com/softwareengineerprogrammer/GEOPHIRES-X/compare/v3.5.2...main
5757

5858
.. |docs| image:: https://readthedocs.org/projects/GEOPHIRES-X/badge/?style=flat
5959
: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 = '2024'
1919
author = 'NREL'
2020
copyright = f'{year}, {author}'
21-
version = release = '3.5.1'
21+
version = release = '3.5.2'
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.5.1',
16+
version='3.5.2',
1717
license='MIT',
1818
description='GEOPHIRES is a free and open-source geothermal techno-economic simulator.',
1919
long_description='{}\n{}'.format(

src/geophires_x/OptionList.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ def __init__(self, int_value: int, _: str):
2121
def __eq__(self, other):
2222
return str(self) == str(other)
2323

24+
def __ne__(self, other):
25+
return str(self) != str(other)
26+
2427

2528
class EndUseOptions(GeophiresInputEnum):
2629
ELECTRICITY = 1, "Electricity"

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.1'
1+
__version__ = '3.5.2'

tests/geophires_x_tests/test_options_list.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,15 @@ def test_cast_from_name_string(self):
2121
def test_equality(self):
2222
self.assertFalse(EndUseOptions.HEAT == EndUseOptions.ELECTRICITY)
2323
self.assertTrue(EndUseOptions.HEAT == EndUseOptions.HEAT)
24+
self.assertTrue(EndUseOptions.HEAT != EndUseOptions.ELECTRICITY)
25+
self.assertTrue(EndUseOptions.ELECTRICITY != EndUseOptions.HEAT)
2426
self.assertFalse(EndUseOptions.HEAT is None)
2527
self.assertTrue(EndUseOptions.HEAT is EndUseOptions.HEAT)
26-
# self.assertTrue(EndUseOptions.HEAT == 'HEAT')
27-
# self.assertFalse(EndUseOptions.HEAT == 'Electricity')
28+
self.assertFalse(EndUseOptions.HEAT is EndUseOptions.ELECTRICITY)
29+
self.assertTrue(EndUseOptions.HEAT is not EndUseOptions.ELECTRICITY)
30+
31+
self.assertEqual(str(EndUseOptions.HEAT), 'EndUseOptions.HEAT')
32+
self.assertEqual(str(EndUseOptions.ELECTRICITY), 'EndUseOptions.ELECTRICITY')
2833

2934

3035
class WellDrillingCostCorrelationTestCase(BaseTestCase):

0 commit comments

Comments
 (0)