InfrastructureContext#
- class eclypse.io.context.InfrastructureContext[source]#
Bases:
IOContextCustomisation context for infrastructure import and export.
- Parameters:
strict (bool) – Whether imported nodes and edges should be validated strictly. Defaults to
False, matchingInfrastructure.include_default_assets (bool) – Whether the imported infrastructure should include default assets when the format does not carry asset definitions. Defaults to
False, matchingInfrastructure.resource_init (InitPolicy) – Resource initialisation policy used when a format does not carry one. Defaults to
"min", matchingInfrastructure.path_assets_aggregators (dict[str, Callable[[list[Any]], Any]] | None) – Named path aggregators used to reconstruct infrastructure path-resource aggregation. Defaults to ECLYPSE path aggregators only when
include_default_assetsisTrue.
Methods
__init__([node_assets, edge_assets, ...])get_aggregator(name)Return a registered path aggregator.
Attributes
- strict: bool#
- include_default_assets: bool#
- resource_init: InitPolicy#
- path_assets_aggregators: dict[str, Callable[[list[Any]], Any]] | None#
- get_aggregator(name)[source]#
Return a registered path aggregator.
- Parameters:
name (str) – The aggregator name.
- Returns:
The registered aggregator.
- Return type:
Callable[[list[Any]], Any]
- Raises:
ValueError – If no aggregator is registered with the given name.
- __init__(node_assets=None, edge_assets=None, update_policies=None, seed=None, strict=False, include_default_assets=False, resource_init='min', path_assets_aggregators=None)#
- Parameters:
node_assets (dict[str, Asset] | None)
edge_assets (dict[str, Asset] | None)
update_policies (UpdatePolicies)
seed (int | None)
strict (bool)
include_default_assets (bool)
resource_init (InitPolicy)
path_assets_aggregators (dict[str, Callable[[list[Any]], Any]] | None)
- Return type:
None