From b7c264a25799e88f32230a6203d77c018eb37daf Mon Sep 17 00:00:00 2001 From: Paul Natsuo Kishimoto Date: Thu, 11 Jan 2024 09:46:10 +0100 Subject: [PATCH] Fix Sphinx nitpicks fron message_ix docs (#506) --- RELEASE_NOTES.rst | 6 +++--- ixmp/backend/__init__.py | 2 +- ixmp/core/timeseries.py | 2 +- ixmp/report/operator.py | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/RELEASE_NOTES.rst b/RELEASE_NOTES.rst index be49b06d3..20955a21d 100644 --- a/RELEASE_NOTES.rst +++ b/RELEASE_NOTES.rst @@ -5,9 +5,9 @@ Migration notes --------------- Update code that imports from the following modules: -- :py:`ixmp.reporting` → use :py:`ixmp.report`. -- :py:`ixmp.reporting.computations` → use :py:`ixmp.report.operator`. -- :py:`ixmp.utils` → use :py:`ixmp.util`. +- :py:`ixmp.reporting` → use :mod:`ixmp.report`. +- :py:`ixmp.reporting.computations` → use :mod:`ixmp.report.operator`. +- :py:`ixmp.utils` → use :mod:`ixmp.util`. Code that imports from the old locations will continue to work, but will raise :class:`DeprecationWarning`. diff --git a/ixmp/backend/__init__.py b/ixmp/backend/__init__.py index dcfe605a2..cd2796e20 100644 --- a/ixmp/backend/__init__.py +++ b/ixmp/backend/__init__.py @@ -54,7 +54,7 @@ class ItemType(IntFlag): - """Type of data items in :class:`.TimeSeries` and :class:`.Scenario`.""" + """Type of data items in :class:`.ixmp.TimeSeries` and :class:`.ixmp.Scenario`.""" # NB the docstring comments ('#:') are placed as they are to ensure the # output is readable. diff --git a/ixmp/core/timeseries.py b/ixmp/core/timeseries.py index 74a1248ba..90c2fbf78 100644 --- a/ixmp/core/timeseries.py +++ b/ixmp/core/timeseries.py @@ -277,7 +277,7 @@ def url(self) -> str: Examples -------- To form a complete URL (e.g. to use with :meth:`.from_url`), use a configured - :class:`Platform` name: + :class:`.ixmp.Platform` name: >>> platform_name = "my-ixmp-platform" >>> mp = Platform(platform_name) diff --git a/ixmp/report/operator.py b/ixmp/report/operator.py index 647874804..5a9f93954 100644 --- a/ixmp/report/operator.py +++ b/ixmp/report/operator.py @@ -150,7 +150,7 @@ def data_for_quantity( def from_url(url: str, cls=TimeSeries) -> "TimeSeries": - """Return a :class:`.TimeSeries` or subclass instance, given its `url`. + """Return a :class:`.ixmp.TimeSeries` or subclass instance, given its `url`. Parameters ----------