JuliaPhysics / JuliaPhysics/DynamicQuantities.jl

@register_unit not global

Open
#151 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Julia
Stars
155
Forks
32
PR merge metrics
No merged PRs in 30d

Description

Hi all,

I am in the process of upgrading the Coils.jl package from `Unitful` to `DynamicQuantities` and register Gauss as units:

```julia
using DynamicQuantities: @register_unit, @u_str

@register_unit Gauss 1e-4u"T"
```

However, when I run my package tests, I need to re-register the unit; otherwise, I get "LoadError: ArgumentError: Symbol Gauss not found in `Units` or `Constants`."

I think this is not what one would expect and its a bit annoying for users to have to re-register the units themselves.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.