DataToolkit.addpkgsMethod
addpkgs(mod::Module, pkgs::Vector{Symbol})

For each package in pkgs, which are dependencies recorded in mod's Project.toml, register the package with DataToolkitBase.addpkg.

If pkgs consists of the single symbol :*, then all dependencies of mod will be registered.

This must be run at runtime to take effect, so be sure to place it in the __init__ function of a package.

DataToolkit.initFunction
init(mod::Module=Main; force::Bool=false)

Load the mod-local Data.toml if it exists. When mod is Main, every Data.toml on the load path is loaded, except for Data.tomls within packages' projects. Unless force is set, the data collection is soft-loaded.

A Data.d directory can be used in place of a Data.toml, in which case every toml file within it will be read. Mixing Data.d/*.toml and Data.toml is discouraged.

DataToolkit.@addpkgsMacro
@addpkgs pkgs...

For each named package, register it with DataToolkitBase. Each package must be a dependency of the current module, recorded in its Project.toml.

This allows the packages to be used with DataToolkitBase.@import.

Instead of providing a list of packages, the symbol * can be provided to register all dependencies.

This must be run at runtime to take effect, so be sure to place it in the __init__ function of a package.

Examples

@addpkgs JSON3 CSV
@addpkgs * # Register all dependencies
DataToolkit.@d_strMacro
@d_str -> loaded data

Shorthand for loading a dataset in the default format, d"iris" is equivalent to read(dataset("iris")).

DataToolkit.@data_cmdMacro
@data_cmd -> Data REPL command result

Proxy for running the command in the Data REPL, e.g. data`config set demo 1` is equivalent to data> config set demo 1.