Skip to content

Add doctest in docstring for ByRow() #286

Add doctest in docstring for ByRow()

Add doctest in docstring for ByRow() #286

Triggered via pull request May 12, 2025 17:13
Status Failure
Total duration 4m 4s
Artifacts

ci.yml

on: pull_request
Matrix: test
Fit to window
Zoom out
Zoom in

Annotations

5 errors, 1 warning, and 1 notice
Julia nightly - ubuntu-latest - x64 - pull_request
Process completed with exit code 1.
Documentation
Process completed with exit code 1.
Documentation: src/utils.jl#L191
doctest failure in src/utils.jl:191-216 ```jldoctest julia> Tables.ByRow(x -> x^2)(1:3) 3-element Vector{Int64}: 1 4 9 julia> Tables.ByRow((x, y) -> x*y)(1:3, 2:4) 3-element Vector{Int64}: 2 6 12 julia> Tables.ByRow(x -> x.a)((a=1:2, b=3:4)) 2-element Vector{Int64}: 1 2 julia> Tables.ByRow(x -> (a=x.a*2, b=sin(x.b), c=x.c))((a=[1, 2, 3], b=[1.2, 3.4, 5.6], c=["a", "b", "c"])) 3-element Vector{NamedTuple{(:a, :b, :c), Tuple{Int64, Float64, String}}}: (a = 2, b = 0.9320390859672263, c = "a") (a = 4, b = -0.2555411020268312, c = "b") (a = 6, b = -0.6312666378723216, c = "c") ``` Subexpression: Tables.ByRow(x -> x.a)((a=1:2, b=3:4)) Evaluated output: ERROR: UndefVarError: `Tables` not defined in `Main` Suggestion: check for spelling errors or missing imports. Hint: a global variable of this name also exists in Tables. Stacktrace: [1] top-level scope @ none:1 Expected output: 2-element Vector{Int64}: 1 2 julia> Tables.ByRow(x -> (a=x.a*2, b=sin(x.b), c=x.c))((a=[1, 2, 3], b=[1.2, 3.4, 5.6], c=["a", "b", "c"])) 3-element Vector{NamedTuple{(:a, :b, :c), Tuple{Int64, Float64, String}}}: (a = 2, b = 0.9320390859672263, c = "a") (a = 4, b = -0.2555411020268312, c = "b") (a = 6, b = -0.6312666378723216, c = "c") diff = Warning: Diff output requires color. 2-element Vector{Int64}: 1 2 julia> Tables.ByRow(x -> (a=x.a*2, b=sin(x.b), c=x.c))((a=[1, 2, 3], b=[1.2, 3.4, 5.6], c=["a", "b", "c"])) 3-element Vector{NamedTuple{(:a, :b, :c), Tuple{Int64, Float64, String}}}: (a = 2, b = 0.9320390859672263, c = "a") (a = 4, b = -0.2555411020268312, c = "b") (a = 6, b = -0.6312666378723216, c = "c")ERROR: UndefVarError: `Tables` not defined in `Main` Suggestion: check for spelling errors or missing imports. Hint: a global variable of this name also exists in Tables. Stacktrace: [1] top-level scope @ none:1
Documentation: src/utils.jl#L191
doctest failure in src/utils.jl:191-216 ```jldoctest julia> Tables.ByRow(x -> x^2)(1:3) 3-element Vector{Int64}: 1 4 9 julia> Tables.ByRow((x, y) -> x*y)(1:3, 2:4) 3-element Vector{Int64}: 2 6 12 julia> Tables.ByRow(x -> x.a)((a=1:2, b=3:4)) 2-element Vector{Int64}: 1 2 julia> Tables.ByRow(x -> (a=x.a*2, b=sin(x.b), c=x.c))((a=[1, 2, 3], b=[1.2, 3.4, 5.6], c=["a", "b", "c"])) 3-element Vector{NamedTuple{(:a, :b, :c), Tuple{Int64, Float64, String}}}: (a = 2, b = 0.9320390859672263, c = "a") (a = 4, b = -0.2555411020268312, c = "b") (a = 6, b = -0.6312666378723216, c = "c") ``` Subexpression: Tables.ByRow((x, y) -> x*y)(1:3, 2:4) Evaluated output: ERROR: UndefVarError: `Tables` not defined in `Main` Suggestion: check for spelling errors or missing imports. Hint: a global variable of this name also exists in Tables. Stacktrace: [1] top-level scope @ none:1 Expected output: 3-element Vector{Int64}: 2 6 12 diff = Warning: Diff output requires color. 3-element Vector{Int64}: 2 6 12ERROR: UndefVarError: `Tables` not defined in `Main` Suggestion: check for spelling errors or missing imports. Hint: a global variable of this name also exists in Tables. Stacktrace: [1] top-level scope @ none:1
Documentation: src/utils.jl#L191
doctest failure in src/utils.jl:191-216 ```jldoctest julia> Tables.ByRow(x -> x^2)(1:3) 3-element Vector{Int64}: 1 4 9 julia> Tables.ByRow((x, y) -> x*y)(1:3, 2:4) 3-element Vector{Int64}: 2 6 12 julia> Tables.ByRow(x -> x.a)((a=1:2, b=3:4)) 2-element Vector{Int64}: 1 2 julia> Tables.ByRow(x -> (a=x.a*2, b=sin(x.b), c=x.c))((a=[1, 2, 3], b=[1.2, 3.4, 5.6], c=["a", "b", "c"])) 3-element Vector{NamedTuple{(:a, :b, :c), Tuple{Int64, Float64, String}}}: (a = 2, b = 0.9320390859672263, c = "a") (a = 4, b = -0.2555411020268312, c = "b") (a = 6, b = -0.6312666378723216, c = "c") ``` Subexpression: Tables.ByRow(x -> x^2)(1:3) Evaluated output: ERROR: UndefVarError: `Tables` not defined in `Main` Suggestion: check for spelling errors or missing imports. Hint: a global variable of this name also exists in Tables. Stacktrace: [1] top-level scope @ none:1 Expected output: 3-element Vector{Int64}: 1 4 9 diff = Warning: Diff output requires color. 3-element Vector{Int64}: 1 4 9ERROR: UndefVarError: `Tables` not defined in `Main` Suggestion: check for spelling errors or missing imports. Hint: a global variable of this name also exists in Tables. Stacktrace: [1] top-level scope @ none:1
Julia min - ubuntu-latest - x64 - pull_request
The Pkg.test bounds checking behavior cannot be changed before Julia 1.6. VERSION=1.0.0, julia_args=["--check-bounds=yes", "--compiled-modules=yes", "--depwarn=yes"]
[julia-buildpkg] Caching of the julia depot was not detected
Consider using `julia-actions/cache` to speed up runs https://github.com/julia-actions/cache To ignore, set input `ignore-no-cache: true`