OSOceanAcoustics / echopype

Enabling interoperability and scalability in ocean sonar data analysis
https://echopype.readthedocs.io/
Apache License 2.0
96 stars 72 forks source link

Apply Mask Changes: Multichannel, Allow Depth, Simplify Fill Value #1230

Closed ctuguinay closed 6 months ago

ctuguinay commented 10 months ago

This PR is meant to address #1204 and #1224.

codecov-commenter commented 10 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 92.97%. Comparing base (7679b96) to head (0b67ea6). Report is 55 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1230 +/- ## ========================================== + Coverage 83.29% 92.97% +9.67% ========================================== Files 64 3 -61 Lines 5675 185 -5490 ========================================== - Hits 4727 172 -4555 + Misses 948 13 -935 ``` | [Flag](https://app.codecov.io/gh/OSOceanAcoustics/echopype/pull/1230/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=OSOceanAcoustics) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/OSOceanAcoustics/echopype/pull/1230/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=OSOceanAcoustics) | `92.97% <100.00%> (+9.67%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=OSOceanAcoustics#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

ctuguinay commented 6 months ago

Original Checklist

Remove np.ndarray from allowed type for fill_value

Further Changes

ctuguinay commented 6 months ago

Thanks for the review @leewujung!

Yeah, I agree with you on there being too many cases that this code tries to accommodate. I also agree with you on all suggestions you posed.

Just to get the cases in order, once we get to the post-broadcast post-logical-reduce stage (once we get to here https://github.com/ctuguinay/echopype/blob/e52e05f33a82d1700d24f5c58d072fe15d319136/echopype/mask/api.py#L335), I should pass only the following:

ctuguinay commented 6 months ago

@leewujung This PR should be ready to review again

ctuguinay commented 6 months ago

@leewujung I just committed your suggestions, and this should be ready to merge. Thank you for making the docstring more precise! I think I wrote that right after I got tests working so I was at the point of complete familiarity, and I didn't stop to think whether or not someone new could understand it. I will work on that 👍

leewujung commented 6 months ago

Thanks @ctuguinay , I'll merge this now! 🎉

leewujung commented 6 months ago

Oops, I just realized that you target main and not dev, and I used squash and merge. I may have to do hard reset and ask you to another PR...

leewujung commented 6 months ago

Looks like there's no compounding changes from other PRs that have been merged to dev, so this should be ok. We want to simplify our dev workflow anyway #1275 so this forces us to do it, ha.