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

[python] Fix an ingestion corner case with empty chunks #2283

Merged
merged 1 commit into from Mar 15, 2024

Conversation

johnkerl
Copy link
Member

Issue and/or context: This is from a non-GitHub bug report.

Changes: Avoid division by zero on entirely empty chunks.

Notes for Reviewer: I tried to create synthetic data that would trigger the corner case, but failed to repro. Had I succeeded, I'd have created a new unit-test case on this PR. As is, I was only able to repro with some larger data I'm not willing to check in. Regardless, the change has been tested successfully against that dataset, and furthermore, it's a clear and solid code mod.

@johnkerl
Copy link
Member Author

[sc-42637]

Copy link

This pull request has been linked to Shortcut Story #42637: AnnData ingest ZeroDivisionError.

Copy link

codecov bot commented Mar 15, 2024

Codecov Report

Merging #2283 (dc8809c) into main (a016b9d) will increase coverage by 12.05%.
The diff coverage is 0.00%.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #2283       +/-   ##
===========================================
+ Coverage   78.89%   90.94%   +12.05%     
===========================================
  Files         139       36      -103     
  Lines       10718     3845     -6873     
  Branches      215        0      -215     
===========================================
- Hits         8456     3497     -4959     
+ Misses       2164      348     -1816     
+ Partials       98        0       -98     
Flag Coverage Δ
libtiledbsoma ?
python 90.94% <0.00%> (-0.05%) ⬇️
r ?

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

Components Coverage Δ
python_api 90.94% <0.00%> (-0.05%) ⬇️
libtiledbsoma ∅ <ø> (∅)

@johnkerl johnkerl changed the title [python] Fix an ingestion corner-case with empty chunks [python] Fix an ingestion corner case with empty chunks Mar 15, 2024
@johnkerl johnkerl merged commit 0b99e03 into main Mar 15, 2024
12 checks passed
@johnkerl johnkerl deleted the kerl/the-chunk-is-empty branch March 15, 2024 21:13
johnkerl added a commit that referenced this pull request Mar 15, 2024
Co-authored-by: John Kerl <kerl.john.r@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants