-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve header hierarchy for utils documentation #11923
Changes from 3 commits
0df0d06
023069d
a637306
608d33c
7df1d87
e530b31
3bcdc24
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,27 +18,42 @@ | |
|
||
.. currentmodule:: qiskit.utils | ||
|
||
Deprecations | ||
------------ | ||
|
||
.. autofunction:: add_deprecation_to_docstring | ||
.. autofunction:: deprecate_arg | ||
.. autofunction:: deprecate_arguments | ||
.. autofunction:: deprecate_func | ||
.. autofunction:: deprecate_function | ||
.. autofunction:: local_hardware_info | ||
.. autofunction:: is_main_process | ||
|
||
SI unit conversion | ||
------------------ | ||
|
||
.. autofunction:: apply_prefix | ||
.. autofunction:: detach_prefix | ||
|
||
Class tools | ||
----------- | ||
|
||
.. autofunction:: wrap_method | ||
|
||
Multiprocessing | ||
--------------- | ||
|
||
.. autofunction:: local_hardware_info | ||
.. autofunction:: is_main_process | ||
|
||
Parallel Routines | ||
----------------- | ||
|
||
A helper function for calling a custom function with python | ||
:class:`~concurrent.futures.ProcessPoolExecutor`. Tasks can be executed in parallel using this function. | ||
|
||
.. autofunction:: parallel_map | ||
|
||
Optional Dependency Checkers (:mod:`qiskit.utils.optionals`) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A potential alternative is to give That said, I don't feel strongly, and if this does stay in line, I'm fine to remove the bit from the title. It was originally included for consistency, and because I think the theme at the time didn't document things with fully qualified names. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For it to be its own page in IQP, it will either need to be at the same level as ![]() I'll make your tweaks though. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, I'm fine either inline or separate page. I think I originally made this documentation, and I went inline in the original form too. |
||
============================================================ | ||
Optional Dependency Checkers | ||
---------------------------- | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To stop this mistake happening again, we maybe want to make all the level-2 headings |
||
|
||
.. automodule:: qiskit.utils.optionals | ||
""" | ||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -13,8 +13,8 @@ | |||||
""" | ||||||
.. currentmodule:: qiskit.utils.optionals | ||||||
|
||||||
Qiskit has several features that are enabled only | ||||||
if certain *optional* dependencies are satisfied. This module is a collection of objects that can | ||||||
Qiskit has several features that are enabled only if certain *optional* dependencies | ||||||
are satisfied. The ``qiskit.utils.optionals`` module has a collection of objects that can | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
or something? - I'm not tied to the wording, I just want to make it clearer that this section specifically documents one module, and so the module name is a hyperlink anchor to the same place to drive the point home. (This comment is predicated on the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I thought this was confusing? I can add it back, but it seemed weird to me to click a link and it take you back to the exact spot you're reading. The header will alreadyhave the little button to show it can be an anchor. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If nothing else, not having the (Personally I don't find it confusing - I quite like it when things like the Python docs do it (e.g. https://docs.python.org/3/library/unittest.html)). |
||||||
be used to test if certain functionality is available, and optionally raise | ||||||
:class:`.MissingOptionalLibraryError` if the functionality is not available. | ||||||
|
||||||
|
@@ -52,7 +52,7 @@ | |||||
:widths: 25 75 | ||||||
|
||||||
* - .. py:data:: HAS_CONSTRAINT | ||||||
- `python-constraint <https://github.com/python-constraint/python-constraint>__ is a | ||||||
- `python-constraint <https://github.com/python-constraint/python-constraint>`__ is a | ||||||
constraint satisfaction problem solver, used in the :class:`~.CSPLayout` transpiler pass. | ||||||
|
||||||
* - .. py:data:: HAS_CPLEX | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can maybe stick these "Multiprocessing" functions under "Parallel Routines" with
parallel_map
, or vice versa? I think they're all sufficiently related to avoid an extra section heading.