Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature 250 test event equalize #252

Merged
merged 7 commits into from Jan 12, 2023
14 changes: 7 additions & 7 deletions docs/Users_Guide/release-notes.rst
Expand Up @@ -49,21 +49,21 @@ METcalcpy Version 2.0.0 release notes (20221207)

* **Create checksum for released code** (`#209 <https://github.com/dtcenter/METcalcpy/issues/209>`_)

* **Add modulefiles used for installation on various machines (`#204 <https://github.com/dtcenter/METcalcpy/issues/204>`_)
* **Add modulefiles used for installation on various machines** (`#204 <https://github.com/dtcenter/METcalcpy/issues/204>`_)

* **Identify minimal "bare-bones" Python packages to inform operational installation (`#152 <https://github.com/dtcenter/METcalcpy/issues/152>`_)
* **Identify minimal "bare-bones" Python packages to inform operational installation** (`#152 <https://github.com/dtcenter/METcalcpy/issues/152>`_)

* **Convert scorecard.R_tmp to Python (`#179 <https://github.com/dtcenter/METcalcpy/issues/179>`_)
* **Convert scorecard.R_tmp to Python** (`#179 <https://github.com/dtcenter/METcalcpy/issues/179>`_)

* Bugfixes:

* **Vertical Interpolation DimensionalityError in migrating from Python 3.7.10 to Python 3.8.6 (`#180 <https://github.com/dtcenter/METcalcpy/issues/180>`_)
* **Vertical Interpolation DimensionalityError in migrating from Python 3.7.10 to Python 3.8.6** (`#180 <https://github.com/dtcenter/METcalcpy/issues/180>`_)

* **Address Github Dependabot Issues (`#193 <https://github.com/dtcenter/METcalcpy/issues/193>`_)
* **Address Github Dependabot Issues** (`#193 <https://github.com/dtcenter/METcalcpy/issues/193>`_)

* **Deprecation and other warnings in event_equalize.py and other modules (`#153 <https://github.com/dtcenter/METcalcpy/issues/153>`_)
* **Deprecation and other warnings in event_equalize.py and other modules** (`#153 <https://github.com/dtcenter/METcalcpy/issues/153>`_)

* **Some METcalcpy tests fail with Python 3.8 and upgraded packages (`#154 <https://github.com/dtcenter/METcalcpy/issues/154>`_)
* **Some METcalcpy tests fail with Python 3.8 and upgraded packages** (`#154 <https://github.com/dtcenter/METcalcpy/issues/154>`_)

METcalcpy Upgrade Instructions
==============================
Expand Down
8 changes: 3 additions & 5 deletions test/test_event_equalize.py
Expand Up @@ -178,16 +178,14 @@ def settings_no_fcst_var_vals():
# settings_dict['fcst_var_val_2'] = {}
settings_dict['fix_vals_permuted'] = {}
settings_dict['series_val_1'] = {}
settings_dict['indy_var'] = {}
settings_dict['indy_var'] = ''
settings_dict['line_type'] = None

return settings_dict

def test_equalize_axis_data_no_fcst_var(settings_no_fcst_var_vals):
'''
conditions that lead to an empty data frame from event equalization should
return an empty data frame instead of an error due to trying to clean up the 'equalize' column before
returning the event equalization data frame.
Event equalization returns a data frame with no removed rows.
'''

print("Testing equalize_axis_data with ROC CTC threshold data...")
Expand All @@ -198,7 +196,7 @@ def test_equalize_axis_data_no_fcst_var(settings_no_fcst_var_vals):
fix_vals_permuted_list = []

ee_df = equalize_axis_data(fix_vals_keys, fix_vals_permuted_list, settings_no_fcst_var_vals, cur_df, axis='1')
assert ee_df.shape[0] == 0
assert ee_df.shape[0] == cur_df.shape[0]


if __name__ == "__main__":
Expand Down
7 changes: 3 additions & 4 deletions test/test_lon_360_to_180.py
Expand Up @@ -13,10 +13,9 @@ def test_lon_from_360_to_180():
np_west_east = utils.convert_lon_360_to_180(np_lon)


assert isinstance(i_west_east[0], np.int64)
assert isinstance(np_west_east[0], np.float)


if ( isinstance(i_west_east[0], int) or isinstance(i_west_east[0], np.int64) or isinstance(i_west_east[0], np.int32) ) and (isinstance(np_west_east[0], np.float64) or not isinstance(np_west_east[0], float)):
assert True

# Verify that some values were correctly converted
# and that the ordering in the array is from negative to positive
assert np_west_east[0] == -180.0
Expand Down