diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 2c1638dd..8bcbfc8f 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -18,7 +18,7 @@ jobs: fail-fast: false matrix: version: - - '1.10' + #- '1.10' - '1' os: - ubuntu-latest diff --git a/Project.toml b/Project.toml index bf0398cd..0ae325fa 100644 --- a/Project.toml +++ b/Project.toml @@ -5,6 +5,7 @@ version = "1.11.0" [deps] DispatchDoctor = "8d63f2c5-f18a-4cf2-ba9d-b3f60fc568c8" +NestedNumbers = "1f6363f3-4ba7-41a3-bcac-d685ef427933" PrecompileTools = "aea7be01-6a6a-4083-8856-8a6e6704d82a" TestItems = "1c621080-faea-4a02-84b6-bbd5e436b8fe" Tricks = "410a4b4d-49e4-4fbc-ab6d-cb71b17b3775" @@ -25,6 +26,7 @@ DynamicQuantitiesUnitfulExt = "Unitful" DispatchDoctor = "0.4" LinearAlgebra = "1" Measurements = "2" +NestedNumbers = "0.1" PrecompileTools = "1" ScientificTypes = "3" TestItems = "0.1, 1" @@ -37,3 +39,6 @@ LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" Measurements = "eff96d63-e80a-5855-80a2-b1b0885c5ab7" ScientificTypes = "321657f4-b219-11e9-178b-2701a2544e81" Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" + +[sources] +NestedNumbers = {url = "https://github.com/JuliaMath/NestedNumbers.jl"} diff --git a/docs/Project.toml b/docs/Project.toml index 81596350..5bb24a6b 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -5,3 +5,9 @@ Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" [compat] # TODO: update when https://github.com/MakieOrg/Makie.jl/pull/5137 merged CairoMakie = "0.15.3" + +[extras] +NestedNumbers = "1f6363f3-4ba7-41a3-bcac-d685ef427933" + +[sources] +NestedNumbers = {url = "https://github.com/JuliaMath/NestedNumbers.jl"} diff --git a/src/types.jl b/src/types.jl index 962f6242..78ad0c24 100644 --- a/src/types.jl +++ b/src/types.jl @@ -1,3 +1,5 @@ +import NestedNumbers + @static if VERSION <= v"1.11.0-" @eval using Tricks: static_fieldnames else @@ -40,7 +42,7 @@ to a base unit (e.g., `length` by default maps to `m`). You may also need to ove abstract type AbstractDimensions{R} end """ - AbstractQuantity{T,D} <: Number + AbstractQuantity{T,D} <: NestedNumbers.QuantityNumber{T} An abstract type for quantities. `T` is the type of the value of the quantity, which should be `<:Number`. @@ -59,7 +61,7 @@ specialize on `UnionAbstractQuantity` which is the union of both `AbstractQuantity` and `AbstractGenericQuantity`, _as well as any other future abstract quantity types_, """ -abstract type AbstractQuantity{T,D} <: Number end +abstract type AbstractQuantity{T,D} <: NestedNumbers.QuantityNumber{T} end """ AbstractGenericQuantity{T,D} <: Any diff --git a/test/Project.toml b/test/Project.toml index cf8f60df..7339338c 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -12,3 +12,9 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" TestItemRunner = "f8b46487-2199-4994-9208-9a1283c18c0a" TestItems = "1c621080-faea-4a02-84b6-bbd5e436b8fe" Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" + +[extras] +NestedNumbers = "1f6363f3-4ba7-41a3-bcac-d685ef427933" + +[sources] +NestedNumbers = {url = "https://github.com/JuliaMath/NestedNumbers.jl"}