fix doctest error #981
Annotations
4 errors and 1 warning
build:
src/Dimensions/dimension.jl#L24
doctest failure in ~/work/DimensionalData.jl/DimensionalData.jl/src/Dimensions/dimension.jl:24-47
```jldoctest Dimension
using DimensionalData, Dates
x = X(2:2:10)
y = Y(['a', 'b', 'c'])
ti = Ti(DateTime(2021, 1):Month(1):DateTime(2021, 12))
A = DimArray(zeros(3, 5, 12), (y, x, ti))
# output
╭─────────────────────────────╮
│ 3×5×12 DimArray{Float64, 3} │
├─────────────────────────────┴────────────────────────────────────────── dims ┐
↓ Y Categorical{Char} ['a', 'b', 'c'] ForwardOrdered,
→ X Sampled{Int64} 2:2:10 ForwardOrdered Regular Points,
↗ Ti Sampled{DateTime} DateTime("2021-01-01T00:00:00"):Month(1):DateTime("2021-12-01T00:00:00") ForwardOrdered Regular Points
└──────────────────────────────────────────────────────────────────────────────┘
[:, :, 1]
↓ → 2 4 6 8 10
'a' 0.0 0.0 0.0 0.0 0.0
'b' 0.0 0.0 0.0 0.0 0.0
'c' 0.0 0.0 0.0 0.0 0.0
```
Subexpression:
using DimensionalData, Dates
x = X(2:2:10)
y = Y(['a', 'b', 'c'])
ti = Ti(DateTime(2021, 1):Month(1):DateTime(2021, 12))
A = DimArray(zeros(3, 5, 12), (y, x, ti))
Evaluated output:
╭─────────────────────────────╮
│ 3×5×12 DimArray{Float64, 3} │
├─────────────────────────────┴────────────────────────────────────────── dims ┐
↓ Y Categorical{Char} ['a', 'b', 'c'] ForwardOrdered,
→ X Sampled{Int64} 2:2:10 ForwardOrdered Regular Points,
↗ Ti Sampled{Dates.DateTime} Dates.DateTime("2021-01-01T00:00:00"):Dates.Month(1):Dates.DateTime("2021-12-01T00:00:00") ForwardOrdered Regular Points
└──────────────────────────────────────────────────────────────────────────────┘
[:, :, 1]
↓ → 2 4 6 8 10
'a' 0.0 0.0 0.0 0.0 0.0
'b' 0.0 0.0 0.0 0.0 0.0
'c' 0.0 0.0 0.0 0.0 0.0
Expected output:
╭─────────────────────────────╮
│ 3×5×12 DimArray{Float64, 3} │
├─────────────────────────────┴────────────────────────────────────────── dims ┐
↓ Y Categorical{Char} ['a', 'b', 'c'] ForwardOrdered,
→ X Sampled{Int64} 2:2:10 ForwardOrdered Regular Points,
↗ Ti Sampled{DateTime} DateTime("2021-01-01T00:00:00"):Month(1):DateTime("2021-12-01T00:00:00") ForwardOrdered Regular Points
└──────────────────────────────────────────────────────────────────────────────┘
[:, :, 1]
↓ → 2 4 6 8 10
'a' 0.0 0.0 0.0 0.0 0.0
'b' 0.0 0.0 0.0 0.0 0.0
'c' 0.0 0.0 0.0 0.0 0.0
diff =
Warning: Diff output requires color.
╭─────────────────────────────╮
│ 3×5×12 DimArray{Float64, 3} │
├─────────────────────────────┴────────────────────────────────────────── dims ┐
↓ Y Categorical{Char} ['a', 'b', 'c'] ForwardOrdered,
→ X Sampled{Int64} 2:2:10 ForwardOrdered Regular Points,
↗ Ti Sampled{DateTime} DateTime("2021-01-01T00:00:00"):Month(1):DateTime("2021-12-01T00:00:00") Sampled{Dates.DateTime} Dates.DateTime("2021-01-01T00:00:00"):Dates.Month(1):Dates.DateTime("2021-12-01T00:00:00") ForwardOrdered Regular Points
└──────────────────────────────────────────────────────────────────────────────┘
[:, :, 1]
↓ → 2 4 6 8 10
'a' 0.0 0.0 0.0 0.0 0.0
'b' 0.0 0.0 0.0 0.0 0.0
'c' 0.0 0.0 0.0 0.0 0.0
|
build:
src/Dimensions/dimension.jl#L52
doctest failure in ~/work/DimensionalData.jl/DimensionalData.jl/src/Dimensions/dimension.jl:52-74
```jldoctest Dimension
x = A[X(2), Y(3)]
# output
╭─────────────────────────────────╮
│ 12-element DimArray{Float64, 1} │
├─────────────────────────────────┴────────────────────────────────────── dims ┐
↓ Ti Sampled{DateTime} DateTime("2021-01-01T00:00:00"):Month(1):DateTime("2021-12-01T00:00:00") ForwardOrdered Regular Points
└──────────────────────────────────────────────────────────────────────────────┘
2021-01-01T00:00:00 0.0
2021-02-01T00:00:00 0.0
2021-03-01T00:00:00 0.0
2021-04-01T00:00:00 0.0
2021-05-01T00:00:00 0.0
2021-06-01T00:00:00 0.0
2021-07-01T00:00:00 0.0
2021-08-01T00:00:00 0.0
2021-09-01T00:00:00 0.0
2021-10-01T00:00:00 0.0
2021-11-01T00:00:00 0.0
2021-12-01T00:00:00 0.0
```
Subexpression:
x = A[X(2), Y(3)]
Evaluated output:
╭─────────────────────────────────╮
│ 12-element DimArray{Float64, 1} │
├─────────────────────────────────┴────────────────────────────────────── dims ┐
↓ Ti Sampled{Dates.DateTime} Dates.DateTime("2021-01-01T00:00:00"):Dates.Month(1):Dates.DateTime("2021-12-01T00:00:00") ForwardOrdered Regular Points
└──────────────────────────────────────────────────────────────────────────────┘
2021-01-01T00:00:00 0.0
2021-02-01T00:00:00 0.0
2021-03-01T00:00:00 0.0
2021-04-01T00:00:00 0.0
2021-05-01T00:00:00 0.0
2021-06-01T00:00:00 0.0
2021-07-01T00:00:00 0.0
2021-08-01T00:00:00 0.0
2021-09-01T00:00:00 0.0
2021-10-01T00:00:00 0.0
2021-11-01T00:00:00 0.0
2021-12-01T00:00:00 0.0
Expected output:
╭─────────────────────────────────╮
│ 12-element DimArray{Float64, 1} │
├─────────────────────────────────┴────────────────────────────────────── dims ┐
↓ Ti Sampled{DateTime} DateTime("2021-01-01T00:00:00"):Month(1):DateTime("2021-12-01T00:00:00") ForwardOrdered Regular Points
└──────────────────────────────────────────────────────────────────────────────┘
2021-01-01T00:00:00 0.0
2021-02-01T00:00:00 0.0
2021-03-01T00:00:00 0.0
2021-04-01T00:00:00 0.0
2021-05-01T00:00:00 0.0
2021-06-01T00:00:00 0.0
2021-07-01T00:00:00 0.0
2021-08-01T00:00:00 0.0
2021-09-01T00:00:00 0.0
2021-10-01T00:00:00 0.0
2021-11-01T00:00:00 0.0
2021-12-01T00:00:00 0.0
diff =
Warning: Diff output requires color.
╭─────────────────────────────────╮
│ 12-element DimArray{Float64, 1} │
├─────────────────────────────────┴────────────────────────────────────── dims ┐
↓ Ti Sampled{DateTime} DateTime("2021-01-01T00:00:00"):Month(1):DateTime("2021-12-01T00:00:00") Sampled{Dates.DateTime} Dates.DateTime("2021-01-01T00:00:00"):Dates.Month(1):Dates.DateTime("2021-12-01T00:00:00") ForwardOrdered Regular Points
└──────────────────────────────────────────────────────────────────────────────┘
2021-01-01T00:00:00 0.0
2021-02-01T00:00:00 0.0
2021-03-01T00:00:00 0.0
2021-04-01T00:00:00 0.0
2021-05-01T00:00:00 0.0
2021-06-01T00:00:00 0.0
2021-07-01T00:00:00 0.0
2021-08-01T00:00:00 0.0
2021-09-01T00:00:00 0.0
2021-10-01T00:00:00 0.0
2021-11-01T00:00:00 0.0
2021-12-01T00:00:00 0.0
|
build:
src/Dimensions/dimension.jl#L78
doctest failure in ~/work/DimensionalData.jl/DimensionalData.jl/src/Dimensions/dimension.jl:78-91
```jldoctest Dimension
x = A[X(Between(3, 4)), Y(At('b'))]
# output
╭───────────────────────────╮
│ 1×12 DimArray{Float64, 2} │
├───────────────────────────┴──────────────────────────────────────────── dims ┐
↓ X Sampled{Int64} 4:2:4 ForwardOrdered Regular Points,
→ Ti Sampled{DateTime} DateTime("2021-01-01T00:00:00"):Month(1):DateTime("2021-12-01T00:00:00") ForwardOrdered Regular Points
└──────────────────────────────────────────────────────────────────────────────┘
↓ → 2021-01-01T00:00:00 2021-02-01T00:00:00 … 2021-12-01T00:00:00
4 0.0 0.0 0.0
```
Subexpression:
x = A[X(Between(3, 4)), Y(At('b'))]
Evaluated output:
╭───────────────────────────╮
│ 1×12 DimArray{Float64, 2} │
├───────────────────────────┴──────────────────────────────────────────── dims ┐
↓ X Sampled{Int64} 4:2:4 ForwardOrdered Regular Points,
→ Ti Sampled{Dates.DateTime} Dates.DateTime("2021-01-01T00:00:00"):Dates.Month(1):Dates.DateTime("2021-12-01T00:00:00") ForwardOrdered Regular Points
└──────────────────────────────────────────────────────────────────────────────┘
↓ → 2021-01-01T00:00:00 2021-02-01T00:00:00 … 2021-12-01T00:00:00
4 0.0 0.0 0.0
Expected output:
╭───────────────────────────╮
│ 1×12 DimArray{Float64, 2} │
├───────────────────────────┴──────────────────────────────────────────── dims ┐
↓ X Sampled{Int64} 4:2:4 ForwardOrdered Regular Points,
→ Ti Sampled{DateTime} DateTime("2021-01-01T00:00:00"):Month(1):DateTime("2021-12-01T00:00:00") ForwardOrdered Regular Points
└──────────────────────────────────────────────────────────────────────────────┘
↓ → 2021-01-01T00:00:00 2021-02-01T00:00:00 … 2021-12-01T00:00:00
4 0.0 0.0 0.0
diff =
Warning: Diff output requires color.
╭───────────────────────────╮
│ 1×12 DimArray{Float64, 2} │
├───────────────────────────┴──────────────────────────────────────────── dims ┐
↓ X Sampled{Int64} 4:2:4 ForwardOrdered Regular Points,
→ Ti Sampled{DateTime} DateTime("2021-01-01T00:00:00"):Month(1):DateTime("2021-12-01T00:00:00") Sampled{Dates.DateTime} Dates.DateTime("2021-01-01T00:00:00"):Dates.Month(1):Dates.DateTime("2021-12-01T00:00:00") ForwardOrdered Regular Points
└──────────────────────────────────────────────────────────────────────────────┘
↓ → 2021-01-01T00:00:00 2021-02-01T00:00:00 … 2021-12-01T00:00:00
4 0.0 0.0 0.0
|
build
Process completed with exit code 1.
|
build
The following actions use a deprecated Node.js version and will be forced to run on node20: julia-actions/setup-julia@v1, actions/cache@4d4ae6ae148a43d0fd1eda1800170683e9882738, pyTooling/Actions/with-post-step@adef08d3bdef092282614f3b683897cefae82ee3. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
|