diff --git a/Project.toml b/Project.toml index b7142e8..410cc31 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "UnitfulAstro" uuid = "6112ee07-acf9-5e0f-b108-d242c714bf9f" license = "MIT" -version = "1.1.0" +version = "1.1.1" [deps] Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" diff --git a/src/UnitfulAstro.jl b/src/UnitfulAstro.jl index d9aeddf..0a9aa88 100644 --- a/src/UnitfulAstro.jl +++ b/src/UnitfulAstro.jl @@ -3,7 +3,7 @@ __precompile__() module UnitfulAstro import Unitful -using Unitful: @unit, @logscale, @logunit, yr +using Unitful: @unit, @logscale, @logunit macro import_from_unitful(args...) expr = Expr(:block) @@ -34,7 +34,7 @@ function should_we_use_SI_prefixes(arg::Expr) end should_we_use_SI_prefixes(arg::Symbol) = false, arg -@import_from_unitful ~m ~s ~A ~K ~cd +@import_from_unitful ~m ~s ~A ~K ~cd ~yr @import_from_unitful ~L ~Hz ~N ~Pa ~J ~W ~C ~V ~Ω ~S ~F ~H ~T ~Wb ~lm ~lx ~Bq ~Gy ~Sv ~kat ~eV @import_from_unitful sr rad ° °C °F Ra minute hr d wk ~bar atm Torr @import_from_unitful q c0 c μ0 µ0 ε0 ϵ0 Z0 G gn ge h ħ Φ0 me mn mp μB µB Na R k σ diff --git a/test/runtests.jl b/test/runtests.jl index 43c04b1..7a10242 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -17,6 +17,8 @@ const u = UnitfulAstro @test 1.0*Unitful.angstrom ≈ 1e-10*u.m @test 1*u.SFU ≈ 10000*u.Jy @test 1*u.TECU == 1e12*u.cm^-2 + # Make sure we can access Gyr directly from UnitfulAstro + @test 1*u.Gyr ≈ 1e9*u.yr end @testset "simple calculations" begin