Skip to content

Commit a001b94

Browse files
committed
Update docs, release notes for #972
1 parent e733cdc commit a001b94

File tree

2 files changed

+39
-15
lines changed

2 files changed

+39
-15
lines changed

RELEASE_NOTES.rst

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,24 @@
11
Next release
22
============
33

4+
Migration notes
5+
---------------
6+
7+
Adjust any imports like the following:
8+
9+
.. code-block:: python
10+
11+
from message_ix.models import DIMS, Item, MACRO, MESSAGE, MESSAGE_MACRO
12+
13+
…to:
14+
15+
.. code-block:: python
16+
17+
from message_ix.common import DIMS, Item
18+
from message_ix.macro import MACRO
19+
from message_ix.message import MESSAGE
20+
from message_ix.message_macro import MESSAGE_MACRO
21+
422
All changes
523
-----------
624

@@ -20,6 +38,13 @@ All changes
2038
- Revise :ref:`equation_commodity_balance_aux` to include input and output flows based on |CAP| and |CAP_NEW|.
2139
- New :class:`.MESSAGE` / :meth:`.Scenario.solve` option :py:`cap_comm=True` to enable this representation.
2240

41+
- The former module :py:`message_ix.models` is split to distinct submodules (:pull:`972`):
42+
43+
- :mod:`message_ix.common` includes :class:`.GAMSModel` and related code.
44+
- :mod:`message_ix.macro` includes :class:`.MACRO`.
45+
- :mod:`message_ix.message` includes :class:`.MESSAGE`.
46+
- :mod:`message_ix.message_macro` includes :class:`.MESSAGE_MACRO`.
47+
2348
- Document the :ref:`minimum version of Java <install-java>` required for :class:`ixmp.JDBCBackend <ixmp.backend.jdbc.JDBCBackend>` (:pull:`962`).
2449
- Improve type hinting (:pull:`963`).
2550

doc/api.rst

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -129,27 +129,28 @@ The full API is also available from R; see :doc:`rmessageix`.
129129
Model classes
130130
-------------
131131

132-
.. currentmodule:: message_ix.models
132+
.. currentmodule:: message_ix
133133

134134
.. autosummary::
135135

136-
MESSAGE
137-
MACRO
138-
MESSAGE_MACRO
139-
GAMSModel
140-
DEFAULT_CPLEX_OPTIONS
141-
Item
142-
ItemType
136+
~message_ix.message.MESSAGE
137+
~message_ix.macro.MACRO
138+
~message_ix.message_macro.MESSAGE_MACRO
139+
~message_ix.common.GAMSModel
140+
~message_ix.common.DEFAULT_CPLEX_OPTIONS
141+
~message_ix.common.Item
142+
~ixmp.backend.ItemType
143143

144-
.. autodata:: DEFAULT_CPLEX_OPTIONS
144+
.. autodata:: message_ix.common.DEFAULT_CPLEX_OPTIONS
145145

146146
These configure the GAMS CPLEX solver (or another solver, if selected); see `the solver documentation <https://www.gams.com/latest/docs/S_CPLEX.html>`_ for possible values.
147147

148-
.. autoclass:: GAMSModel
148+
.. autoclass:: message_ix.common.GAMSModel
149149
:members:
150150
:exclude-members: defaults
151151

152-
The :class:`.MESSAGE`, :class:`MACRO`, and :class:`MESSAGE_MACRO` child classes encapsulate the GAMS code for the core MESSAGE (or MACRO) mathematical formulation.
152+
The :class:`.MESSAGE`, :class:`.MACRO`, and :class:`.MESSAGE_MACRO` child classes
153+
encapsulate the GAMS code for the core MESSAGE (or MACRO) mathematical formulation.
153154

154155
The class receives `model_options` via :meth:`.Scenario.solve`. Some of these are passed on to the parent class :class:`ixmp.model.gams.GAMSModel` (see there for a list); others are handled as described below.
155156

@@ -307,12 +308,10 @@ Model classes
307308
.. autoattribute:: items
308309
:no-value:
309310

310-
.. autodata:: DIMS
311-
.. autoclass:: Item
311+
.. autodata:: message_ix.common.DIMS
312+
.. autoclass:: message_ix.common.Item
312313
:members:
313314

314-
.. currentmodule:: message_ix.macro
315-
316315
.. _utils:
317316

318317
Utility methods

0 commit comments

Comments
 (0)