Skip to content

Commit ff3f474

Browse files
committed
Add #341 to docs, whatsnew
1 parent d0da14f commit ff3f474

File tree

4 files changed

+27
-4
lines changed

4 files changed

+27
-4
lines changed

doc/api/tools.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ Exogenous data (:mod:`.tools.exo_data`)
5858

5959
.. autoclass:: ExoDataSource
6060
:members:
61+
:private-members: _where
6162
:special-members: __init__, __call__
6263

6364
.. currentmodule:: message_ix_models.tools.advance

doc/index.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,10 @@ Commonly used classes may be imported directly from :mod:`message_ix_models`.
5353
- :doc:`api/report/index`
5454
- :doc:`api/tools`
5555
- :doc:`api/data-sources`
56+
- :doc:`api/workflow`
5657
- :doc:`api/util`
5758
- :doc:`api/testing`
58-
- :doc:`api/workflow`
59+
- :doc:`api/tests`
5960

6061
.. toctree::
6162
:maxdepth: 2
@@ -73,9 +74,11 @@ Commonly used classes may be imported directly from :mod:`message_ix_models`.
7374
api/tools-costs
7475
api/tools-messagev
7576
api/data-sources
77+
api/workflow
7678
api/util
7779
api/testing
78-
api/workflow
80+
api/tests
81+
7982

8083
.. toctree::
8184
:maxdepth: 2

doc/whatsnew.rst

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ Next release
1616
- :py:`transform="C"` / :func:`.transform_C` (:issue:`229`, :pull:`300`).
1717
- The :class:`~.web.TRANSFORM` enumeration for specifying and validating multiple transformations.
1818

19+
- Improve :class:`.ExoDataSource` with :attr:`~.ExoDataSource.use_test_data`,
20+
:attr:`~.ExoDataSource.where`, and :meth:`~.ExoDataSource._where` (:pull:`341`).
1921
- New class :class:`.Dataflow` for describing input and/or output data flows (:pull:`300`) that are read from file and attached to a :class:`.Computer`.
2022
Generalized from former :py:`.transport.files.ExogenousDataFile`.
2123
- New method :meth:`.Config.regions_from_scenario` (:pull:`300`),
@@ -29,8 +31,19 @@ Next release
2931
- :func:`.check.verbose_check` (:pull:`300`).
3032

3133
- Display entire result quantity in :func:`.report.report` / :program:`mix-models report` with :py:`verbose=True` (:pull:`300`).
34+
- New test fixtures (:pull:`341`):
35+
:func:`.advance_test_data`,
36+
:func:`.gea_test_data`,
37+
:func:`.gfei_test_data`,
38+
:func:`.iea_eei_user_data`,
39+
:func:`.iea_eweb_test_data`,
40+
:func:`.iea_eweb_user_data`,
41+
:func:`.shape_test_data`,
42+
:func:`.ssp_test_data`,
43+
:func:`.ssp_user_data`.
3244
- Bug fix: :program:`mix-models --verbose` command-line option was not stored on :class:`.Context`/:class:`~.util.Config` (:pull:`300`).
33-
- Bug fix: adjust or guard some Python usage that was not compatible with Python 3.9—the earliest version supported by :mod:`message_ix_models` (:pull:`295`, :issue:`294`).
45+
- Bug fix: adjust or guard some Python usage that was not compatible with Python 3.9
46+
—the earliest version supported by :mod:`message_ix_models` (:pull:`295`, :issue:`294`).
3447
- Drop obsolete :py:`series_of_pint_quantity()` (:pull:`289`).
3548

3649
By topic:
@@ -108,6 +121,8 @@ Documentation
108121
- Expand the :ref:`costs-usage` section of the :mod:`.tools.costs` documentation to describe the requirement for SSP input data (:issue:`313`, :pull:`322`).
109122
- Reorganize and improve the :doc:`data` documentation page (:pull:`326`).
110123

124+
.. _v2025.1.10:
125+
111126
v2025.1.10
112127
==========
113128

message_ix_models/tools/exo_data.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,11 @@ def __call__(self) -> Quantity:
110110

111111
@classmethod
112112
def _where(self) -> list[Union[str, "Path"]]:
113-
"""Helper for :py:`__init__()` methods in subclasses."""
113+
"""Helper for :py:`__init__()` methods in subclasses.
114+
115+
Return :attr:`where`, but if :attr:`use_test_data` is :any:`True`, also append
116+
:py:`["test"]`.
117+
"""
114118
return self.where + (["test"] if self.use_test_data else [])
115119

116120
def get_keys(self) -> tuple[Key, Key]:

0 commit comments

Comments
 (0)