-
Notifications
You must be signed in to change notification settings - Fork 94
Replace addunit by aslen for improved readability #1263
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
Conversation
Benchmark Results (Julia v1)Time benchmarks
Memory benchmarks
|
Benchmark Results (Julia vlts)Time benchmarks
Memory benchmarks
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors the unit handling system by replacing the addunit function with more focused aslen and aslentype functions. The changes improve clarity and consistency in how length units are added to dimensionless numbers throughout the codebase.
- Replaces
addunit(x, u"m")withaslen(x)for adding meter units to numbers - Replaces
addunit(x, u"m")withaslen.(x)for collections/tuples - Updates
aslentypefunction with simplified error message
Reviewed Changes
Copilot reviewed 26 out of 26 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/units.jl | Refactored addunit into aslen and aslentype functions with clearer naming and simplified error messages |
| src/vectors.jl | Updated Vec constructor to use aslen instead of addunit |
| src/transforms/*.jl | Updated transform constructors to use aslen |
| src/simplification/*.jl | Updated simplification method constructors to use aslen |
| src/sampling/*.jl | Updated sampling method constructors to use aslen |
| src/partitioning/*.jl | Updated partitioning method constructors to use aslen |
| src/neighborhoods/metricball.jl | Updated MetricBall constructors to use aslen |
| src/geometries/primitives/*.jl | Updated primitive geometry constructors to use aslen |
| src/domains/trajecs.jl | Updated trajectory constructors to use aslen |
| src/discretization/maxlength.jl | Updated discretization method constructors to use aslen |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1263 +/- ##
==========================================
- Coverage 87.90% 87.90% -0.01%
==========================================
Files 197 197
Lines 6241 6240 -1
==========================================
- Hits 5486 5485 -1
Misses 755 755 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Minor refactor to clean things up before further work.