message_ix_models.model.transport.config.ScenarioCodeAnnotations

class message_ix_models.model.transport.config.ScenarioCodeAnnotations(SSP_URN: str, is_LED_scenario: bool, EDITS_activity_id: str | None, base_scenario_URL: str)[source]

Bases: AnnotationsMixIn

Set of annotations appearing on each Code in CL_TRANSPORT_SCENARIO.

__init__(SSP_URN: str, is_LED_scenario: bool, EDITS_activity_id: str | None, base_scenario_URL: str) None

Methods

__init__(SSP_URN, is_LED_scenario, ...)

from_obj(obj)

Return a new instance of cls given an AnnotableArtefact obj.

get_annotations(_rtype)

Return a collection of Annotation for the fields of the object.

Attributes

SSP_URN

is_LED_scenario

EDITS_activity_id

base_scenario_URL

classmethod from_obj(obj: AnnotableArtefact) Self

Return a new instance of cls given an AnnotableArtefact obj.

get_annotations(_rtype: type[list] | type[dict])

Return a collection of Annotation for the fields of the object.

Returns:

  • list of Annotation – if _rtype is list.

  • dict – if _rtype is dict. The dict has the one key “annotations”, mapped to a list of Annotations. This can be used as a keyword argument to the constructor of a AnnotableArtefact subclass.