Skip to content

configure

ConfigureImplementation

Bases: CoreConfigureImplementation

characterize_flow(flow_ref, quantity_ref, value, location='GLO', overwrite=False, **kwargs)

A ConfigFlowCharacterization provides a procedural mechanism for specifying flow quantity characterizations after loading an archive. The 'flow_ref' and 'quantity_ref' have to lookup successfully in the archive.

Not clear how to deal with contexts

Parameters:

Name Type Description Default
flow_ref
required
quantity_ref
required
value
required
location
'GLO'
overwrite
False
kwargs
{}

Returns:

Type Description

CoreConfigureImplementation

Bases: BasicImplementation, ConfigureInterface

apply_config(config, **kwargs)

Apply a collection of configuration objects to the archive.

All options should be supplied as a dict of iterables, where the keys are the configuration methods and the entries in each iterable are tuples corresponding to the configuration parameters, properly ordered.

Configuration options should be idempotent; applying them several times should have the same effect as applying them once.

Returns:

Type Description

check_config(config, c_args, **kwargs)

Uses the config schema valid_configs to validate config arguments. A leading '0_' indicates that the argument is permitted to be None.

Parameters:

Name Type Description Default
config

a configuration entry

required
c_args

a tuple of args

required
kwargs
{}

Returns:

Type Description

LcConfigureImplementation

Bases: ConfigureImplementation

allocate_by_quantity(process_ref, quantity_ref, overwrite=False, **kwargs)

A ConfigAllocation provides a procedural mechanism for specifying quantity-wise allocations of processes at load time. All that is required is a quantity; the process knows how to perform the allocation. Note that reference flows not characterized with respect to the quantity will receive zero allocation. So apply flow config first.

Parameters:

Name Type Description Default
process_ref
required
quantity_ref
required
overwrite
False
kwargs
{}

Returns:

Type Description

set_reference(process_ref, flow_ref, direction=None, **kwargs)

A ConfigSetReference indicates that a particular exchange should be marked a reference exchange. All terms are required. The flow and direction must uniquely identify an exchange.

Parameters:

Name Type Description Default
process_ref
required
flow_ref
required
direction
None
kwargs
{}

Returns:

Type Description

unset_reference(process_ref, flow_ref, direction=None, **kwargs)

A ConfigBadReference provides a procedural mechanism for removing automatically-tagged reference flows, or for marking a byproduct as non-reference or non-allocatable. The parts are 'process_ref', 'flow_ref', and 'direction', but if process_ref is None, then all instances of the flow_ref and direction will be marked non-reference.

Difficult to validate because any of the three arguments is allowed to be None (and even in nontrivial combinations)

Parameters:

Name Type Description Default
process_ref
required
flow_ref
required
direction
None
kwargs
{}

Returns:

Type Description