-
Notifications
You must be signed in to change notification settings - Fork 3
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
update stormevents
API to >=1.3.0
#79
Conversation
* use new `StormEvents` API * install wheel first * install PROJ * linting step * build PROJ * build PROJ * build PROJ * build PROJ * fix workflows * fix test files * skip test that hangs * fix original file test * change original track handling (write to file first and then read from threads) * update workflow names * we no longer need to write pickles to a temporary file if the track object already exists in memory * revert import change
…e_stormevents # Conflicts: # ensembleperturbation/perturbation/atcf.py # setup.cfg
Codecov Report
@@ Coverage Diff @@
## feature/regression_selection #79 +/- ##
===============================================================
Coverage ? 31.12%
===============================================================
Files ? 26
Lines ? 2940
Branches ? 0
===============================================================
Hits ? 915
Misses ? 2025
Partials ? 0 Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here are the major changes that are applied with the new stormevents
API, as well as the new build and testing workflow
@@ -0,0 +1,43 @@ | |||
name: 'Setup PROJ' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this fixes the GitHub Actions CI tests by setting up PROJ so that cartopy
can be built (and cached) correctly within the container
@@ -215,7 +215,7 @@ def plot_node_map( | |||
if storm is not None: | |||
if not isinstance(storm, VortexTrack): | |||
try: | |||
storm = VortexTrack.from_fort22(storm) | |||
storm = VortexTrack.from_file(storm) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
VortexTrack.from_fort22()
and VortexTrack.from_atcf_file()
were merged into VortexTrack.from_file()
@@ -32,7 +32,7 @@ install_requires = | |||
requests | |||
shapely | |||
scikit-learn | |||
stormevents == 1.2.5 | |||
stormevents >= 1.3.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is where pip install .
gets the dependencies from
AL, 06, 2018091100, , BEST, 0,256N, 618W, 115, 944, HU, 34, NEQ, 130, 130, 90, 130, 1010, 200, 10, 145, 0, L, 0, , 0, 0, FLORENCE ,1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the reference files for the tests are updated to include the additional ATCF fields that came from the original file
@@ -23,7 +24,7 @@ def test_monovariate_besttrack_ensemble(): | |||
output_directory.mkdir(parents=True, exist_ok=True) | |||
|
|||
perturber = VortexPerturber( | |||
storm='al062018', start_date='20180911', end_date=None, file_deck=ATCF_FileDeck.b, | |||
storm='al062018', start_date='20180911', end_date=None, file_deck='b', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this allows the file deck input to be a single letter, or alternatively the name (BEST
, OFCL
, etc.), along with the option to directly call the enum value
pandas.testing.assert_frame_equal(original_track_1.data[comparison_fields], original_data) | ||
pandas.testing.assert_frame_equal(original_track_2.data[comparison_fields], original_data) | ||
pandas.testing.assert_frame_equal(original_track_3.data[comparison_fields], original_data) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this test is now updated to use the output original.22
instead of relying on a reference file. This should test for regression of this bug more thoroughly
@zacharyburnettNOAA Can make sure the tests are all working as we upgrade the version, and we need to work out how to better treat the advisories (from the |
Ok, that's easily done by iterating over the But you are right, we need to add native handling of the record types. I added functionality for that in the |
use new method names and ATCF reading functionality from
stormevents
, and apply new improved CI workflow that fixes running tests