Skip to content

Conversation

@SylviaWhittle
Copy link
Collaborator

Adds a check during .stp and .top loading to see if the units are µm or nm and multiplies the real size by 1000 if so.

This is needed for @EvaMartinC to load some AFM images.

@codecov-commenter
Copy link

codecov-commenter commented May 15, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.84%. Comparing base (ac9753c) to head (ceed2e6).
Report is 205 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #145      +/-   ##
==========================================
+ Coverage   74.62%   79.84%   +5.21%     
==========================================
  Files           8       12       +4     
  Lines         607      928     +321     
==========================================
+ Hits          453      741     +288     
- Misses        154      187      +33     

☔ 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.

@SylviaWhittle SylviaWhittle requested a review from ns-rse May 15, 2025 15:08
@SylviaWhittle
Copy link
Collaborator Author

SylviaWhittle commented May 15, 2025

The lines added aren't tested but the code is direct from Eva. What do you think, @ns-rse? I could mock it potentially. But it would simply be a test testing if python successfully multiplies a value by 1000.

Alternatively I could ask for the files that need loading. Would the repo size increase be worth the lines being tested?

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.

Simple and straight-forward (I had to think about the regex before understanding the grouping).

Perhaps merge and then address tests as a separate issue/pull-request using mocking as you say to set things up? 🤔

Aside : The test wouldn't really be whether Python *1000 rather it would show that our regex and the logic associated with the results are correct by doing the multiplication.

As a further aside have you seen how large the TopoStats repository and its associated history is when cloning? I might if I ever get time try and work out how to remove some of the larger files from the history.

@SylviaWhittle SylviaWhittle force-pushed the SylviaWhittle/stp-top-µm-support branch from d14289a to 5d897ee Compare May 15, 2025 15:49
@SylviaWhittle SylviaWhittle requested a review from ns-rse May 15, 2025 15:50
@SylviaWhittle
Copy link
Collaborator Author

Eva has sent me example files that use um units, I'll add test cases for these 👍

@ns-rse
Copy link
Collaborator

ns-rse commented Jun 17, 2025

Have you had an opportunity to add the sample files to the test suite @SylviaWhittle ?

@ns-rse
Copy link
Collaborator

ns-rse commented Jun 17, 2025

Absolutely no pressure but once this is merged I think a new v0.0.6 release would be appropriate.

@SylviaWhittle
Copy link
Collaborator Author

Have you had an opportunity to add the sample files to the test suite @SylviaWhittle ?

Forgot about this PR. Done!

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.

Cool, ready to merge.

@SylviaWhittle SylviaWhittle merged commit ac06413 into main Jun 24, 2025
10 checks passed
@SylviaWhittle SylviaWhittle deleted the SylviaWhittle/stp-top-µm-support branch June 24, 2025 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants