thenamelisttool.config¶
A bunch of classes and functions that deal with TNT configuration files and directives.
Functions¶
- thenamelisttool.config.get_template(tplname, encoding=None)[source]¶
Retrieve a template file in the dedicated directory.
Classes¶
- class thenamelisttool.config.TntDirective(**kwargs)[source]¶
Bases:
objectClass that holds all the necessary informations about TNT directives.
It is in charge of checking the correctness of all the provided attributes.
- class thenamelisttool.config.TntRecipe(recipe_filename, sourcenam_directory=None)[source]¶
Bases:
objectA YAML Recipe reader, that collects namelists and possibly filter them, in sight of finally merging them.
- Parameters:
recipe_filename – filepath to the YAML recipe
sourcenam_directory – an optional external directory in which to pick the ingredient namelists
- class thenamelisttool.config.TntStackDirective(basedir, todolist, directives=None)[source]¶
Bases:
objectClass that holds all the necessary informations about TNTstack directives.
- Parameters:
basedir (str) – The name of the directory where the TNTstack reqests lies
todolist (list[dict]) – The list of actions to be performed
directives (dict[dict]) – A list of TNT directives
- property directives¶
The dictionary of TNT directives (as
TntDirectiveobjects).
- property todolist¶
The todo’s list (as a list of dictionaries).
Exceptions¶
- exception thenamelisttool.config.TntDirectiveError[source]¶
Bases:
ExceptionAny exception raised by a TNT configuration class should derive form this one.
- exception thenamelisttool.config.TntDirectiveUnkownError(name)[source]¶
Bases:
TntDirectiveErrorThe TNT directive is unknown.
- exception thenamelisttool.config.TntDirectiveValueError(name, value)[source]¶
Bases:
TntDirectiveErrorAn inappropriate value was given as a TNT directive.
- exception thenamelisttool.config.TntRecipeSyntaxError[source]¶
Bases:
ValueErrorRaised when a syntax error is detected in the recipe file.
- exception thenamelisttool.config.TntStackDirectiveError[source]¶
Bases:
TntDirectiveErrorSyntax error in the TNT stack directive file.