Arguments passed into a Butler that are used to instantiate a repository. This includes arguments that
can be used to create a new repository (cfgRoot, root, mapper, mapperArgs, policy) and are persisted along
with the new repository's configuration file. These arguments can also describe how a new or existing
repository are to be used (cfgRoot or root, tags, mode). When indicating an existing repository it is
better to not specify unnecessary arguments, as if they conflict with the persisted repository
configuration then a RuntimeError will be raised during Butler init.
A RepositoryArgs class can be initialized from a dict, if the first argument to the initializer is a dict.
Parameters
----------
cfgRoot : URI or dict, optional
If dict, the initalizer is re-called with the expanded dict.
If URI, this is the location where the RepositoryCfg should be found (existing repo) or put (new repo)
root : URI, optional
If different than cfgRoot then this is the location where the repository should exist. A RepositoryCfg
will be put at cfgRoot and its root will be a path to root.
mapper : string or class object, optional
The mapper to use with this repository. If string, should refer an importable object. If class object,
should be a mapper to be instantiated by the Butler during Butler init.
mapperArgs : dict
Arguments & values to pass to the mapper when initializing it.
tags : list or object, optional
One or more unique identifiers to uniquely identify this repository and its parents when performing
Butler.get.
mode : string, optional
should be one of 'r', 'w', or 'rw', for 'read', 'write', or 'read-write'. Can be omitted; input
repositories will default to 'r', output repositories will default to 'w'. 'w' on an input repository
will raise a RuntimeError during Butler init, although 'rw' works and is equivalent to 'r'. Output
repositories may be 'r' or 'rw', 'r' for an output repository will raise a RuntimeError during Butler
init.
policy : dict
Policy associated with this repository, overrides all other policy data (which may be loaded from
policies in derived packages).
Definition at line 31 of file repository.py.