Commands

Command Library Action

class Action(config, manager=None)

Bases: 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: 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: Action

id = 'bundlePackages'
arguments(argParser)

Method that adds arguments to the argument parser

Parameters:

subParser (argparse.ArgumentParser) –

run()
class CachePackages(config, manager=None)

Bases: Action

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

id = 'cachePackages'
run()
class CreatePackage(config, manager=None)

Bases: Action

id = 'createPackage'
arguments(argParser)

Method that adds arguments to the argument parser

Parameters:

subParser (argparse.ArgumentParser) –

run()
class EmbedEnv(config, manager=None)

Bases: 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()
class InstallPackage(config, manager=None)

Bases: 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()
class ReleasePackage(config, manager=None)

Bases: 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()
class Setup(config, manager=None)

Bases: 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()
class UninstallPackage(config, manager=None)

Bases: Action

id = 'uninstallPackage'
arguments(argParser)

Method that adds arguments to the argument parser

Parameters:

subParser (argparse.ArgumentParser) –

run()
class GenerateDocs(config, manager=None)

Bases: 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)