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

Enable specifying byte order in packed #14

Merged
merged 3 commits into from
Apr 3, 2024

Conversation

kmnhan
Copy link

@kmnhan kmnhan commented Apr 3, 2024

Hi, thanks for continuing to maintain igor2.

For some .pxt files we work with, it seems like setting the initial byte order to '>' is required to load the file correctly. This PR adds an optional byteorder parameter to the packed function to allow specifying the byte order, although I am not sure whether this is the optimal solution.

I have also attached the file that refuses to load: test.pxt.zip

@paulmueller
Copy link
Member

Hey, I think this is a good solution. I could merge it as is, but...

Could you please add a docstring for load that explains this new argument (and if you have the time 🙏 ideally also the other options which are currently undocumented)?

And, trying not to ask too much here, would it also be possible for you to write a test function for this argument (with the file you provided, optionally with a smaller file)?

Let me know what you think!

Copy link

codecov bot commented Apr 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 71.42%. Comparing base (589bcb2) to head (025fb0f).

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #14      +/-   ##
==========================================
+ Coverage   70.11%   71.42%   +1.31%     
==========================================
  Files          16       16              
  Lines        1014     1015       +1     
==========================================
+ Hits          711      725      +14     
+ Misses        303      290      -13     

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

@kmnhan
Copy link
Author

kmnhan commented Apr 3, 2024

I have written the docstring and a test!

@paulmueller paulmueller merged commit 88fb35f into AFM-analysis:master Apr 3, 2024
11 checks passed
@paulmueller
Copy link
Member

Just made the 0.5.6 release, thank you! 🙏

@kmnhan kmnhan deleted the byteorder branch April 3, 2024 15:26
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