message_ix_models.model.transport.config.DataSourceConfig
- class message_ix_models.model.transport.config.DataSourceConfig(emissions: str = '1', LDV: None | Literal['US-TIMES MA3T'] = 'US-TIMES MA3T', non_LDV: str = 'IKARUS')[source]
Bases:
ConfigHelper
Sources for input data.
- __init__(emissions: str = '1', LDV: None | Literal['US-TIMES MA3T'] = 'US-TIMES MA3T', non_LDV: str = 'IKARUS') None
Methods
__init__
([emissions, LDV, non_LDV])from_dict
(data)Construct an instance from data with name manipulation.
hexdigest
([length])Return a hex digest that is unique for distinct settings on the instance.
read_file
(path[, fail])Update configuration from file.
replace
(**kwargs)Like
dataclasses.replace()
with name manipulation.update
(**kwargs)Update attributes in-place.
Attributes
Light-duty passenger vehicle techno-economic data.
ID of a dump from a base scenario.
Non-passenger and non-light-duty vehicles.
- LDV: None | Literal['US-TIMES MA3T'] = 'US-TIMES MA3T'
Light-duty passenger vehicle techno-economic data.
- hexdigest(length: int = -1) str
Return a hex digest that is unique for distinct settings on the instance.
- Returns:
If length is non-zero, a string of this length; otherwise a 32-character string from
blake2s.hexdigest()
.- Return type:
- read_file(path: Path, fail='raise') None
Update configuration from file.
- Parameters:
path – to a
.yaml
file containing a top-level mapping.fail (
str
) – if “raise” (the default), any names in path which do not match attributes of the dataclass raise a ValueError. Ottherwise, a message is logged.
- replace(**kwargs)
Like
dataclasses.replace()
with name manipulation.
- update(**kwargs)
Update attributes in-place.
- Raises:
AttributeError – Any of the kwargs are not fields in the data class.