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

Support unsafe casting in Delta filter #657

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

ehgus
Copy link
Contributor

@ehgus ehgus commented Nov 24, 2024

[Description of PR]

This is a fix of #653.
The change enable unsafe casting in Delta filter.
In addition, unit tests are added to catch such bug next.

TODO:

  • Unit tests and/or doctests in docstrings
  • Tests pass locally
  • Docstrings and API docs for any new/modified user-facing classes and functions
  • Changes documented in docs/release.rst
  • Docs build locally
  • GitHub Actions CI passes
  • Test coverage to 100% (Codecov passes)

Copy link

codecov bot commented Nov 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.92%. Comparing base (86f5ce4) to head (81a744d).
Report is 5 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #657   +/-   ##
=======================================
  Coverage   99.92%   99.92%           
=======================================
  Files          62       62           
  Lines        2721     2736   +15     
=======================================
+ Hits         2719     2734   +15     
  Misses          2        2           
Files with missing lines Coverage Δ
numcodecs/delta.py 100.00% <100.00%> (ø)
numcodecs/tests/test_delta.py 100.00% <100.00%> (ø)

Copy link
Member

@jakirkham jakirkham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Dohyeon! 🙏

Appreciate you looking into this issue

While this is certainly a way forward, think we need to look more carefully at the casting implications for different type combinations and make sure we are handling them sensibly

Should add there can remain overflow issues, which we need to be cognizant of and handle appropriately. Ideally by erroring as opposed to silently writing incorrect data

numcodecs/delta.py Show resolved Hide resolved
@ehgus ehgus force-pushed the unsafe-delta-filter branch from cd0b0f7 to 0780934 Compare November 26, 2024 05:48
@ehgus
Copy link
Contributor Author

ehgus commented Jan 8, 2025

@jakirkham As mentioned in #677, could you review the change? Thank you for your effort.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants