API
Playground.Config
— Type.Config(p"~/.playground/config.yml", root=p"~/.playground")
Stores various default playground environment settings including paths for storing shared binaries and environments.
Playground.Environment
— Type.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).
Playground.install
— Function.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.
install{S<:AbstractString}(config::Config, executable::AbstractPath; labels::Array{S}=String[])
Creates symlinks from an existing julia install.
Playground.create
— Function.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.
Playground.activate
— Function.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.
Playground.deactivate
— Function.deactivate()
Deactivates the active environment and restores the original julia environment.
Base.withenv
— Method.withenv(f::Function, env::Environment)
Works the same as withenv(f, keyvals...)
, but is specific to running f
within a playground Environment
.
Playground.list
— Function.list(config::Config; show_links=false)
Prints out all installed julia version and playgrounds.
Playground.clean
— Function.clean(config::Config)
Removes any deadlinks Playground's bin
and share
directories.
Base.Filesystem.rm
— Method.rm(config::Config; name::AbstractString="", dir::AbstractPath=Path())
Removes a julia binary or playground from Playground's bin
and share
directories.