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

87 make hdf datasets always be float64 unless they are pcap bits #93

Conversation

evalott100
Copy link
Contributor

@evalott100 evalott100 commented Jul 11, 2024

Closes #87

Also fixes the table packing error on main (probably due to the numpy update)

words_to_table
    temp = (value ^ (1 << (bit_length - 1))) + (-1 << (bit_length - 1))
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
OverflowError: Python integer -2147483648 out of bounds for uint32

There are also places in tests where asyncio tasks aren't properly cleaned up (only shown with export PYTHONASYNCIODEBUG=1, but we should handle this in a different issue.

We may also want to think about dropping python 3.8... The test failure there is from a docstring test, where numpy v2 (unavailable on 3.8) has a different output from numpy v1.24.

@evalott100 evalott100 force-pushed the 87-make-hdf-datasets-always-be-float64-unless-they-are-pcap-bits branch from 83e47c5 to fa3b730 Compare July 11, 2024 10:28
Copy link

codecov bot commented Jul 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.12%. Comparing base (8a6bfc2) to head (869ee11).

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #93      +/-   ##
==========================================
+ Coverage   97.08%   97.12%   +0.04%     
==========================================
  Files          12       12              
  Lines        1200     1217      +17     
==========================================
+ Hits         1165     1182      +17     
  Misses         35       35              

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

@evalott100 evalott100 requested a review from coretl July 11, 2024 10:33
@evalott100 evalott100 self-assigned this Jul 11, 2024
@evalott100
Copy link
Contributor Author

@coretl Once this is merged I'll patch release since this fixes the numpy problems on main

Copy link
Contributor

@coretl coretl left a comment

Choose a reason for hiding this comment

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

Review the rest later..

src/pandablocks/connections.py Outdated Show resolved Hide resolved
Thus it will use a `uint32` datatype.
@evalott100 evalott100 requested a review from coretl July 12, 2024 09:19
src/pandablocks/hdf.py Outdated Show resolved Hide resolved
src/pandablocks/responses.py Outdated Show resolved Hide resolved
src/pandablocks/responses.py Outdated Show resolved Hide resolved
@evalott100
Copy link
Contributor Author

@coretl any takes on the 3.8 problem mentioned above?

Copy link
Contributor

@coretl coretl left a comment

Choose a reason for hiding this comment

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

One small change to tests, apart from that looks good

tests/test_hdf.py Outdated Show resolved Hide resolved
@evalott100 evalott100 requested a review from coretl July 18, 2024 07:26
@evalott100 evalott100 merged commit c533d29 into master Jul 18, 2024
21 checks passed
@evalott100 evalott100 deleted the 87-make-hdf-datasets-always-be-float64-unless-they-are-pcap-bits branch July 18, 2024 14:21
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.

Make HDF datasets always be float64 unless they are PCAP.BITS
2 participants