Skip to content

Commit 1e24298

Browse files
committed
Update docs for #213
- Copy :source:`…` Sphinx role from message_data.
1 parent e2631d1 commit 1e24298

File tree

3 files changed

+24
-18
lines changed

3 files changed

+24
-18
lines changed

doc/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ def setup(app: "sphinx.application.Sphinx") -> None:
168168
"issue": ("https://github.com/iiasa/message-ix-models/issue/%s", "GH #%s"),
169169
"pull": ("https://github.com/iiasa/message-ix-models/pull/%s", "PR #%s"),
170170
"gh-user": ("https://github.com/%s", "@%s"),
171+
"source": ("https://github.com/iiasa/message-ix-models/blob/main/%s", "%s"),
171172
}
172173

173174
# -- Options for sphinx.ext.intersphinx ------------------------------------------------

doc/transport/index.rst

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,14 @@ MESSAGEix-Transport
33

44
.. warning::
55

6-
MESSAGEix-Transport is **under development**.
6+
1. MESSAGEix-Transport is **under development**.
7+
For details, see:
78

8-
- The code and data documented on these pages were recently :doc:`migrated </migrate>` from :mod:`.message_data`.
9-
The text may still contain references to the old location.
10-
- For details, see the `project board <https://github.com/orgs/iiasa/projects/29>`_.
9+
- `Issues and PRs labeled 'transport' <https://github.com/iiasa/message-ix-models/issues?q=label%3Atransport>`_ on the :mod:`.message_ix_models` GitHub repository.
10+
- The `project board <https://github.com/orgs/iiasa/projects/29>`_ (IIASA only).
11+
12+
2. The code and data documented on these pages were recently :doc:`migrated </migrate>` from the private :mod:`.message_data` repository to the public :mod:`message_ix_models` repository.
13+
The text may still contain references to the old location.
1114

1215
:mod:`message_ix_models.model.transport` adds a technology-rich representation of transport to models in the MESSAGEix-GLOBIOM family.
1316
The resulting “model variant” is variously referred to as:
@@ -19,7 +22,7 @@ The resulting “model variant” is variously referred to as:
1922
MESSAGEix-Transport extends the formulation described by McCollum et al. (2017) :cite:`mccollum-2017` for the older, MESSAGE V framework that predated MESSAGEix.
2023
Some inherited information about the older model is collected at :doc:`old`.
2124

22-
Information about MESSAGEix-Transport, its inputs, configuration, implementation, and output, are organized according to this diagram:
25+
This documentation of MESSAGEix-Transport, its inputs, configuration, implementation, and output, are organized according to this diagram:
2326

2427
.. figure:: https://raw.githubusercontent.com/khaeru/doc/main/image/data-stages.svg
2528

@@ -34,7 +37,7 @@ Information about MESSAGEix-Transport, its inputs, configuration, implementation
3437
input
3538
output
3639

37-
On this page:
40+
Other topics covered on this page:
3841

3942
.. contents::
4043
:local:

doc/transport/input.rst

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ This page describes the structure and format of inputs required for building MES
99

1010
Both input data and configuration are stored in files under :file:`message_ix_models/data/transport/`.
1111

12-
In most cases, these files are read from a subdirectory like :file:`/data/transport/{nodes}/`, where `nodes` denotes the :mod:`message_ix_models` :doc:`node code list </pkg-data/node>`—for instance, "R12"—for which MESSAGEix-Transport will be built.
13-
This value is retrieved from the :attr:`Context.regions <.model.Config.regions>` setting.
12+
In most cases, these files are read from a subdirectory like :file:`/data/transport/{nodes}/`, where `nodes` denotes the :mod:`message_ix_models` :doc:`node code list </pkg-data/node>`—for instance, "R12"—for which MESSAGEix-Transport will be built.
13+
This value is retrieved from the :attr:`.model.Config.regions` setting on a :class:`.Context` object.
1414

15-
- If the file data or configuration settings have a node (:math:`n`) dimension, the file **must** be placed in such a subdirectory.
15+
- If the file data or configuration settings have a node (|n|) dimension, the file **must** be placed in such a subdirectory.
1616
Data for one node list is not usable for base models using a different node list.
1717
- For other data, a node list–specific file **may** be used.
18-
If none exists, the file of the same name in :file:`/data/transport/` is used as a default.
19-
For example, :file:`/data/transport/R12/set.yaml` is used if it exists; if not, then :file:`/data/transport/set.yaml` is used.
18+
If none exists, the file of the same name in :file:`/data/transport/` is used as a default.
19+
For example, :file:`/data/transport/R12/set.yaml` is used if it exists; if not, then :file:`/data/transport/set.yaml` is used.
2020

2121
.. _transport-config:
2222

@@ -27,8 +27,8 @@ General (:file:`config.yaml`, required)
2727
---------------------------------------
2828

2929
The contents of this configuration file exactly map to the attributes of the class :class:`transport.Config <.transport.config.Config>`.
30-
The class stores all the settings understood by the code for building, solving, and reporting MESSAGEix-Transport, including their default values.
31-
(There is no common default like :file:`/data/transport/config.yaml`.)
30+
The class stores all the settings understood by the code for building, solving, and reporting MESSAGEix-Transport.
31+
The class also defines the default values for each setting (there is no file :file:`/data/transport/config.yaml` containing defaults.)
3232
It also has methods for reading the configuration from file; see the detailed description of :meth:`.Config.from_context`.
3333

3434
The following is the configuration file for a base model with R12 nodes:
@@ -41,14 +41,14 @@ Technology code list (:file:`technology.yaml`)
4141
This file gives the code list for the MESSAGE ``technology`` concept/set/dimension.
4242
Some annotations (``iea-eweb-flow``, ``input``, ``report``) and the :attr:`~sdmx.model.common.Code.child` hierarchy give information about technologies' grouping according to transport modes.
4343

44-
→ View :source:`data/transport/technology.yaml` on GitHub
44+
→ View :source:`message_ix_models/data/transport/technology.yaml` on GitHub
4545

4646
Code lists for other MESSAGE sets (:file:`set.yaml`)
4747
----------------------------------------------------
4848

4949
This file gives code lists for other MESSAGE concepts/sets/dimensions.
5050

51-
→ View :source:`data/transport/set.yaml` on GitHub
51+
→ View :source:`message_ix_models/data/transport/set.yaml` on GitHub
5252

5353
.. _transport-data-files:
5454

@@ -65,8 +65,10 @@ Through :func:`.transport.build.main` (ultimately, :func:`.transport.build.add_e
6565
The file has column headers "node", "technology", and "value".
6666

6767
Not all files are currently or always used in model-building computations.
68-
Some submodules of :mod:`~message_ix_models.model.transport` use additional data files via other mechanisms.
69-
Most of the files have a header comment including a precise description of the quantity, source of the data, and units of measurement; in some cases extended information is below (where a header comment would be too long).
68+
Some submodules of :mod:`~.model.transport` use additional data files via other mechanisms.
69+
Most of the files have a header comment including a precise description of the quantity, source of the data, and units of measurement.
70+
In some cases extended information is below (where a header comment would be too long).
71+
The :program:`git` history of files, or the GitHub "blame" view can also be used to inspect the edit history of each file, line by line.
7072

7173
:file:`ldv-activity.csv` → ``ldv activity:n:exo``
7274
-------------------------------------------------
@@ -223,7 +225,7 @@ Other files
223225
Other data sources
224226
==================
225227

226-
:mod:`~message_ix_models.model.transport` makes use of the :mod:`message_ix_models.tools.exo_data` mechanism to retrieve data from common (not transport-specific) sources.
228+
:mod:`~.model.transport` makes use of the :mod:`.tools.exo_data` mechanism to retrieve data from common (not transport-specific) sources.
227229
:class:`.DataSourceConfig`, :attr:`.transport.Config.ssp`, and other settings determine which sources and quantities are used.
228230

229231
These include:

0 commit comments

Comments
 (0)