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

I/O and other small fixes #18

Merged
merged 4 commits into from
Nov 19, 2024
Merged

I/O and other small fixes #18

merged 4 commits into from
Nov 19, 2024

Conversation

denehoffman
Copy link
Owner

This PR mostly adds methods that make it easy to pickle a Status. It also adds some type hints that should allow the "sum" method in Python to actually work. The real trick for making "sum" work is allowing a no-op addition with 0, since that's what the sum method assumes as the starting value in the summation. There are now __radd__ and __rmul__ for every __add__ and __mul__.

…y pickle `Status`

The second of these applies nicely if you want to pickle multiple `Status` objects into the same file with other data, for example, a list of binned fit results. It essentially allows pickle's load(s) and dump(s) methods to work directly on `Status` and any structures which contain `Status` (like a dict or list).
Copy link

codecov bot commented Nov 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.61%. Comparing base (ac2bc48) to head (a8f6323).
Report is 5 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #18   +/-   ##
=======================================
  Coverage   78.61%   78.61%           
=======================================
  Files          14       14           
  Lines        3932     3932           
  Branches     3932     3932           
=======================================
  Hits         3091     3091           
  Misses        813      813           
  Partials       28       28           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

Copy link

codspeed-hq bot commented Nov 19, 2024

CodSpeed Performance Report

Merging #18 will not alter performance

Comparing development (a8f6323) with main (ac2bc48)

Summary

✅ 2 untouched benchmarks

@denehoffman denehoffman merged commit 79188c3 into main Nov 19, 2024
22 checks passed
@denehoffman denehoffman deleted the development branch November 19, 2024 03:17
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.

1 participant