Configuration Language

This module contains code to pre-process text files, code for a FalshUnit class which parses Config files, code for FlashUnitUnion class to merge FlashUnits, and a FlashUnitList class which contains a list of unit names together with methods to manipulate them.

class flash.dsl.configuration.Configuration(conffile=None, top_unit=False, usevars=None, ignore_pp=False, unitname='', unitpath='', without_units=None)[source]

Encapsulates FLASH Unit information as expressed in Config files.

Data is accessed through the appropriate attributes:

Configuration('IO/common/Config').default
Configuration('../Simulation/SimulationMain/Sedov/Config').library
Configuration('').flux
Parameters :

conffile : str or file object or None

path to the config file, None for clean instance.

top_unit : bool, optional

whether the configuration file is for a top-level FLASH unit.

usevars : dict or None, optional

dictionary of initial values for attributes. Often given as flmake.gvars.setup_vars.vars for setting up actual problems.

ignore_pp : bool, optional

Igonore pre-processing for documentation purposes.

unitname : str, optional

Name of the unit, if applicable

unitpath : str, optional

Absolute path to the unit, if applicable. Useful for when conffile doesn’t exist.

without_units : dict or None, optional

Units to not allow, in the case of requests. Bool valued.

process_file()[source]

Processes the config file.

parent()[source]

Returns parent unit’s full name, empty string if we’re orphans

parse()[source]

proccess file such that exceptions go all the way to the top.

class flash.dsl.configuration.ConfigurationUnion(configs)[source]

Container for collation of Configuration instances.

Simply takes a list of config files.

Parameters :

configs : sequence

Configuration instances.

collate(configs)[source]

Collates info from an ordered list of Configuration instances.

Parameters :

configs : sequence

Configuration instances.

simplify()[source]

Store stuff that can be computed from configuration info. We’ll use lowercase keys to separate things.

In many cases self[‘UPPERCASE’] is a dictionary. We define self[‘uppercase’] as its sorted list of keys.

Previous topic

Runtime Parameters Language

Next topic

flmake

This Page