Skip to content

Commit cc06cf5

Browse files
Change numerical_input_value to semantically better int_value
1 parent 08638cf commit cc06cf5

File tree

5 files changed

+17
-17
lines changed

5 files changed

+17
-17
lines changed

src/geophires_x/Economics.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -994,7 +994,7 @@ def __init__(self, model: Model):
994994
UnitType=Units.NONE,
995995
ErrMessage="assume default well drilling cost correlation (10)",
996996
ToolTipText="Select the built-in well drilling and completion cost correlation: " +
997-
'; '.join([f'{it.numerical_input_value}: {it.value}' for it in WellDrillingCostCorrelation])
997+
'; '.join([f'{it.int_value}: {it.value}' for it in WellDrillingCostCorrelation])
998998
)
999999

10001000
self.DoAddOnCalculations = self.ParameterDict[self.DoAddOnCalculations.Name] = boolParameter(

src/geophires_x/GeoPHIRESUtils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -585,8 +585,8 @@ def get_entry(member) -> dict[str, Any]:
585585
'value': member.value
586586
}
587587

588-
if hasattr(member, 'numerical_input_value'):
589-
d['numerical_input_value'] = member.numerical_input_value
588+
if hasattr(member, 'int_value'):
589+
d['int_value'] = member.int_value
590590

591591
return d
592592

src/geophires_x/OptionList.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ def __new__(cls, *args, **kwds):
1717
obj._value_ = args[1]
1818
return obj
1919

20-
def __init__(self, numerical_input_value: int, _: str):
21-
self.numerical_input_value = numerical_input_value
20+
def __init__(self, int_value: int, _: str):
21+
self.int_value = int_value
2222

2323
def __eq__(self, other):
2424
return str(self) == str(other)
@@ -30,7 +30,7 @@ def get_end_use_option_from_input_string(input_string:str):
3030
"""
3131

3232
for option in EndUseOptions:
33-
if input_string == str(option.numerical_input_value):
33+
if input_string == str(option.int_value):
3434
return option
3535

3636
raise ValueError(f'Unknown End-Use Option input value: {input_string}')
@@ -104,8 +104,8 @@ def __new__(cls, *args, **kwds):
104104
obj._value_ = args[1]
105105
return obj
106106

107-
def __init__(self, numerical_input_value: int, _: str, c2: float, c1: float, c0: float):
108-
self.numerical_input_value = numerical_input_value
107+
def __init__(self, int_value: int, _: str, c2: float, c1: float, c0: float):
108+
self.int_value = int_value
109109
self._c2 = c2
110110
self._c1 = c1
111111
self._c0 = c0

src/geophires_x/SurfacePlant.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ def __init__(self, model: Model):
238238
UnitType=Units.NONE,
239239
ErrMessage="assume default end-use option (1: electricity only)",
240240
ToolTipText="Select the end-use application of the geofluid heat: " +
241-
'; '.join([f'{it.numerical_input_value}: {it.value}' for it in EndUseOptions])
241+
'; '.join([f'{it.int_value}: {it.value}' for it in EndUseOptions])
242242
)
243243
self.plant_type = self.ParameterDict[self.plant_type.Name] = intParameter(
244244
"Power Plant Type",

src/geophires_x_schema_generator/geophires-request.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -703,42 +703,42 @@
703703
{
704704
"name": "ELECTRICITY",
705705
"value": "Electricity",
706-
"numerical_input_value": 1
706+
"int_value": 1
707707
},
708708
{
709709
"name": "HEAT",
710710
"value": "Direct-Use Heat",
711-
"numerical_input_value": 2
711+
"int_value": 2
712712
},
713713
{
714714
"name": "COGENERATION_TOPPING_EXTRA_HEAT",
715715
"value": "Cogeneration Topping Cycle, Heat sales considered as extra income",
716-
"numerical_input_value": 31
716+
"int_value": 31
717717
},
718718
{
719719
"name": "COGENERATION_TOPPING_EXTRA_ELECTRICITY",
720720
"value": "Cogeneration Topping Cycle, Electricity sales considered as extra income",
721-
"numerical_input_value": 32
721+
"int_value": 32
722722
},
723723
{
724724
"name": "COGENERATION_BOTTOMING_EXTRA_HEAT",
725725
"value": "Cogeneration Bottoming Cycle, Heat sales considered as extra income",
726-
"numerical_input_value": 41
726+
"int_value": 41
727727
},
728728
{
729729
"name": "COGENERATION_BOTTOMING_EXTRA_ELECTRICITY",
730730
"value": "Cogeneration Bottoming Cycle, Electricity sales considered as extra income",
731-
"numerical_input_value": 42
731+
"int_value": 42
732732
},
733733
{
734734
"name": "COGENERATION_PARALLEL_EXTRA_HEAT",
735735
"value": "Cogeneration Parallel Cycle, Heat sales considered as extra income",
736-
"numerical_input_value": 51
736+
"int_value": 51
737737
},
738738
{
739739
"name": "COGENERATION_PARALLEL_EXTRA_ELECTRICITY",
740740
"value": "Cogeneration Parallel Cycle, Electricity sales considered as extra income",
741-
"numerical_input_value": 52
741+
"int_value": 52
742742
}
743743
]
744744
},

0 commit comments

Comments
 (0)