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

feat: unit system refactor #142

Merged
merged 3 commits into from
Aug 20, 2024

Conversation

nstarman
Copy link
Contributor

@nstarman nstarman commented Jul 26, 2024

This PR refactors the unit systems to be more class-based, allowing for static analysis of the unit systems. For users the focus shifts from the UnitSystem class to the unitsystem function which can dynamically create new unit systems classes, or use statically-defined ones.

Features:

  • dataclass constructions
  • static analysis

@nstarman nstarman added this to the v0.13 milestone Jul 26, 2024
Copy link

codecov bot commented Jul 26, 2024

Codecov Report

Attention: Patch coverage is 98.73418% with 2 lines in your changes missing coverage. Please review.

Project coverage is 90.93%. Comparing base (b81a59f) to head (32d000a).
Report is 1 commits behind head on main.

Files Patch % Lines
src/unxt/_unxt/unitsystems/base.py 93.33% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #142      +/-   ##
==========================================
+ Coverage   89.91%   90.93%   +1.02%     
==========================================
  Files          28       31       +3     
  Lines        1487     1545      +58     
==========================================
+ Hits         1337     1405      +68     
+ Misses        150      140      -10     

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

@nstarman nstarman modified the milestones: v0.13, future Aug 4, 2024
@nstarman nstarman force-pushed the refactor-unitsystems branch 6 times, most recently from 875571a to 69669a8 Compare August 19, 2024 17:21
Signed-off-by: nstarman <nstarman@users.noreply.github.com>
@nstarman nstarman marked this pull request as ready for review August 19, 2024 17:32
Signed-off-by: nstarman <nstarman@users.noreply.github.com>
Signed-off-by: nstarman <nstarman@users.noreply.github.com>
@nstarman nstarman merged commit fd4b18f into GalacticDynamics:main Aug 20, 2024
16 checks passed
@nstarman nstarman deleted the refactor-unitsystems branch August 20, 2024 02:40
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.

1 participant