Skip to content

Commit a156e4d

Browse files
authored
Remove metapackage-specific parts of documentation (Qiskit/qiskit-metapackage#1788)
This removes many sections of the documentation that refer to the metapackage as a whole, the elements of the metapackage, or refer to Terra as Terra. This is intended to be in line with the new branding decisions around the Qiskit project. With the current community management structure still a little up in the air, we are (at least temporarily) removing the repository-decision flowchart from the documentation, since this documentation will primarily be for Qiskit Terra. The contributor flowchart, or something similar, may end up on the landing pages of the Ecosystem documentation, or another community hub. I've left references to "Terra" in place, because those should still logically be removed as part of the general migration in naming within the Terra repository. I've also left the build processes in place that `git clone` Terra and the tutorials; we need those to continue having a working docs build in this repo. They'll get modified as these files get merge to Terra as well, but they need to stay alive here. One of the notable removals is the API docs links to Aer and IBMQ from the main page, since as of the deployed metapackage version (0.44), those are no longer part of the metapackage. Fix Qiskit/qiskit-metapackage#1787. Fix Qiskit/qiskit-metapackage#1778 - mostly; the version logic is _way_ stripped down, and will now automatically work on Terra at least as much as we need when the files are merged. Fix Qiskit/qiskit-metapackage#1667 Fix Qiskit/qiskit-metapackage#1643
1 parent 08b79be commit a156e4d

11 files changed

Lines changed: 154 additions & 481 deletions

docs/conf.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
sys.path.insert(0, os.path.abspath("."))
2626

2727
import custom_extensions
28-
import versionutils
2928

3029
# -- General configuration ---------------------------------------------------
3130

@@ -213,5 +212,5 @@
213212
def setup(app):
214213
custom_extensions.load_terra_docs(app)
215214
custom_extensions.load_tutorials(app)
216-
versionutils.setup(app)
215+
app.connect("config-inited", custom_extensions.add_versions_to_config)
217216
app.connect("build-finished", custom_extensions.clean_docs)

docs/configuration.rst

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,12 @@ behavior of Qiskit.
7979
the use of
8080
`Python multiprocessing <https://docs.python.org/3/library/multiprocessing.html>`__
8181
to parallelize certain operations (for example transpilation over multiple
82-
circuits) in Qiskit Terra.
82+
circuits) in Qiskit.
8383
* ``QISKIT_NUM_PROCS``: Specifies the maximum number of parallel processes to
8484
launch for parallel operations if parallel execution is enabled. It takes an
8585
integer > 0 as the expected value.
8686
* ``RAYON_NUM_THREADS``: Specifies the number of threads to run multithreaded
87-
operations in Qiskit Terra. By default this multithreaded code will launch
87+
operations in Qiskit. By default this multithreaded code will launch
8888
a thread for each logical CPU, if you'd like to adjust the number of threads
8989
Qiskit will use you can set this to an integer value. For example, setting
9090
``RAYON_NUM_THREADS=4`` will only launch 4 threads for multithreaded
@@ -96,16 +96,3 @@ behavior of Qiskit.
9696
This is done to avoid potentially overloading limited CPU resources. However,
9797
if you would like to force the use of multiple threads even when in a
9898
multiprocess context you can set ``QISKIT_FORCE_THREADS=TRUE`` to do this.
99-
* ``QISKIT_IBMQ_PROVIDER_LOG_LEVEL``: Specifies the log level to use, for the
100-
``qiskit-ibmq-provider`` modules. If an invalid level is set, the log level
101-
defaults to WARNING. The valid log levels are ``DEBUG``, ``INFO``,
102-
``WARNING``, ``ERROR``, and ``CRITICAL`` (case-insensitive). If the
103-
environment variable is not set, then the parent logger’s level is used,
104-
which also defaults to ``WARNING``.
105-
* ``QISKIT_IBMQ_PROVIDER_LOG_FILE``: Specifies the name of the log file to
106-
use from log messages originating from ``qiskit-ibmq-provider``. If
107-
specified, messages will be logged to the file only. Otherwise messages will
108-
be logged to the standard error (usually the screen).
109-
* ``QISKIT_AQUA_MAX_GATES_PER_JOB``: An optional parameter to set a threshold
110-
for splitting Aqua generated circuits up into multiple jobs submitted to a
111-
backend based on the number of gates.

docs/contributing_to_qiskit.rst

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,24 +13,11 @@ Before You Start
1313
If you are new to Qiskit contributing we recommend you do the following before diving into the code:
1414

1515
#. Read the `Code of Conduct <https://github.com/Qiskit/qiskit/blob/master/CODE_OF_CONDUCT.md>`__
16-
#. :ref:`Decide what to work on <decide-what-to-work-on>`
1716
#. Read the repo-specific :ref:`Contributing Guidelines <contributing_links>` for the repo you have decided to contribute to.
1817
#. :ref:`Set up your development environment <dev-env-setup>`
1918
#. Familiarize yourself with the Qiskit community (via `Slack <https://qisk.it/join-slack>`__,
2019
`Stack Exchange <https://quantumcomputing.stackexchange.com/>`__, `GitHub <https://github.com/qiskit-community/feedback/discussions>`__ etc.)
2120

22-
23-
.. _decide-what-to-work-on:
24-
25-
************************
26-
Decide What to Work on
27-
************************
28-
29-
If you're not sure what type of contribution is right for you, take a look at the following flowchart to help you:
30-
31-
.. raw:: html
32-
:file: images/contributor-flowchart.svg
33-
3421
.. _contributing_links:
3522

3623
********************************

docs/custom_extensions.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@
1717
import warnings
1818
from pathlib import Path
1919

20+
from sphinx.util import logging
21+
22+
logger = logging.getLogger(__name__)
23+
2024
TERRA_FILES = []
2125
TERRA_DIRS = [
2226
"apidoc",
@@ -74,6 +78,27 @@ def load_tutorials(app):
7478
shutil.copytree(Path(temp_dir, "tutorials", d), Path(app.srcdir, "tutorials", d))
7579

7680

81+
def add_versions_to_config(_app, config):
82+
"""Add a list of old documentation versions that should have links generated to them into the
83+
context, so the theme can use them to generate a sidebar."""
84+
# First 0.x version where Qiskit/Terra and the metapackage aligned on number.
85+
first_unified_zero_minor = 45
86+
87+
# Start with the hardcoded versions of the documentation that were managed while the metapackage
88+
# still existed, so are based on tags that don't exist in the Qiskit package repo.
89+
versions = ["0.19"] + [f"0.{x}" for x in range(24, first_unified_zero_minor)]
90+
91+
proc = subprocess.run(["git", "describe", "--abbrev=0"], capture_output=True, check=True)
92+
current_version = proc.stdout.decode("utf8")
93+
current_version_info = current_version.split(".")
94+
if current_version_info[0] != "0":
95+
raise Exception("TODO: handle major versions")
96+
versions.extend(
97+
f"0.{x}" % x for x in range(first_unified_zero_minor, int(current_version_info[1]) + 1)
98+
)
99+
config.html_context["version_list"] = versions
100+
101+
77102
def clean_docs(app, exc):
78103
"""Deletes the Git cloned docs."""
79104
for d in [*TERRA_DIRS, "tutorials"]:

docs/deprecation_policy.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ Usually, you should set ``additional_msg: str `` with the format ``"Instead, use
143143
people know how to migrate. Read those functions' docstrings for additional arguments like
144144
``pending: bool`` and ``predicate``.
145145

146-
If you are deprecating in a non-Terra repo, set ``package_name``, e.g. to ``qiskit-nature``.
146+
If you are deprecating outside the main Qiskit repo, set ``package_name`` to match your package.
147147
Alternatively, if you prefer to use your own decorator helpers, then have them call
148148
``add_deprecation_to_docstring`` from ``qiskit.utils.deprecation``.
149149

0 commit comments

Comments
 (0)