Skip to content

Commit

Permalink
Mark message_ix≥3.8 for .transport…get_computer()
Browse files Browse the repository at this point in the history
  • Loading branch information
khaeru committed Jul 30, 2024
1 parent f3802fd commit 5abc169
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions message_ix_models/model/transport/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

from message_ix_models import Context, ScenarioInfo
from message_ix_models.model import bare, build
from message_ix_models.util import minimum_version
from message_ix_models.util._logging import mark_time

from . import Config
Expand Down Expand Up @@ -373,6 +374,7 @@ def add_structure(c: Computer):
c.add("indexers::iea to transport", itemgetter(2), "groups::iea eweb")


@minimum_version("message_ix 3.8")
def get_computer(
context: Context,
obj: Optional[Computer] = None,
Expand Down
1 change: 1 addition & 0 deletions message_ix_models/tests/model/transport/test_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ def test_make_spec(regions_arg, regions_exp, years):
assert expected == spec["require"].set["node"]


@build.get_computer.minimum_version
@pytest.mark.parametrize(
"regions, years, ldv, nonldv, solve",
[
Expand Down
3 changes: 2 additions & 1 deletion message_ix_models/tests/model/transport/test_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@
from genno import Key, Quantity
from iam_units import registry

from message_ix_models.model.transport import files, testing
from message_ix_models.model.transport import build, files, testing
from message_ix_models.model.transport.CHN_IND import get_chn_ind_data, get_chn_ind_pop
from message_ix_models.model.transport.roadmap import get_roadmap_data
from message_ix_models.model.transport.testing import MARK, assert_units
from message_ix_models.project.navigate import T35_POLICY


@build.get_computer.minimum_version
@pytest.mark.parametrize("file", files.FILES, ids=lambda f: "-".join(f.parts))
def test_data_files(test_context, file):
"""Input data can be read."""
Expand Down

0 comments on commit 5abc169

Please sign in to comment.