BugZoo¶
API Reference¶
-
class
BugZoo
[source]¶ Used to interact with and manage a local BugZoo installation.
-
__init__
(path: Optional[str] = None, docker_client_api_version: Optional[str] = None) → None[source]¶ Creates a new BugZoo installation manager.
- Parameters
path (str, optional) – the absolute path of a BugZoo installation on this machine. If unspecified, the value of the environmental variable
BUGZOO_PATH
will be used, unless unspecified, in which case./${HOME}/.bugzoo
will be used instead.docker_client_api_version (str, optional) – the version of the Docker client API that should be used to communicate with the Docker server.
-
path
¶ The absolute path to the local installation of BugZoo.
-
sources
¶ The sources registered with this BugZoo installation.
-
bugs
¶ The bugs registered with this BugZoo installation.
-
tools
¶ The tools registered with this BugZoo installation.
-
-
class
SourceManager
[source]¶ - TODO: we could cache the contents of all of the sources to disk, avoiding
the need to scan for them at startup. Although that might be cool, it seems like overengineering and may create compatibility headaches in the future.
-
add
(name: str, path_or_url: str) → bugzoo.core.source.Source[source]¶ Attempts to register a source provided by a given URL or local path under a given name.
- Returns
a description of the registered source.
- Raises
NameInUseError – if an existing source is already registered under the given name.
IOError – if no directory exists at the given path.
IOError – if downloading the remote source failed. (FIXME)
-
remove
(source: bugzoo.core.source.Source) → None[source]¶ Unregisters a given source with this server. If the given source is a remote source, then its local copy will be removed from disk.
- Raises
KeyError – if the given source is not registered with this server.