-
Notifications
You must be signed in to change notification settings - Fork 77
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
Bring more consistency in the Platform group across sensors on conversion #1058
Conversation
…atform sentence_type
…fixed or added missing long_name for two variables
…ted; added long_name to sentence_type
…riables, filled with nan, following dimensionality as found in EK80; cosmetic changes for clarity and consistency
Codecov Report
@@ Coverage Diff @@
## dev #1058 +/- ##
==========================================
- Coverage 78.19% 77.93% -0.27%
==========================================
Files 67 18 -49
Lines 6192 2918 -3274
==========================================
- Hits 4842 2274 -2568
+ Misses 1350 644 -706
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 51 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Alright, the tests are passing now! The only failure was with AZFP. |
Co-authored-by: Wu-Jung Lee <[email protected]>
Additional changes I'll add to this PR:
|
…ariables; set param_* global attributes to empty string (removed use of ui_param); and cosmetic tweaks
…t, driven by water_level (to adhere to convention where it's a scalar); set Platform platform_* global attrs to empty string
… as a variable at the start for clarity
…to common-platform-vars
Done. Removed
Done. |
I suspect some tests will now fail, but we'll see. I again ran into errors building the local test environment, so I couldn't run the test suite locally. This PR will be ready for a final review once I see what CI tests fail, and fix the tests. |
…lso that drop_keel_offset valid values are now handled correctly after replacing hasattr with dict .get in ek80 Platform set_group
Only ek80 convert tests were failing. I've fixed them by addressing two changes:
|
Woo-hoo, all tests are passing! This PR is ready for a final review, and hopefully merging soon after. |
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.
@emiliom : thanks for the changes! Everything looks fine. I just have a question about the test in test_convert_ek80, since the dimension do not match what we intended for the data variables, and the assert does not check the actual values. I know that this is an inherited test, but to avoid confusion later, I think we should fix it. (Or clarify what's going on if I am reading the code wrong -- I have been really slow this morning.)
NOTE: The build CI failed. Looking into it, I realized that I forgot that the PR CI by default runs in the selective mode so that only "convert" tests were run; plus b/c I was having problems with running tests locally, I never ran the full suite. So, there are apparently more fixes to make resulting from the changes in this PR. From https://github.com/OSOceanAcoustics/echopype/actions/runs/5226125815/jobs/9436435332, the failures are in:
|
Ah that's too bad! Hopefully these are easy to fix. |
After a quick look, two out of three seem easy. The 3rd one, I'm not sure yet. |
… [all tests ci] (#1061) * Fix processing level L1A test to account for AZFP open_raw now creating empty lat & lon variables * Remove obsolete environmental parameters tests * Fix test_plot tests and visualize api involving water_level > vertical_offset and the removal of channel dim from ek60 platform vars * Cosmetic change simply to trigger all ci tests * Remove remnant test case for ek60 vertical_offset channel dim; correct data-type typing hint
…sion (OSOceanAcoustics#1058) * Update convention yaml with corrected long_name entries and adding platform sentence_type * EK80 Platform updates: cosmetic changes for clarity and consistency; fixed or added missing long_name for two variables * EK60 Platform updates: ensured platform_* global attributes are inserted; added long_name to sentence_type * AZFP Platform updates: added three coordinates; added many missing variables, filled with nan, following dimensionality as found in EK80; cosmetic changes for clarity and consistency * Remove from AZFP Platform test check the variables that are no longer scalar * When azfp tilt_x and tilt_y are all nan, create single-valued arrays * Update echopype/convert/set_groups_azfp.py Co-authored-by: Wu-Jung Lee <[email protected]> * For EK60 Platform, removed incorrect channel dimension from several variables; set param_* global attributes to empty string (removed use of ui_param); and cosmetic tweaks * Removed time3 from Platform and removed it from all variables using it, driven by water_level (to adhere to convention where it's a scalar); set Platform platform_* global attrs to empty string * In AZFP Platform group, change tilt units to arc_degree and set time1 as a variable at the start for clarity * Update ek80 convert tests to reflect removal of Platform time3; and also that drop_keel_offset valid values are now handled correctly after replacing hasattr with dict .get in ek80 Platform set_group * Update echopype/tests/convert/test_convert_ek80.py --------- Co-authored-by: Wu-Jung Lee <[email protected]>
…ceanAcoustics#1058 [all tests ci] (OSOceanAcoustics#1061) * Fix processing level L1A test to account for AZFP open_raw now creating empty lat & lon variables * Remove obsolete environmental parameters tests * Fix test_plot tests and visualize api involving water_level > vertical_offset and the removal of channel dim from ek60 platform vars * Cosmetic change simply to trigger all ci tests * Remove remnant test case for ek60 vertical_offset channel dim; correct data-type typing hint
I went through the behavior of each sensor type (EK60, EK80, AZFP) during conversion (
open_raw
) for thePlatform
group. There were a number of inconsistencies, some of which have been mentioned before in #740 and #1003. This PR also broadly addresses #1051, or creates a more consistent starting point forupdate_platform
.I've addressed most of the inconsistencies:
sentence_type
, a non-convention variable found in EK60 and EK80; andtilt_x
andtilt_y
, non-convention variables only used with AZFP.long_name
attributes, either through edits toconvention/1.0.yml
or via code changes.platform_*
attributes were being dropped after initial inclusion.I also made some cosmetic edits to all three sensor types to use similar code patterns and order of variables and coordinates, to improve clarity and consistency across sensors.
I ran manual tests but didn't run the test suite locally. If the CI exposes some new errors resulting from these changes, I'll update the PR.
Some open areas for improvement (but possibly not for 0.7.2):
set_group_*
modules.channel
dimension to a number of variables for which EK80 doesn't, and EK80 adheres more closely to the convention with respect to variable dimensionality. I think the presence of the extra channel dimension is a mistake, but wanted to first double check with @leewujung before removing that dimension.water_level
is a scalar and does not have a time dimension; time variability is found invertical_offset
instead, which in a ship corresponds to heave. But we've been assigning atime3
dimension towater_level
.