Skip to content

Commit 24c466f

Browse files
committed
Add #450 to docs/whatsnew
1 parent a795a40 commit 24c466f

File tree

3 files changed

+22
-3
lines changed

3 files changed

+22
-3
lines changed

doc/api/data-sources.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
Tools for specific data sources
22
*******************************
33

4+
.. _tools-cepii:
5+
6+
“Centre d’études prospectives et d’informations internationales” (CEPII) (:mod:`.tools.cepii`)
7+
==============================================================================================
8+
9+
.. currentmodule:: message_ix_models.tools.cepii
10+
11+
.. automodule:: message_ix_models.tools.cepii
12+
:members:
13+
414
.. _tools-gfei:
515

616
Global Fuel Economy Initiative (GFEI) (:mod:`.tools.gfei`)

doc/whatsnew.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ What's new
44
Next release
55
============
66

7+
- New provider for exogenous data from the :ref:`tools-cepii` :class:`.BACI` data source (:pull:`450`).
78
- Improvements to :class:`.report.Config` (:pull:`178`):
89

910
- New attribute :attr:`~.report.Config.modules`.
@@ -14,6 +15,7 @@ Next release
1415
to cover features implemented/not implemented by :mod:`genno`-based reporting.
1516
Module globals :data:`.NOT_IMPLEMENTED_MEASURE` and :data:`.NOT_IMPLEMENTED_IAMC`
1617
record not-yet-implemented measures and IAMC ‘variables’.
18+
- New utility functions :func:`.extract_if_newer`, :func:`.random_sample_from_files` (:pull:`450`).
1719

1820
v2025.10.31
1921
===========

message_ix_models/tools/cepii.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,10 @@ class BACI(ExoDataSource):
7474
- The 202501 release only.
7575
- The 1992 Harmonized System (HS92) only.
7676
77-
.. todo:: Aggregate to MESSAGE regions.
77+
.. todo::
78+
- Aggregate to MESSAGE regions.
79+
- Test with additional HS categorizations.
80+
- Test with additional releases.
7881
"""
7982

8083
@dataclass
@@ -101,6 +104,10 @@ class Options(BaseOptions):
101104
#: in :attr:`dims`; values **must** be regular expressions or compiled
102105
#: :class:`re.Pattern` that fullmatch the :class:`str` representation of labels
103106
#: on the respective dimension.
107+
#:
108+
#: For example, :py:`filter_pattern=dict(k="270(4..|576)")` matches any 6-digit
109+
#: label on the :math:`k` dimension starting with '2704', or the exact label
110+
#: '270576'.
104111
filter_pattern: dict[str, "str | Pattern"] = field(default_factory=dict)
105112

106113
#: Set to :any:`True` to use test data from the :mod:`message_ix_models`
@@ -129,9 +136,9 @@ def get(self) -> "AnyQuantity":
129136
This method performs the following steps:
130137
131138
1. If needed, retrieve the data archive from :data:`.pooch.SOURCE` using the
132-
entry "CEPII_BACI". The file is stored in the :attr:`.Config.cache_dir`, and
139+
entry "CEPII_BACI". The file is stored in the :attr:`.Config.cache_path`, and
133140
is about 2.2 GiB.
134-
2. If needed, extract all the members of the archive to the :file:`cepii-baci`
141+
2. If needed, extract all the members of the archive to a :file:`…/cepii-baci/`
135142
subdirectory of the cache directory. The extracted size is about 7.9 GiB,
136143
containing about 2.6 × 10⁸ observations.
137144
3. Call :func:`.baci_data_from_files` to read the data files and apply

0 commit comments

Comments
 (0)