Skip to content

Commit

Permalink
Set defaults for --nodes and --years
Browse files Browse the repository at this point in the history
  • Loading branch information
khaeru committed Nov 2, 2023
1 parent 933c193 commit 55b8696
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion message_ix_models/util/click.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import click
from click import Argument, Choice, Option

from message_ix_models import Context
from message_ix_models import Context, model
from message_ix_models.model.structure import codelists

from .scenarioinfo import ScenarioInfo
Expand Down Expand Up @@ -189,6 +189,7 @@ def unique_id() -> str:
help="Code list to use for 'node' dimension.",
callback=exec_cb("context.model.regions = value"),
type=Choice(codelists("node")),
default=model.Config.regions,
expose_value=False,
),
"output_model": Option(
Expand Down Expand Up @@ -254,6 +255,9 @@ def unique_id() -> str:
"years": Option(
["--years"],
help="Code list to use for the 'year' dimension.",
callback=exec_cb("context.model.years = value"),
type=Choice(codelists("year")),
default=model.Config.years,
# expose_value=False,
),
}

0 comments on commit 55b8696

Please sign in to comment.