Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust for genno 1.6, pyam 1.0 #492

Merged
merged 5 commits into from
Jul 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ tests/data/nightly
.benchmarks
.coverage*
.mypy_cache
prof/
.pytest_cache
coverage.xml
htmlcov
Expand Down
11 changes: 7 additions & 4 deletions RELEASE_NOTES.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
.. Next release
.. ============
Next release
============

All changes
-----------

- Adjust the Westeros reporting tutorial to pyam 1.0 deprecations (:pull:`492`).

.. All changes
.. -----------

.. _v3.3.0:

Expand Down
2 changes: 1 addition & 1 deletion message_ix/reporting/computations.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def plot_cumulative(x, y, labels):
d0_labels = set(x.coords[d0].values) | set(y.coords[d0].values)
assert (
len(d0_labels) == 1
), "non-unique values {repr(d0_labels)} for dimension {repr(d0)}"
), f"non-unique values {repr(d0_labels)} for dimension {repr(d0)}"

axes_properties = dict(
title=f"{d0_labels.pop()} {labels[0].title()}",
Expand Down
4 changes: 2 additions & 2 deletions message_ix/tests/test_reporting.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ def test_reporter_from_scenario(message_test_mp):
assert len(rep.graph["all"]) == 123

# Quantities have short dimension names
assert "demand:n-c-l-y-h" in rep.graph
assert "demand:n-c-l-y-h" in rep

# Aggregates are available
assert "demand:n-l-h" in rep.graph
assert "demand:n-l-h" in rep

# Quantities contain expected data
dims = dict(coords=["chicago new-york topeka".split()], dims=["n"])
Expand Down
2 changes: 1 addition & 1 deletion tutorial/westeros/westeros_report.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -760,7 +760,7 @@
" scenario='baseline',\n",
" region='Westeros'\n",
" )\n",
" .line_plot()\n",
" .plot()\n",
")"
]
},
Expand Down