-
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
Set range entries with no backscatter data to NaN
in output of echodata.compute_range()
#547
Conversation
…to update_tests
for more information, see https://pre-commit.ci
Codecov Report
@@ Coverage Diff @@
## dev #547 +/- ##
==========================================
- Coverage 78.09% 78.07% -0.02%
==========================================
Files 40 10 -30
Lines 3428 447 -2981
==========================================
- Hits 2677 349 -2328
+ Misses 751 98 -653
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
@lsetiawan : In our current testing setup, since this PR only "touches" What's the best practice here? I think we were tripped a few times by this (i.e., additional fixes needed when merging Can we set up something that pulls out the downstream pieces that uses the changed functions and run the corresponding tests? If we do this, at what stage this should be run -- when it is merged to |
@lsetiawan : I merged your #523 and used the fixture structure for the test here. Also added an EK60 file ( |
for more information, see https://pre-commit.ci
The CI is now setup to run all tests when merged to dev as shown here: echopype/.github/workflows/ci.yaml Lines 91 to 94 in 0f699cc
So as a first step, as long as the isolated module test works you can merge to dev for a full test. Or you can always just use the |
And whenever you have a need for that mechanism but don't remember how to use it, go to the docs: https://echopype.readthedocs.io/en/stable/contributing.html#continuous-integration-github-actions |
Hmm, we should revisit this soon, in terms of how/what we want the tests to be set up. The past few times tests failed when merging to In theory we can get out of the current brittle setup once most big test data files are updated to a smaller size. I updated 2 major ones, but ran out of time to do the last couple files before I had to return a hardware dongle needed to generate data we test against -- the next time I can do this is likely late March - April. BUT regardless, it is unlikely we'll be able to reduce all files to be KB size like the new EK80 test files I collected, since we don't have access to many instrument variations that were used to collect the diverse test files. |
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.
LGTM! Thanks for this awesome work. I need to think about the whole testing scheme and see how we can improve it 😄 Would you mind, pasting all of the thoughts from here to an issue so we can discuss there? Thanks @leewujung
Just checked this. The tests failed the past few times on main due to the publish to PyPi action issues, which is more of a packaging issue rather than code. I think I need to figure out how to activate that within the dev branch also so it imitates main. In terms of full CI testing PR #411 fixed the missing testing since the test for all testing are actually run directly with pytest rather than the small script I created. |
Thanks for checking @lsetiawan , I must have confused that and the other earlier ones! Great that there was no unexpected behavior! And yes I'll paste the thoughts we've had here to a new issue. :) |
This PR sets entries in the
range
data variable in the output dataset fromcompute_Sv
that does not have corresponding backscatter entries (also set to NaN) to NaN. Some backscatter entries are NaN due to changes in echosounder settings, such as data collection range, transmit signal duration, etc.The change addresses the potential confusion #483.
Tasks
range
entries with no backscatter data toNaN
inechodata.compute_range()