Skip to content

Commit

Permalink
Add autosummary to model docs
Browse files Browse the repository at this point in the history
  • Loading branch information
khaeru committed Apr 30, 2020
1 parent 2a1bc18 commit 0673fb3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
12 changes: 10 additions & 2 deletions doc/source/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,14 @@ Model classes

.. currentmodule:: message_ix.models

.. automodule:: message_ix.models
:exclude-members: MESSAGE, MESSAGE_MACRO
.. autosummary::

MESSAGE
MACRO
MESSAGE_MACRO
GAMSModel
DEFAULT_CPLEX_OPTIONS
MESSAGE_ITEMS

.. autodata:: DEFAULT_CPLEX_OPTIONS

Expand Down Expand Up @@ -125,6 +131,8 @@ Model classes
**var_list** :obj:`None`
================== ===

.. autoclass:: MACRO

.. autoclass:: MESSAGE_MACRO
:members:
:show-inheritance:
Expand Down
3 changes: 3 additions & 0 deletions message_ix/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,12 @@ def run(self, scenario):


class MESSAGE(GAMSModel):
"""Model class for MESSAGE."""
name = 'MESSAGE'


class MACRO(GAMSModel):
"""Model class for MACRO."""
name = 'MACRO'

#: MACRO uses the GAMS ``break;`` statement, and thus requires GAMS 24.8.1
Expand Down Expand Up @@ -191,6 +193,7 @@ def initialize(cls, scenario, with_data=False):


class MESSAGE_MACRO(MACRO):
"""Model class for MESSAGE_MACRO."""
name = 'MESSAGE-MACRO'

def __init__(self, *args, **kwargs):
Expand Down

0 comments on commit 0673fb3

Please sign in to comment.