Skip to content

Commit

Permalink
Re-enable Beckers et all tests now that interpolation errors are ignored
Browse files Browse the repository at this point in the history
  • Loading branch information
softwareengineerprogrammer committed Oct 4, 2023
1 parent bc72ec0 commit 9e29bd3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
4 changes: 3 additions & 1 deletion src/geophires_x/AGSOutputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ def PrintOutputs(self, model: Model):
if model.wellbores.IsAGS: # do a classical output display
import scipy
# Need to do some interpolating to get the arrays to be the right size for output
# FIXME WIP (errstate may or may not be appropriate)

# FIXME TODO - determine if ignore errstate is appropriate here. Without ignore, GitHub Actions unit
# tests fail in a way that appears to be specific to their runners (processor architecture, maybe)
with np.errstate(all='ignore'):
if len(model.wellbores.PumpingPower.value) != len(model.wellbores.ProducedTemperature.value):
f = scipy.interpolate.interp1d(np.arange(0, len(model.wellbores.PumpingPower.value)),
Expand Down
14 changes: 1 addition & 13 deletions tests/test_geophires_x.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,19 +211,7 @@ def get_output_file_for_example(example_file: str):
return self._get_test_file_path(Path('examples', f'{example_file.split(".txt")[0]}V3_output.txt'))

for example_file_path in example_files:
if (
(example_file_path.startswith(('example', 'Beckers_et_al')))
# FIXME temporarily disabled unit tests (debugging GitHub Actions WIP)
and not example_file_path.startswith(
(
# 'Beckers_et_al_2023_Tabulated_Database_Uloop_sCO2_heat',
'Beckers_et_al_2023_Tabulated_Database_Coaxial_water_heat',
'Beckers_et_al_2023_Tabulated_Database_Coaxial_sCO2_heat',
'Beckers_et_al_2023_Tabulated_Database_Uloop_water_heat',
)
)
and '_output' not in example_file_path
):
if (example_file_path.startswith(('example', 'Beckers_et_al'))) and '_output' not in example_file_path:
with self.subTest(msg=example_file_path):
print(f'Running example test {example_file_path}')
input_params = GeophiresInputParameters(from_file_path=self._get_test_file_path(Path('examples', example_file_path)))
Expand Down

0 comments on commit 9e29bd3

Please sign in to comment.