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

Additional test and related fixes stemming from Platform group PR #1058 [all tests ci] #1061

Merged
merged 5 commits into from
Jun 11, 2023

Conversation

emiliom
Copy link
Collaborator

@emiliom emiliom commented Jun 11, 2023

Adapting what I wrote in #1058 (comment). The previously missed test failures were:

  • tests/calibrate/test_calibrate.py::test_env_params: I removed the test. It was testing the obsolete EnvParam class in calibrate/env_params_old.py, which was replaced, though not 1:1, by env_params.py::ENVPARAM and a new accompanying test. Per @leewujung : env_params.py does not have the interpolation capability but it is more complete in terms of being able to take user input dictionary to compute_Sv. @leewujung will follow up with a PR to remove env_params_old.py
  • tests/utils/test_processinglevels_integration.py::test_raw_to_mvbs[AZFP-AZFP-raw_and_xml_paths1-extras1]: Upgraded it to account for the case (especially with AZFP) where Platform latitude and longitude variables are present but are all nan. That was not the case for AZFP prior to PR Bring more consistency in the Platform group across sensors on conversion #1058
  • tests/visualize/test_plot.py::test_water_level_echodata[True-False]: Made substantial changes to the test and to visualize/api.py module to change the use of water_level to vertical_offset (and similar references to water level), and to remove in the test the handling of the former, inappropriate channel dimension in ek60 water_level and vertical_offset. Made a few minor, additional improvements along the way, such as for type hints.

Note: I successfully ran the complete test suite locally except I temporarily removed the "netcdf4" export engine option from test_convert_source_target_locs.py::export_engine, to sidestep the new, unexpected (and unrelated) problem with the Vendor_specific group and netcdf4 files. On the first run of the CI, all tests ran successfully and the netcdf4 segmentation fault did not take place. Hmm.

@emiliom emiliom added the data format Anything about data format label Jun 11, 2023
@emiliom emiliom added this to the 0.7.2 milestone Jun 11, 2023
@codecov-commenter
Copy link

codecov-commenter commented Jun 11, 2023

Codecov Report

Merging #1061 (a9215a9) into dev (7a49cc7) will decrease coverage by 0.58%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##              dev    #1061      +/-   ##
==========================================
- Coverage   78.19%   77.62%   -0.58%     
==========================================
  Files          67       67              
  Lines        6192     6202      +10     
==========================================
- Hits         4842     4814      -28     
- Misses       1350     1388      +38     
Flag Coverage Δ
unittests 77.62% <100.00%> (-0.58%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
echopype/convert/set_groups_azfp.py 97.61% <100.00%> (+0.15%) ⬆️
echopype/convert/set_groups_ek60.py 92.74% <100.00%> (+0.17%) ⬆️
echopype/convert/set_groups_ek80.py 97.04% <100.00%> (+0.02%) ⬆️

... and 2 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@emiliom emiliom changed the title Additional test and related fixes stemming from Platform group PR #1058 Additional test and related fixes stemming from Platform group PR #1058 [all tests ci] Jun 11, 2023
@emiliom emiliom requested a review from leewujung June 11, 2023 17:28
Copy link
Member

@leewujung leewujung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@emiliom : thanks, the changes look good. I am still puzzled by the segmentation problem, but it can be investigated later as long as we don't normally run into that problem. It is also weird to me that I ran into that in the Sonar/Beam_group1 rather than the Vendor_specific group like you had.

For the sake of clarity, could you add the definition of water_level and vertical_offset with a simple diagram of which one means which for an underwater vehicle and a ship? This should actually be in the docs, but if we have something parked here it'll be easy to plug them in afterwards.

Other than that, please feel free to merge!

@emiliom
Copy link
Collaborator Author

emiliom commented Jun 11, 2023

Great, thanks! Merging.

I created a new issue, #1062, about the documentation to be added (great idea, BTW).

@emiliom emiliom merged commit 2a08ad3 into OSOceanAcoustics:dev Jun 11, 2023
@emiliom emiliom deleted the platform-vars-fixes branch June 11, 2023 22:42
@leewujung leewujung modified the milestones: 0.7.2, 0.8.0 Jul 15, 2023
@emiliom
Copy link
Collaborator Author

emiliom commented Jul 20, 2023

This PR is related to #1051

lsetiawan pushed a commit to lsetiawan/echopype that referenced this pull request Jul 28, 2023
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data format Anything about data format
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants