allensdk.config.model.description module

class allensdk.config.model.description.Description[source]

Bases: object

fix_unary_sections(section_names=None)[source]

Wrap section contents that don’t have the proper array surrounding them in an array.

Parameters:
section_names : list of strings, optional

Keys of sections that might not be in array form.

is_empty()[source]

Check if anything is in the object.

Returns:
boolean

true if self.data is missing or empty

unpack(data, section=None)[source]

Read the manifest and other stand-alone configuration structure, or insert a configuration object into a section of an existing configuration.

Parameters:
data : dict

A configuration object including top level sections, or an configuration object to be placed within a section.

section : string, optional.

If this is present, place data within an existing section array.

unpack_manifest(data)[source]

Pull the manifest configuration section into a separate place.

Parameters:
data : dict

A configuration structure that still has a manifest section.

update_data(data, section=None)[source]

Merge configuration data possibly from multiple files.

Parameters:
data : dict

Configuration structure to add.

section : string, optional

What configuration section to read it into if the file does not specify.