diff --git a/docs/Project.toml b/docs/Project.toml index 3489f56b..c79be15d 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -1,6 +1,6 @@ [deps] Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" -Missings = "e1d29d7a-bbdc-5cf2-9ac0-f12de2c33e28" +InMemoryDatasets = "5c01b14b-ab03-46ff-b164-14c663efdd9f" [compat] Documenter = "0.27" diff --git a/docs/make.jl b/docs/make.jl index 6d882b18..71823a5b 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -1,7 +1,7 @@ using Documenter using InMemoryDatasets -# DocMeta.setdocmeta!(InMemoryDatasets, :DocTestSetup, :(using InMemoryDatasets); recursive=true) +DocMeta.setdocmeta!(InMemoryDatasets, :DocTestSetup, :(using InMemoryDatasets); recursive=true) # Build documentation. # ==================== @@ -9,7 +9,7 @@ using InMemoryDatasets makedocs( # options # modules = [InMemoryDatasets], - doctest = false, + doctest = false, # this needs more work clean = false, sitename = "InMemoryDatasets", # format = Documenter.HTML( @@ -34,10 +34,10 @@ makedocs( "Joins" => "man/joins.md" ], "Gallery" => "man/gallery.md", - "Performance tips" => "man/performance.md" - # "API" => Any[ - # "Functions" => "lib/functions.md" - # ] + "Performance tips" => "man/performance.md", + "API" => Any[ + "Functions" => "lib/functions.md" + ] ], strict = true ) diff --git a/docs/src/index.md b/docs/src/index.md index a57e27c0..3617b7db 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -45,3 +45,14 @@ InMemoryDatasets.jl. In particular it is not safe to directly access fields of t that are a part of public API of the InMemoryDatasets.jl package using e.g. the `getfield` function. Whenever some operation on fields of defined types is considered allowed an appropriate exported function should be used instead. + +```@contents +Pages = ["lib/functions.md"] +Depth = 2 +``` + +## Index + +```@index +Pages = ["lib/functions.md"] +``` diff --git a/docs/src/lib/functions.md b/docs/src/lib/functions.md index 079ad13f..450f0151 100644 --- a/docs/src/lib/functions.md +++ b/docs/src/lib/functions.md @@ -1,4 +1,4 @@ - +``` diff --git a/src/abstractdataset/abstractdataset.jl b/src/abstractdataset/abstractdataset.jl index 068cd303..e73b5310 100644 --- a/src/abstractdataset/abstractdataset.jl +++ b/src/abstractdataset/abstractdataset.jl @@ -276,13 +276,22 @@ end """ setinfo!(ds::AbstractDataset, s::String) -sets `s` as the value for the `info` meta data of `ds`. +Set `s` as the value for the `info` meta data of `ds`. + +See [`getinfo`](@ref) """ function setinfo!(ds::AbstractDataset, s::String) _attributes(ds).meta.info[] = s _modified(_attributes(ds)) s end +""" + getinfo(ds::AbstractDataset) + +Get information set by `setinfo!`. + +See [`setinfo!`](@ref) +""" function getinfo(ds::AbstractDataset) _attributes(ds).meta.info[] end @@ -399,7 +408,6 @@ julia> rename!(uppercase, ds) 1 │ 1 2 3 ``` """ - function rename!(ds::AbstractDataset, vals::AbstractVector{Symbol}; makeunique::Bool=false) # Modify Dataset @@ -543,7 +551,6 @@ julia> rename(uppercase, ds) 1 │ 1 2 3 ``` """ - rename(ds::AbstractDataset, vals::AbstractVector{Symbol}; makeunique::Bool=false) = rename!(copy(ds), vals, makeunique=makeunique) rename(ds::AbstractDataset, vals::AbstractVector{<:AbstractString}; @@ -1441,77 +1448,6 @@ function _vcat(dss::AbstractVector{AbstractDataset}; return Dataset(all_cols, header, copycols=false) end -""" - repeat(ds::AbstractDataset; inner::Integer = 1, outer::Integer = 1) - -Construct a data set by repeating rows in `ds`. `inner` specifies how many -times each row is repeated, and `outer` specifies how many times the full set -of rows is repeated. - -# Example -```jldoctest -julia> ds = Dataset(a = 1:2, b = 3:4) -2×2 Dataset - Row │ a b - │ identity identity - │ Int64? Int64? -─────┼──────────────────── - 1 │ 1 3 - 2 │ 2 4 - -julia> repeat(ds, inner = 2, outer = 3) -12×2 Dataset - Row │ a b - │ identity identity - │ Int64? Int64? -─────┼──────────────────── - 1 │ 1 3 - 2 │ 1 3 - 3 │ 2 4 - 4 │ 2 4 - 5 │ 1 3 - 6 │ 1 3 - 7 │ 2 4 - 8 │ 2 4 - 9 │ 1 3 - 10 │ 1 3 - 11 │ 2 4 - 12 │ 2 4 -``` -""" - -""" - repeat(ds::AbstractDataset, count::Integer) - -Construct a data set by repeating each row in `ds` the number of times -specified by `count`. - -# Example -```jldoctest -julia> ds = Dataset(a = 1:2, b = 3:4) -2×2 Dataset - Row │ a b - │ Int64 Int64 -─────┼────────────── - 1 │ 1 3 - 2 │ 2 4 - -julia> repeat(ds, 2) -4×2 Dataset - Row │ a b - │ Int64 Int64 -─────┼────────────── - 1 │ 1 3 - 2 │ 2 4 - 3 │ 1 3 - 4 │ 2 4 -``` -""" -# function Base.repeat(ds::AbstractDataset, count::Integer) -# count < 0 && throw(ArgumentError("count must be non-negative")) -# return mapcols(x -> repeat(x, Int(count)), ds) -# end - ############################################################################## ## ## Hashing