phileas.parsing#

This module allows to parse configuration files, which use a modified YAML syntax, to data and iteration trees, as defined in the iteration module. In particular, it defines the supported custom YAML types.

Module Attributes

RT

Numeric type of the Range

Functions

load_data_tree_from_yaml_file(file)

Parses a YAML configuration file (from its path or its content) into a data tree.

load_iteration_tree_from_yaml_file(file)

Parses a YAML configuration file (from its path or its content) into an iteration tree.

raw_yaml_structure_to_iteration_tree(structure)

Classes

CartesianProduct(children, order, lazy, snake)

Cartesian product node, see CartesianProduct for the supported arguments.

Configurations(configurations, default, ...)

Configurations container.

First(child, size)

First node, which only iterates over the first elements of its child.

Pick(children, default_child)

Pick node, whose iteration alternatively returns a single of its children.

PrimeRng(high[, low, size, default])

Random(distribution, parameters[, size, default])

Range(start, end[, default, steps, ...])

Range of numbers, that can optionally (but usually will) specify an iteration method.

Sequence(elements[, default])

Shuffle(child)

Shuffle node, whose iteration returns a permutation of its only child.

UniformBigIntegerRng(high[, low, size, default])

Union(children, order, lazy, preset, ...)

Union node, see Union for the supported arguments.

YamlCustomType()

Zip(children, order, lazy, stops_at, ...)

Zip node, whose iteration behaves like zip().