diff --git a/message_ix_models/model/transport/build.py b/message_ix_models/model/transport/build.py index 31ad0060fb..92c0d95bb6 100644 --- a/message_ix_models/model/transport/build.py +++ b/message_ix_models/model/transport/build.py @@ -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 @@ -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, diff --git a/message_ix_models/tests/model/transport/test_build.py b/message_ix_models/tests/model/transport/test_build.py index f6a8f1553c..c0825596ff 100644 --- a/message_ix_models/tests/model/transport/test_build.py +++ b/message_ix_models/tests/model/transport/test_build.py @@ -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", [ diff --git a/message_ix_models/tests/model/transport/test_data.py b/message_ix_models/tests/model/transport/test_data.py index e9c27e5322..6e60720c31 100644 --- a/message_ix_models/tests/model/transport/test_data.py +++ b/message_ix_models/tests/model/transport/test_data.py @@ -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."""