Skip to content

Commit

Permalink
Merge pull request #270 from softwareengineerprogrammer/main
Browse files Browse the repository at this point in the history
Implement GeophiresInputEnum.__ne__
  • Loading branch information
softwareengineerprogrammer authored Jul 26, 2024
2 parents 052c23d + 76c51f4 commit 95e2122
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 9 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.1
current_version = 3.5.2
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.1
version: 3.5.2
version_manager: "bump2version"
website: "https://github.com/NREL"
year_from: "2023"
Expand Down
4 changes: 2 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.1.svg
.. |commits-since| image:: https://img.shields.io/github/commits-since/softwareengineerprogrammer/GEOPHIRES-X/v3.5.2.svg
:alt: Commits since latest release
:target: https://github.com/softwareengineerprogrammer/GEOPHIRES-X/compare/v3.5.1...main
:target: https://github.com/softwareengineerprogrammer/GEOPHIRES-X/compare/v3.5.2...main

.. |docs| image:: https://readthedocs.org/projects/GEOPHIRES-X/badge/?style=flat
:target: https://nrel.github.io/GEOPHIRES-X
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.1'
version = release = '3.5.2'

pygments_style = 'trac'
templates_path = ['./templates']
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.1',
version='3.5.2',
license='MIT',
description='GEOPHIRES is a free and open-source geothermal techno-economic simulator.',
long_description='{}\n{}'.format(
Expand Down
3 changes: 3 additions & 0 deletions src/geophires_x/OptionList.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ def __init__(self, int_value: int, _: str):
def __eq__(self, other):
return str(self) == str(other)

def __ne__(self, other):
return str(self) != str(other)


class EndUseOptions(GeophiresInputEnum):
ELECTRICITY = 1, "Electricity"
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.1'
__version__ = '3.5.2'
9 changes: 7 additions & 2 deletions tests/geophires_x_tests/test_options_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,15 @@ def test_cast_from_name_string(self):
def test_equality(self):
self.assertFalse(EndUseOptions.HEAT == EndUseOptions.ELECTRICITY)
self.assertTrue(EndUseOptions.HEAT == EndUseOptions.HEAT)
self.assertTrue(EndUseOptions.HEAT != EndUseOptions.ELECTRICITY)
self.assertTrue(EndUseOptions.ELECTRICITY != EndUseOptions.HEAT)
self.assertFalse(EndUseOptions.HEAT is None)
self.assertTrue(EndUseOptions.HEAT is EndUseOptions.HEAT)
# self.assertTrue(EndUseOptions.HEAT == 'HEAT')
# self.assertFalse(EndUseOptions.HEAT == 'Electricity')
self.assertFalse(EndUseOptions.HEAT is EndUseOptions.ELECTRICITY)
self.assertTrue(EndUseOptions.HEAT is not EndUseOptions.ELECTRICITY)

self.assertEqual(str(EndUseOptions.HEAT), 'EndUseOptions.HEAT')
self.assertEqual(str(EndUseOptions.ELECTRICITY), 'EndUseOptions.ELECTRICITY')


class WellDrillingCostCorrelationTestCase(BaseTestCase):
Expand Down

0 comments on commit 95e2122

Please sign in to comment.