Commands

Command Library Action

class Action(config, manager=None)

Bases: zoo.core.plugin.plugin.Plugin

id = ''
processArguments(parentParser)
arguments(subParser)

Method that adds arguments to the argument parser

Parameters

subParser (argparse.ArgumentParser) –

run()
cleanup()

Command Loader

class Parser(prog=None, usage=None, description=None, epilog=None, parents=[], formatter_class=<class 'argparse.HelpFormatter'>, prefix_chars='-', fromfile_prefix_chars=None, argument_default=None, conflict_handler='error', add_help=True, allow_abbrev=True, exit_on_error=True)

Bases: argparse.ArgumentParser

error(message: string)

Prints a usage message incorporating the message to stderr and exits.

If you override this in a subclass, it should not return – it should either exit or raise an exception.

fromCli(cfg, arguments)

A function which runs a zoocli action based on the arguments passed.

Parameters
  • cfg (zoo.core.manage.Zoo) –

  • arguments (list(str)) –

Returns

Return type

bool

createRootParser()

Command Library

class BundlePackages(config, manager=None)

Bases: zoo.core.commands.action.Action

id = 'bundlePackages'
arguments(argParser)

Method that adds arguments to the argument parser

Parameters

subParser (argparse.ArgumentParser) –

run()
options: argparse.Namespace or None
class CachePackages(config, manager=None)

Bases: zoo.core.commands.action.Action

Cache package will ensure all packages defined in the environment has been installed, downloaded locally into the packages directory.

id = 'cachePackages'
run()
options: argparse.Namespace or None
class CreatePackage(config, manager=None)

Bases: zoo.core.commands.action.Action

id = 'createPackage'
arguments(argParser)

Method that adds arguments to the argument parser

Parameters

subParser (argparse.ArgumentParser) –

run()
options: argparse.Namespace or None
class EmbedEnv(config, manager=None)

Bases: zoo.core.commands.action.Action

Loads and embed current environment into the current process

id = 'env'
arguments(argParser)

Method that adds arguments to the argument parser

Parameters

subParser (argparse.ArgumentParser) –

run()
options: argparse.Namespace or None
class InstallPackage(config, manager=None)

Bases: zoo.core.commands.action.Action

Installs the given Package path into the current zoo environment.

A package can be provided either as a physical storage path or a git path and tag.

id = 'installPackage'
arguments(argParser)

Method that adds arguments to the argument parser

Parameters

subParser (argparse.ArgumentParser) –

run()
options: argparse.Namespace or None
class ReleasePackage(config, manager=None)

Bases: zoo.core.commands.action.Action

Git Release the requested package. Requires The package to be of type GIT and must exist in current environment File.

id = 'releasePackage'
arguments(argParser)

Method that adds arguments to the argument parser

Parameters

subParser (argparse.ArgumentParser) –

run()
options: argparse.Namespace or None
class Setup(config, manager=None)

Bases: zoo.core.commands.action.Action

This ‘setup’ Command installs zootools core package into the specified Directory, this command sets up the following folder structure:

Resulting folder structure:

|-Specified Root
    |-config
        |-env
    |-install
        |-core
        |-packages
id = 'setup'
arguments(argParser)

Method that adds arguments to the argument parser

Parameters

subParser (argparse.ArgumentParser) –

run()
options: argparse.Namespace or None
class UninstallPackage(config, manager=None)

Bases: zoo.core.commands.action.Action

id = 'uninstallPackage'
arguments(argParser)

Method that adds arguments to the argument parser

Parameters

subParser (argparse.ArgumentParser) –

run()
options: argparse.Namespace or None
class GenerateDocs(config, manager=None)

Bases: zoo.core.commands.action.Action

This Command generates API documentation using sphinx.

Before Building the documentation you’ll first need to pip install the following libraries:

sphinx sphinx_rtd_theme

Please see the how to Build documentation to see how to custom package level configuration.

id = 'generateDocs'
arguments(argParser)

Method that adds arguments to the argument parser

Parameters

subParser (argparse.ArgumentParser) –

run()
generateApiDocs(packages)
generateDocs(outputRoot, packages)
options: argparse.Namespace or None