xbatcher icon indicating copy to clipboard operation
xbatcher copied to clipboard

Allow partial batches

Open arbennett opened this issue 2 years ago • 6 comments

Description of proposed changes

This is a simple additional flag that allows for "partial" batches to be returned.

Fixes #123

arbennett avatar Mar 21 '23 22:03 arbennett

Codecov Report

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

Project coverage is 96.30%. Comparing base (43c9135) to head (8b28973). Report is 11 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #177      +/-   ##
==========================================
+ Coverage   96.25%   96.30%   +0.05%     
==========================================
  Files           6        6              
  Lines         347      352       +5     
  Branches       82       83       +1     
==========================================
+ Hits          334      339       +5     
  Misses          8        8              
  Partials        5        5              

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

codecov[bot] avatar Mar 21 '23 23:03 codecov[bot]

@arbennett sorry for the very slow response! This is great!

It would be good to include add a test for this functionality before merging. Please let me know if you'd want to add a test or I can push one if you don't have time.

maxrjones avatar Jul 31 '23 15:07 maxrjones

@maxrjones @arbennett I wondered if we have any updates on this PR. I recently used xbatcher in a tutorial delivered by Pangeo members in Europe. I added a warning note indicating xbatcher doesn't (yet) return partial batches and mentioned some workarounds (please see the note before the References section).

@weiji14 you've suggested posting this somewhere. I hope this is the correct place for starting the conversation and follow-up actions.

acocac avatar Jul 08 '24 12:07 acocac

@acocac - thanks for pinging me, I totally lost track of this. I just merged upstream changes into my branch.

@maxrjones - sorry I also missed your ping here, I'll see if I can add a test for this real quick.

arbennett avatar Jul 09 '24 21:07 arbennett

@maxrjones - okay test added! Sorry for the bad commit message, my backticks got the best of me 🤦

Anyhow, I think the test is implemented correctly, but the need to do the rounding is kinda ugly IMO. Let me know if you have an easy way to clean that up.

arbennett avatar Jul 09 '24 22:07 arbennett

Thanks @arbennett! Mind if I push to your branch to fix the pre-commit errors? I'll also take a look at the rounding logic today

maxrjones avatar Jul 10 '24 17:07 maxrjones