message_ix_models.model.transport.workflow.add_steps

message_ix_models.model.transport.workflow.add_steps(wf: Workflow, base: str, scenario_code: Code) str[source]

Add 0 or more MESSAGEix-Transport workflow steps to wf.

If scenario_code does not contain annotations necessary to configure MESSAGEix-Transport, base is returned and no changes are made to wf.

Otherwise, the following steps are added:

  1. transport.build.main(). This step clones the Scenario from base to a URL given by Config.get_target_url().

  2. If Config.policy is truth-y (that is, contains any Policy instances), call model.workflow.step_0() and remove values for the “bound_emission” parameter. Otherwise, no action.

  3. message_ix.tools.migrate.initial_new_capacity_up_v311().

The name of (3) is returned.

As well, the following additional steps are added:

  • “[…] debug build”. This is the same as (1), except giving dry_run=True, so the scenario is not modified; only debug output is generated. See transport.build.main().

  • “T debug multi”: Collects all “[…] debug build” steps. Repeated calls to add_steps() extend the list.

  • “T report multi”: transport.report.multi(), called on all the target URLs for (1). Repeated calls to add_steps() extend the list.