master
Tom Wilson 6 years ago
parent 5cf252187b
commit cf92e301a8

@ -36,7 +36,7 @@ For development setup, see the [the Development guide](./DEVELOPMENT.md)
## Specifications and validations
Specifications can be defined in 3 basic Python primary types (``BoolSpec``, ``IntSpec`` and ``StringSpec``), along with dictionaryies to organise them (``DictSpec``). The ``ConfigSpecification`` is just a special type of ``DictSpec`` used to indicate the root of the config.
Specifications can be defined in 3 basic Python primary types (``BoolSpec``, ``IntSpec`` and ``StringSpec``), along with dictionaries to organise them (``DictSpec``). The ``ConfigSpecification`` is just a special type of ``DictSpec`` used to indicate the root of the config.
All of the specification types also have a list variant (``BoolListSpec``, ``IntListSpec``, ``StringListSpec``, ``DictListSpec``).

@ -194,7 +194,7 @@ class ConfigManager():
Args:
bundle_names: A list of config bundle names to get. If dictionary is supplied, uses
the values as ConfigSpecifications rather than looking up the ones stored in the
ConfigManager.
ConfigManager. If None, will use all bundle names in the config source.
Returns:
dict: A dict of the config bundles, with keys matching those passed in
@ -242,7 +242,8 @@ class ConfigManager():
ConfigManager (see ``validate_bundle()``).
Args:
bundle_names: A list of config bundle names to get.
bundle_names: A list of config bundle names to get. If None, will use all bundle
names in the config source.
Returns:
dict: A dict of the validated config bundles, with keys matching those passed in
@ -265,6 +266,10 @@ class ConfigManager():
def get_bundle_names(self):
"""
Returns a list of config bundle names contained in the source.
Note that this may include bundles that have not been verified yet. Calling
`validate_bundles()` or `get_config_bundles()` first will make sure all config source
bundles are verified.
"""
return list(self.config_source.keys())

Loading…
Cancel
Save