Skip to content

Commit

Permalink
Mark add_simulated_solution() as not implemented for message_ix ≤ 3.5
Browse files Browse the repository at this point in the history
  • Loading branch information
khaeru committed Oct 12, 2023
1 parent f19f5fd commit 3fda0b3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions message_ix_models/report/sim.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,14 @@ def add_simulated_solution(
solution data for the MESSAGE variable with the same name. See
:func:`data_from_file`.
"""
from importlib.metadata import version

if version("message_ix") < "3.6":
raise NotImplementedError(
"Support for message_ix_models.report.sim.add_simulated_solution() with "
"message_ix <= 3.5.0. Please upgrade to message_ix 3.6 or later."
)

mark_time()
N = len(rep.graph)

Expand Down
1 change: 1 addition & 0 deletions message_ix_models/tests/test_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ def test_collapse(input, exp):
pdt.assert_frame_equal(util.collapse(df_in), df_exp)


@MARK[0]
def test_add_simulated_solution(test_context, test_data_path):
from message_ix import Reporter

Expand Down

0 comments on commit 3fda0b3

Please sign in to comment.