allensdk.config.model package

Submodules

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.

allensdk.config.model.description_parser module

class allensdk.config.model.description_parser.DescriptionParser[source]

Bases: object

log = <logging.Logger object>
parser_for_extension(filename)[source]

Choose a subclass that can read the format.

Parameters:

filename : string

For the extension.

Returns:

DescriptionParser

Appropriate subclass.

read(file_path, description=None, section=None, **kwargs)[source]

Parse data needed for a simulation.

Parameters:

description : dict

Configuration from parsing previous files.

section : string, optional

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

read_string(data_string, description=None, section=None, header=None)[source]

Parse data needed for a simulation from a string.

write(filename, description)[source]

Save the configuration.

Parameters:

filename : string

Name of the file to write.

Module contents