Conversation
Add common Unitful-shaped helpers (unit/dimensions/isunitless/upreferred/uparse). Co-authored-by: Miles Cranmer <miles.cranmer@gmail.com>
Benchmark Results (Julia v1.10)Time benchmarks
Memory benchmarks
|
Benchmark Results (Julia v1)Time benchmarks
Memory benchmarks
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #199 +/- ##
==========================================
- Coverage 99.14% 99.00% -0.15%
==========================================
Files 21 23 +2
Lines 1292 1308 +16
==========================================
+ Hits 1281 1295 +14
- Misses 11 13 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Add missing docstrings and adjust Documenter filters so the Documentation job passes.
Unitful exports (singular); remove the alias/export and update docs/tests accordingly.
Drop dimensions alias; make uparse parse unit strings only; stop exporting NoUnits/dimensionless sentinels.
Give isdimensionless its own docstring (alias of isunitless) to avoid confusing copied docs.
Move the Unitful-like shim assertions next to existing unit/uparse/ustrip coverage.
|
@codex review |
MilesCranmer
left a comment
There was a problem hiding this comment.
I think this is looking good. Will be useful for improving API compatibility with Unitful
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4ffb5f868c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Co-authored-by: Miles Cranmer <miles.cranmer@gmail.com>
|
Fixed: simplified |
Co-authored-by: Miles Cranmer <miles.cranmer@gmail.com>
|
Agreed — matching Unitful: I made isunitless/isdimensionless scalar-only (arrays now throw MethodError; use broadcasting: isunitless.(x)). Pushed in commit 5e3592a to branch unitful-api-compat. |
|
|
||
| !!! note | ||
| Like Unitful.jl, `isunitless` is only defined for scalars. For arrays, use broadcasting: | ||
| `isunitless.(x)`. | ||
|
|
||
| See also [`isdimensionless`](@ref). |
Adds a small set of Unitful-shaped API shims (wrappers/aliases) to ease downstream compatibility while keeping DynamicQuantities semantics intact.
Included:
Tests: local Pkg.test() passed.