Skip to content

Commit

Permalink
Clean-up of convert_unit docstrings and ixmp intersphinx (#441)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielhuppmann committed Oct 13, 2020
1 parent 019d676 commit 6a0200c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
7 changes: 3 additions & 4 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,19 +318,18 @@
# If true, do not generate a @detailmenu in the "Top" node's menu.
#texinfo_no_detailmenu = False


# Example configuration for intersphinx: refer to the Python standard library.
# Intersphinx configuration.
intersphinx_mapping = {
'python': ('https://docs.python.org/3', None),
'numpy': ('https://numpy.org/doc/stable/', None),
'pandas': ('https://pandas.pydata.org/pandas-docs/stable/', None),
'pint': ('https://pint.readthedocs.io/en/stable', None),
'ixmp': ('https://message.iiasa.ac.at/projects/ixmp/en/stable/', None),
'ixmp': ('https://docs.messageix.org/projects/ixmp/en/stable/', None),
'pandas_datareader':
('https://pandas-datareader.readthedocs.io/en/stable', None)
}

# extend the timeout limit for running notebooks
# Extend the timeout limit for running notebooks
nbsphinx_timeout = 120

# prolog for all rst files
Expand Down
13 changes: 6 additions & 7 deletions pyam/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -871,7 +871,7 @@ def convert_unit(self, current, to, factor=None, registry=None,
The default *registry* includes additional unit definitions relevant
for integrated assessment models and energy systems analysis, via the
`iam-units <https://github.com/IAMconsortium/units>`_ package.
This registry can also be accessed directly, using::
This registry can also be accessed directly, using:
.. code-block:: python
Expand All @@ -898,14 +898,13 @@ def convert_unit(self, current, to, factor=None, registry=None,
'unit' column.
factor : value, optional
Explicit factor for conversion without `pint`.
registry : pint.UnitRegistry, optional
registry : :class:`pint.UnitRegistry`, optional
Specific unit registry to use for conversion. Default: the
`iam-units <https://github.com/IAMconsortium/units>`_ registry.
context : str or pint.Context, optional
(Name of) a :ref:`pint context <pint:context>` to use in
conversion. Required when converting between GHG species using GWP
metrics, unless the species indicated by *current* and *to* are the
same.
context : str or :class:`pint.Context`, optional
(Name of) the context to use in conversion.
Required when converting between GHG species using GWP metrics,
unless the species indicated by *current* and *to* are the same.
inplace : bool, optional
Whether to return a new IamDataFrame.
Expand Down

0 comments on commit 6a0200c

Please sign in to comment.