-
Notifications
You must be signed in to change notification settings - Fork 72
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
Add default consolidated flag for to_zarr #855
Conversation
@b-reyes this is ready for review... I hope I covered all of the |
Codecov Report
@@ Coverage Diff @@
## dev #855 +/- ##
===========================================
- Coverage 78.54% 64.37% -14.17%
===========================================
Files 53 54 +1
Lines 5112 5125 +13
===========================================
- Hits 4015 3299 -716
- Misses 1097 1826 +729
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
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.
@lsetiawan I am done reviewing this PR. From what I can see, It looks like you hit all of the to_zarr
statements. There are a couple of places where consolidated
should be removed because the consolidation has already occurred.
With these changes, have you tried to run a large number of files in combine_echodata
? If not, can you please do that to make sure nothing has changed?
One thing that I noticed is that in functions such as to_zarr
in echodata.py
you provide docstrings for kwargs
. This seems confusing to me. Is there a numpy doc way of specifying docstring parameters that are specifically for kwargs
?
I think this was from the implicity of |
Yeah, I think that is best. If you think this is best too, could you create an issue for it and we can deal with it after this release? |
I won't have time to fully test this 🙈 Maybe just push this off to the next release since it's not an urgent issue. |
@lsetiawan @b-reyes : following up on this -- could you connect and make sure the remaining issues get resolved in this week? I think it would be good to add the required docstrings in this PR to not overcrowd the issue list. |
@b-reyes This PR is ready for another review. I've put in some tests in there to ensure that everything is consolidating properly. One of the biggest changes is that for your combine function, I put the consolidation at the very end so no metadata is missed, and default all the various private function calls to |
@lsetiawan I am done reviewing this. I had a minor comment on the |
Co-authored-by: b-reyes <53541061+b-reyes@users.noreply.github.com>
for more information, see https://pre-commit.ci
@b-reyes Okay. I've implemented your suggestions. Let me know if I miss anything. Thanks! |
@lsetiawan I am done reviewing. I only have minor remarks in regards to documentation/commenting. |
Co-authored-by: b-reyes <53541061+b-reyes@users.noreply.github.com>
@b-reyes I've added more changes based on your comments. Ignore the RTD failure, for some reason it can't check out the changes... bizarre... All the other tests succeed. |
@lsetiawan thank you very much for making those changes. All of my concerns have been addressed. Please go ahead and merge these changes in. I am slightly worried about the RTD failure, but I believe we can resolve that after a merge, if necessary. |
The RTD failure had nothing to do with this PR, no stress 😄 See it all works: https://readthedocs.org/projects/echopype/builds/18907478/ |
Great! |
* Add default consolidated flag for to_zarr * Add docstring for kwargs * Expand the arguments for to_netcdf and to_zarr * Add test for to_zarr with mock echodata * Modify combine to consolidate at the end * Add zarr combine consolidated test * Remove output_path for mock echodata. * Add NMEA and dynamic expected_groups * Update echopype/tests/echodata/test_echodata.py Co-authored-by: b-reyes <53541061+b-reyes@users.noreply.github.com> * Add explicit False for delayed write_to_file * Duplicate ek60_test_data fixtures for future usage * Add check_consolidated func and refactor * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update echopype/echodata/zarr_combine.py Co-authored-by: b-reyes <53541061+b-reyes@users.noreply.github.com> * Add small docstring for check_consolidated Co-authored-by: b-reyes <53541061+b-reyes@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Overview
This PR adds a default of
consolidated=True
forto_zarr
but also allows user to modify it, per conversation from #233.