Skip to content

Commit 4ecf414

Browse files
committed
Apply autosummary template to warnings
1 parent 4f1fca0 commit 4ecf414

File tree

2 files changed

+36
-33
lines changed

2 files changed

+36
-33
lines changed

docs/warnings.rst

Lines changed: 35 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -7,28 +7,6 @@ Warnings
77
The ``dwave-system`` package supports various warning classes and provides the
88
ability to configure warning handling.
99

10-
11-
Supported Warnings
12-
==================
13-
14-
The following warnings are currently supported.
15-
16-
.. currentmodule:: dwave.system.warnings
17-
18-
.. autoclass:: ChainBreakWarning
19-
.. autoclass:: ChainLengthWarning
20-
.. autoclass:: ChainStrengthWarning
21-
.. autoclass:: EnergyScaleWarning
22-
.. autoclass:: TooFewSamplesWarning
23-
24-
Related Information
25-
-------------------
26-
27-
* :ref:`qpu_embedding_intro` and :ref:`qpu_embedding_guidance` describe chains
28-
and how to deal with broken chains.
29-
* :ref:`qpu_basic_config` and :ref:`qpu_solver_configuration` provide basic
30-
and advanced information on configuring QPU parameters and best practices.
31-
3210
Configuring Warnings
3311
====================
3412

@@ -53,17 +31,41 @@ structured to represent variable ``a`` with a long chain.
5331
>>> "warnings" in sampleset.info
5432
True
5533

56-
.. currentmodule:: dwave.system.warnings
34+
Supported Warnings and Exceptions
35+
=================================
36+
37+
The following classes are currently supported.
5738

58-
.. autoclass:: WarningAction
59-
.. autoclass:: WarningHandler
39+
.. .. currentmodule:: dwave.system.warnings
40+
.. currentmodule:: dwave.system
6041

6142
.. autosummary::
62-
:toctree: generated/
63-
64-
WarningHandler.chain_break
65-
WarningHandler.chain_length
66-
WarningHandler.chain_strength
67-
WarningHandler.energy_scale
68-
WarningHandler.too_few_samples
69-
WarningHandler.issue
43+
:recursive:
44+
:nosignatures:
45+
:toctree: generated
46+
:template: autosummary_class.rst
47+
48+
~warnings.WarningAction
49+
~warnings.WarningHandler
50+
~warnings.ChainBreakWarning
51+
~warnings.ChainLengthWarning
52+
~warnings.ChainStrengthWarning
53+
~warnings.EnergyScaleWarning
54+
~warnings.TooFewSamplesWarning
55+
56+
The following functions are supported.
57+
58+
.. autosummary::
59+
:recursive:
60+
:toctree: generated/
61+
:template: autosummary_module_functions.rst
62+
63+
warnings
64+
65+
Related Information
66+
===================
67+
68+
* :ref:`qpu_embedding_intro` and :ref:`qpu_embedding_guidance` describe chains
69+
and how to deal with broken chains.
70+
* :ref:`qpu_basic_config` and :ref:`qpu_solver_configuration` provide basic
71+
and advanced information on configuring QPU parameters and best practices.

dwave/system/warnings.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14+
"""Provides classes and functions for warnings."""
1415

1516
import enum
1617
import logging

0 commit comments

Comments
 (0)