Skip to content

Fix memoryview type being returned by SmaxInt<n>.data #23

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

Merged
merged 4 commits into from
Jun 27, 2025
Merged

Conversation

PaulKGrimes
Copy link
Collaborator

Numpy Ints have a property called .data, that returns a memory view of the object, rather than the object itself. The order of inheritance in defining SmaxInt led to the SmaxVarBase .data property being overwritten by this property. It had already been fixed in SmaxFloats, but not SmaxInts.

This patches smax_data_types.py to ensure the correct .data property is returned. A note should be added to the documentation that this overrides the numpy base .data memoryview.

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 82.05128% with 7 lines in your changes missing coverage. Please review.

Project coverage is 49.85%. Comparing base (8bb160c) to head (39efb3d).

Files with missing lines Patch % Lines
src/smax/smax_data_types.py 80.55% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #23      +/-   ##
==========================================
+ Coverage   48.80%   49.85%   +1.04%     
==========================================
  Files           5        5              
  Lines        1635     1671      +36     
==========================================
+ Hits          798      833      +35     
- Misses        837      838       +1     
Flag Coverage Δ
unittests 49.85% <82.05%> (+1.04%) ⬆️

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

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@PaulKGrimes PaulKGrimes merged commit 853c672 into main Jun 27, 2025
8 checks passed
@PaulKGrimes PaulKGrimes deleted the fix_pubsub branch June 27, 2025 16:49
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