From a40a25b6fd23fe24f7ece6fa11e94cca8e7ceaf4 Mon Sep 17 00:00:00 2001 From: Eric Arellano Date: Mon, 22 May 2023 13:09:02 -0600 Subject: [PATCH 1/7] WIP: debug import failure for dagcircuits.exceptions --- docs/maintainers_guide.rst | 27 +-------------------------- tox.ini | 2 +- 2 files changed, 2 insertions(+), 27 deletions(-) diff --git a/docs/maintainers_guide.rst b/docs/maintainers_guide.rst index fcf365b0fbc4..08759fcc1bd3 100644 --- a/docs/maintainers_guide.rst +++ b/docs/maintainers_guide.rst @@ -250,32 +250,7 @@ The module-level docstring For example, as in the previous dagcircuit module example, the contents of the module docstring for ``qiskit/dagcircuit/__init__.py`` would - be:: - - """ - ======================================= - DAG Circuits (:mod:`qiskit.dagcircuit`) - ======================================= - - .. currentmodule:: qiskit.dagcircuit - - DAG Circuits - ============ - - .. autosummary:: - :toctree: ../stubs/ - - DAGCircuit - DAGNode - - Exceptions - ========== - - .. autosummary:: - :toctree: ../stubs/ - - DAGCircuitError - """ + be: .. note:: diff --git a/tox.ini b/tox.ini index 85d97d944411..2007a20ba70b 100644 --- a/tox.ini +++ b/tox.ini @@ -56,7 +56,7 @@ deps = # It does not hurt to also install the package in the `deps` stage. .[all] commands = - sphinx-build -b html {posargs} -d {toxinidir}/docs/.doctrees {toxinidir}/docs/ {toxinidir}/docs/_build/html + sphinx-build -q -b html {posargs} -d {toxinidir}/docs/.doctrees {toxinidir}/docs/ {toxinidir}/docs/_build/html [testenv:docs-clean] skip_install = true From fd8c1b1cf7c031316a1825896161c804dbaf80d9 Mon Sep 17 00:00:00 2001 From: Eric Arellano Date: Wed, 24 May 2023 10:33:37 -0600 Subject: [PATCH 2/7] Revert "WIP: debug import failure for dagcircuits.exceptions" This reverts commit a40a25b6fd23fe24f7ece6fa11e94cca8e7ceaf4. --- docs/maintainers_guide.rst | 27 ++++++++++++++++++++++++++- tox.ini | 2 +- 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/docs/maintainers_guide.rst b/docs/maintainers_guide.rst index 08759fcc1bd3..fcf365b0fbc4 100644 --- a/docs/maintainers_guide.rst +++ b/docs/maintainers_guide.rst @@ -250,7 +250,32 @@ The module-level docstring For example, as in the previous dagcircuit module example, the contents of the module docstring for ``qiskit/dagcircuit/__init__.py`` would - be: + be:: + + """ + ======================================= + DAG Circuits (:mod:`qiskit.dagcircuit`) + ======================================= + + .. currentmodule:: qiskit.dagcircuit + + DAG Circuits + ============ + + .. autosummary:: + :toctree: ../stubs/ + + DAGCircuit + DAGNode + + Exceptions + ========== + + .. autosummary:: + :toctree: ../stubs/ + + DAGCircuitError + """ .. note:: diff --git a/tox.ini b/tox.ini index 2007a20ba70b..85d97d944411 100644 --- a/tox.ini +++ b/tox.ini @@ -56,7 +56,7 @@ deps = # It does not hurt to also install the package in the `deps` stage. .[all] commands = - sphinx-build -q -b html {posargs} -d {toxinidir}/docs/.doctrees {toxinidir}/docs/ {toxinidir}/docs/_build/html + sphinx-build -b html {posargs} -d {toxinidir}/docs/.doctrees {toxinidir}/docs/ {toxinidir}/docs/_build/html [testenv:docs-clean] skip_install = true From 7440da871f7a3c4b8014b1f642975223928ea236 Mon Sep 17 00:00:00 2001 From: Eric Arellano Date: Wed, 24 May 2023 10:37:36 -0600 Subject: [PATCH 3/7] Try double backticks --- docs/maintainers_guide.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/maintainers_guide.rst b/docs/maintainers_guide.rst index fcf365b0fbc4..505afe331302 100644 --- a/docs/maintainers_guide.rst +++ b/docs/maintainers_guide.rst @@ -250,19 +250,19 @@ The module-level docstring For example, as in the previous dagcircuit module example, the contents of the module docstring for ``qiskit/dagcircuit/__init__.py`` would - be:: + be like the below (remove the double backticks if copying from the RST file):: """ ======================================= - DAG Circuits (:mod:`qiskit.dagcircuit`) + DAG Circuits (``:mod:`qiskit.dagcircuit```) ======================================= - .. currentmodule:: qiskit.dagcircuit + ``.. currentmodule::`` qiskit.dagcircuit DAG Circuits ============ - .. autosummary:: + ``.. autosummary::`` :toctree: ../stubs/ DAGCircuit @@ -271,7 +271,7 @@ The module-level docstring Exceptions ========== - .. autosummary:: + ``.. autosummary::`` :toctree: ../stubs/ DAGCircuitError From a4a72c22bdbf5e50f41c05cd24a408750e478893 Mon Sep 17 00:00:00 2001 From: Eric Arellano Date: Wed, 24 May 2023 10:44:08 -0600 Subject: [PATCH 4/7] Fix issue with extlink --- docs/conf.py | 8 +++++--- pyproject.toml | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 085706d44485..2de4a598f210 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -133,9 +133,11 @@ # -- Configuration for extlinks extension ------------------------------------ # Refer to https://www.sphinx-doc.org/en/master/usage/extensions/extlinks.html extlinks = { - "pull_terra": ("https://github.com/Qiskit/qiskit-terra/pull/%s", "#"), - "pull_aer": ("https://github.com/Qiskit/qiskit-aer/pull/%s", "#"), - "pull_ibmq-provider": ("https://github.com/Qiskit/qiskit-ibmq-provider/pull/%s", "#"), + "pull_aer": ("https://github.com/Qiskit/qiskit-aer/pull/%s", "qiskit-aer #%s"), + "pull_ibmq-provider": ( + "https://github.com/Qiskit/qiskit-ibmq-provider/pull/%s", + "qiskit-ibmq-provider #%s", + ), } # -- Options for HTML output ------------------------------------------------- diff --git a/pyproject.toml b/pyproject.toml index f0a74e02df76..da3928183765 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,8 +5,8 @@ build-backend = "setuptools.build_meta" [tool.black] line-length = 100 target-version = ["py37", "py38", "py39", "py310", "py311"] -extend-exclude = "test/benchmarks/" +extend-exclude = ["test/benchmarks/", "docs/plot_directive/"] [tool.isort] profile = "black" -extend_skip_glob = "test/benchmarks/**" +extend_skip_glob = ["test/benchmarks/**", "docs/plot_directive/**"] From 3415c0e68c024bb25891a186690fcba45826a2c9 Mon Sep 17 00:00:00 2001 From: Eric Arellano Date: Wed, 24 May 2023 11:48:31 -0600 Subject: [PATCH 5/7] Fix loading of versionutils --- docs/conf.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index 2de4a598f210..e600eafaa4b6 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -28,6 +28,7 @@ import custom_extensions import url_redirects +import versionutils # -- General configuration --------------------------------------------------- @@ -219,6 +220,6 @@ def setup(app): custom_extensions.load_api_sources(app) custom_extensions.load_tutorials(app) - app.setup_extension("versionutils") + versionutils.setup(app) app.connect("build-finished", custom_extensions.clean_api_source) app.connect("build-finished", custom_extensions.clean_tutorials) From 46d00c1c6c310576e7e23309dcddd6118c7932f2 Mon Sep 17 00:00:00 2001 From: Eric Arellano Date: Tue, 30 May 2023 16:42:01 -0600 Subject: [PATCH 6/7] Revert maintainers guide change for now --- docs/maintainers_guide.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/maintainers_guide.rst b/docs/maintainers_guide.rst index 505afe331302..fcf365b0fbc4 100644 --- a/docs/maintainers_guide.rst +++ b/docs/maintainers_guide.rst @@ -250,19 +250,19 @@ The module-level docstring For example, as in the previous dagcircuit module example, the contents of the module docstring for ``qiskit/dagcircuit/__init__.py`` would - be like the below (remove the double backticks if copying from the RST file):: + be:: """ ======================================= - DAG Circuits (``:mod:`qiskit.dagcircuit```) + DAG Circuits (:mod:`qiskit.dagcircuit`) ======================================= - ``.. currentmodule::`` qiskit.dagcircuit + .. currentmodule:: qiskit.dagcircuit DAG Circuits ============ - ``.. autosummary::`` + .. autosummary:: :toctree: ../stubs/ DAGCircuit @@ -271,7 +271,7 @@ The module-level docstring Exceptions ========== - ``.. autosummary::`` + .. autosummary:: :toctree: ../stubs/ DAGCircuitError From bd655bdc46a21c480cb8dccf1c2b08e965e98bbc Mon Sep 17 00:00:00 2001 From: Eric Arellano Date: Wed, 31 May 2023 08:26:38 -0600 Subject: [PATCH 7/7] Add Terra back --- docs/conf.py | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/conf.py b/docs/conf.py index e49fad46de2b..f57dc7f879ea 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -128,6 +128,7 @@ # -- Configuration for extlinks extension ------------------------------------ # Refer to https://www.sphinx-doc.org/en/master/usage/extensions/extlinks.html extlinks = { + "pull_terra": ("https://github.com/Qiskit/qiskit-terra/pull/%s", "qiskit-terra #%s"), "pull_aer": ("https://github.com/Qiskit/qiskit-aer/pull/%s", "qiskit-aer #%s"), "pull_ibmq-provider": ( "https://github.com/Qiskit/qiskit-ibmq-provider/pull/%s",