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

refactor: remove pint from models #71

Merged
merged 2 commits into from
Aug 25, 2024
Merged

refactor: remove pint from models #71

merged 2 commits into from
Aug 25, 2024

Conversation

tlambert03
Copy link
Owner

this PR effectively undoes #37 and closes #70

while I love the concept of using pint to ensure that quantities and units are handled correctly, it does get annoying to deal with non built-in types throughout the pipeline, where it's not always clear whether you're getting a quantity (which requires special .magnitude handling in some cases). Leading to stuff like #70

I'm not dropping the dependency on pint yet, so it's still possible to use pint in functions calculating difficult stuff, like fluorophore photon emissions, for example, but there we would simply cast to/from quantities while doing the calculations, but not use them for model fields directly

Copy link

codecov bot commented Aug 5, 2024

Codecov Report

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

Project coverage is 84.19%. Comparing base (60445f9) to head (79b23e4).
Report is 1 commits behind head on main.

Files Patch % Lines
src/microsim/schema/spectrum.py 83.33% 3 Missing ⚠️
src/microsim/schema/simulation.py 0.00% 2 Missing ⚠️
src/microsim/psf.py 66.66% 1 Missing ⚠️
src/microsim/schema/_emission.py 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #71      +/-   ##
==========================================
- Coverage   84.49%   84.19%   -0.30%     
==========================================
  Files          49       49              
  Lines        2909     2892      -17     
==========================================
- Hits         2458     2435      -23     
- Misses        451      457       +6     

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

@tlambert03
Copy link
Owner Author

this will be needed for #74 merging

@tlambert03 tlambert03 merged commit f3fa816 into main Aug 25, 2024
15 of 18 checks passed
@tlambert03 tlambert03 deleted the no-pint-models branch August 25, 2024 14:08
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.

Unit of measure of Spectrum intensity
1 participant