Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ jobs:
matrix:
julia-version:
- "min"
- "lts"
#- "lts"
- "1"
- "pre"
#- "pre"
os:
- ubuntu-latest
- macos-latest
Expand Down
5 changes: 5 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ ConstructionBase = "187b0558-2788-49d3-abe0-74a17ed4e7c9"
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
InverseFunctions = "3587e190-3f89-42d0-90ee-14403ec27112"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
NestedNumbers = "1f6363f3-4ba7-41a3-bcac-d685ef427933"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"

[weakdeps]
Expand Down Expand Up @@ -36,6 +37,7 @@ LaTeXStrings = "1.2.0"
Latexify = "0.16.8"
LinearAlgebra = "<0.0.1, 1"
NaNMath = "1"
NestedNumbers = "0.1"
Printf = "<0.0.1, 1"
REPL = "<0.0.1, 1"
Random = "<0.0.1, 1"
Expand All @@ -58,3 +60,6 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Aqua", "ConstructionBase", "ForwardDiff", "InverseFunctions", "Latexify", "LaTeXStrings", "LinearAlgebra", "NaNMath", "Test", "Random", "REPL", "Printf"]

[sources]
NestedNumbers = {url = "https://github.com/JuliaMath/NestedNumbers.jl"}
4 changes: 4 additions & 0 deletions docs/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,14 @@ Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d"
tectonic_jll = "d7dd28d6-a5e6-559c-9131-7eb760cdacc5"

[sources]
NestedNumbers = {url = "https://github.com/JuliaMath/NestedNumbers.jl"}
Unitful = {path = ".."}

[compat]
Documenter = "1"
Latexify = "0.16.10"
Plots = "1"
Fontconfig = "0.4"

[extras]
NestedNumbers = "1f6363f3-4ba7-41a3-bcac-d685ef427933"
2 changes: 2 additions & 0 deletions src/Unitful.jl
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ import LinearAlgebra: Diagonal, Bidiagonal, Tridiagonal, SymTridiagonal
import LinearAlgebra: istril, istriu, norm
import Random

import NestedNumbers

export logunit, unit, absoluteunit, dimension, uconvert, ustrip, upreferred
export @dimension, @derived_dimension, @refunit, @unit, @affineunit, @u_str
export Quantity, DimensionlessQuantity, NoUnits, NoDims
Expand Down
4 changes: 2 additions & 2 deletions src/types.jl
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ FixedUnits(::Units{N,D,A}) where {N,D,A} = FixedUnits{N,D,A}()


"""
abstract type AbstractQuantity{T,D,U} <: Number end
abstract type AbstractQuantity{T,D,U} <: NestedNumbers.QuantityNumber{T} end
Represents a generic quantity type, whose dimensions and units are specified in
the type signature. The dimensions and units are allowed to be the empty set,
in which case a dimensionless, unitless number results.
Expand All @@ -148,7 +148,7 @@ The type parameter `T` represents the numeric backing type. The type parameters
Of course, the dimensions follow from the units, but the type parameters are
kept separate to permit convenient dispatch on dimensions.
"""
abstract type AbstractQuantity{T,D,U} <: Number end
abstract type AbstractQuantity{T,D,U} <: NestedNumbers.QuantityNumber{T} end

"""
struct Quantity{T,D,U} <: AbstractQuantity{T,D,U}
Expand Down
Loading