JuliaPhysics / JuliaPhysics/Unitful.jl
Improve docs for extending Unitful
- Dominant language
- Julia
- Stars
- 675
- Forks
- 124
- Avg merge
- 3h 38m
- Merged PRs (30d)
- 1
Description
I'd wanted to extend Unitful with a couple of units in a package of mine but I realized I did not understand most of the discussion about it in the documentation [here](http://painterqubits.github.io/Unitful.jl/stable/extending/).
Then I thought I'd just copy the [UnitfulUS.jl](https://github.com/PainterQubits/UnitfulUS.jl) example but it seems that it is not passing CI, which deterred me back here to suggest to either
1. improve Unitful's documentation here, or
2. update UnitfulUS.jl so that it passes CI, or
3. register a dedicated package, e.g., `UnitfulExtensionExample.jl`, with some conversion testing, that would contain something like:
```julia
module UnitfulExtensionExample
mandatory code # Don' touch this part
mandatory code # Don' touch this part
mandatory code # Don' touch this part
# my new units
# (I just copy-pasted the first 5 units
# from UnitfulUS.jl for the sake of this example.)
@unit sinch_us "inˢ" USSurveyInch (100//3937)*Unitful.m false
@unit sft_us "ftˢ" USSurveyFoot 12sinch_us false
@unit sli_us "liˢ" USSurveyLink (33//50)sft_us false
@unit syd_us "ydˢ" USSurveyYard 3sft_us false
@unit srd_us "rdˢ" USSurveyRod 25sli_us false
mandatory code # Don' touch this part
mandatory code # Don' touch this part
mandatory code # Don' touch this part
end
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the extending documentation at painterqubits.github.io/Unitful.jl/stable/extending/ and compare its guidance with the UnitfulUS.jl example. Determine which of the three proposed paths is in scope; completion would require clearer extension guidance, a CI-passing example, or a registered example package with conversion testing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100