API

API

Config(p"~/.playground/config.yml", root=p"~/.playground")

Stores various default playground environment settings including paths for storing shared binaries and environments.

source
Environment([config::Config], [name::String], [root::AbstractPath])

An environment stores information about a playground environment and provides methods fro interacting with them.

NOTE: In the future we might want to support different types of environments (e.g., DockerEnvironment).

source
Playground.installFunction.
install{S<:AbstractString}(config::Config, version::VersionNummber; labels::Array{S}=String[])

Downloads the latest binary version for your platform and symlinks the binary with the appropriate labels.

source
install{S<:AbstractString}(config::Config, executable::AbstractPath; labels::Array{S}=String[])

Creates symlinks from an existing julia install.

source
Playground.createFunction.
create(; kwargs...)
create(config::Config, args...; kwargs...)
create(env::Environment; kwargs...)

Creates a new playground Environment including initializing its package directory and installing any package in the REQUIRE file passed in.

Optional Arguments

You can optionally pass in an Environment instance of a Config and args to build one.

Keywords Arguments

  • julia::AbstractString - a julia binary to use in this playground environment.

  • reqs_file::AbstractPath - path to a REQUIRE file of packages to install in this environment.

  • registry::AbstractString - url to the package registry to be cloned.

  • branch::AbstractString - registry branch to be checked out.

source
Playground.activateFunction.
activate(; shell=true)
activate(config::Config, args...; shell=true)
activate(env::Environment; shell=true)

Modifies the current environment to operate within a specific playground environment. When shell=true a new shell environment will be created. However, when shell=false the existing julia REPL will be modifed and deactivate() must be called to restore the REPL state.

source
Playground.deactivateFunction.
deactivate()

Deactivates the active environment and restores the original julia environment.

source
Base.withenvMethod.
withenv(f::Function, env::Environment)

Works the same as withenv(f, keyvals...), but is specific to running f within a playground Environment.

source
Playground.listFunction.
list(config::Config; show_links=false)

Prints out all installed julia version and playgrounds.

source
Playground.cleanFunction.
clean(config::Config)

Removes any deadlinks Playground's bin and share directories.

source
Base.Filesystem.rmMethod.
rm(config::Config; name::AbstractString="", dir::AbstractPath=Path())

Removes a julia binary or playground from Playground's bin and share directories.

source