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.

read_file(path[, fail])

Update configuration from file.

replace(**kwargs)

Like dataclasses.replace() with name manipulation.

update(**kwargs)

Update attributes in-place.

Attributes

LDV

Light-duty passenger vehicle techno-economic data.

emissions

ID of a dump from a base scenario.

non_LDV

Non-passenger and non-light-duty vehicles.

LDV: None | Literal['US-TIMES MA3T'] = 'US-TIMES MA3T'

Light-duty passenger vehicle techno-economic data.

emissions: str = '1'

ID of a dump from a base scenario.

Type:

Emissions

classmethod from_dict(data: Mapping)

Construct an instance from data with name manipulation.

non_LDV: str = 'IKARUS'

Non-passenger and non-light-duty vehicles.

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.