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

Add file format STP #113

Merged
merged 12 commits into from
Feb 11, 2025
Merged

Add file format STP #113

merged 12 commits into from
Feb 11, 2025

Conversation

SylviaWhittle
Copy link
Collaborator

Closes #77

Adds .stp support.

@ns-rse In my haste I've kept everything in one function. Should I split the header reading code out into its own function? I'm of two minds about it at the moment.

Also please do point out if I've omitted documentation somewhere.

I:

  • Added the function in stp.py
  • Added the test in test_stp.py
  • Added an example usage in example_01.ipynb
  • Added documentation to README.md in the examples section and supported formats section.

@codecov-commenter
Copy link

codecov-commenter commented Feb 10, 2025

Codecov Report

Attention: Patch coverage is 78.18182% with 12 lines in your changes missing coverage. Please review.

Project coverage is 74.88%. Comparing base (f282c31) to head (16caff8).
Report is 250 commits behind head on main.

Files with missing lines Patch % Lines
AFMReader/stp.py 78.18% 12 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #113      +/-   ##
==========================================
+ Coverage   65.87%   74.88%   +9.01%     
==========================================
  Files           3        9       +6     
  Lines         337      661     +324     
==========================================
+ Hits          222      495     +273     
- Misses        115      166      +51     

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

Copy link
Collaborator

@ns-rse ns-rse left a comment

Choose a reason for hiding this comment

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

Relatively quick scan through as its after hours. Some minor comments on how we could perhaps keep things shorter without making it harder to understand. Possibly an extraneous notebook has crept in.

Don't think there is a huge need to abstract the header reading out to its own function unless you really wanted to.

Challenging thing is having example files that fail the tests. Mocking might be of use here but I appreciate its a fair amount of work and your busy.

Co-authored-by: Neil Shephard <[email protected]>
Copy link
Collaborator

@ns-rse ns-rse left a comment

Choose a reason for hiding this comment

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

Not on the ball, sorry for the delay 👍

@SylviaWhittle SylviaWhittle merged commit 1f03159 into main Feb 11, 2025
13 checks passed
@SylviaWhittle SylviaWhittle deleted the SylviaWhittle/77-fileformat-stp branch February 11, 2025 15:31
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.

[feature] : Add .stp support
3 participants