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

Fix pt unit being misinterpreted as pints #271

Merged
merged 1 commit into from
Jan 1, 2025

Conversation

jmuhlich
Copy link
Collaborator

@jmuhlich jmuhlich commented Jan 1, 2025

The OME schema defines "pt" as points but the pint default configuration makes it an alias for pints. This overrides the pt alias in our unit registry.

I added the option to ignore the override warning, also happy to discuss alternate approaches.

Copy link

codecov bot commented Jan 1, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.85%. Comparing base (e4bda9e) to head (c1245f3).
Report is 8 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #271      +/-   ##
==========================================
+ Coverage   86.84%   86.85%   +0.01%     
==========================================
  Files          25       25              
  Lines        1262     1263       +1     
==========================================
+ Hits         1096     1097       +1     
  Misses        166      166              

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

Copy link

codspeed-hq bot commented Jan 1, 2025

CodSpeed Performance Report

Merging #271 will improve performances by 11.98%

Comparing jmuhlich:units-pt-is-point (c1245f3) with main (e4bda9e)

Summary

⚡ 1 improvements
✅ 8 untouched benchmarks

Benchmarks breakdown

Benchmark main jmuhlich:units-pt-is-point Change
test_time_from_xml[large] 3.3 s 3 s +11.98%

The OME schema defines "pt" as points but the pint default
configuration makes it an alias for pints. This overrides the
pt alias in our unit registry and suppresses the warning that
pint emits as a result.
@tlambert03 tlambert03 merged commit 13e4d39 into tlambert03:main Jan 1, 2025
35 checks passed
@jmuhlich jmuhlich deleted the units-pt-is-point branch January 2, 2025 00:28
@tlambert03 tlambert03 added the bug Something isn't working label Feb 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants