-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Turns out, none of the inline classes from Qiskit SDK use the rubric like this to set Attributes and Methods. It's a bad example. We also: * Add an index page for API docs * Classify inline_classes as a module page, rather than freeform. This fixes an assumption with qiskit/documentation
- Loading branch information
1 parent
0bc91c2
commit 45f15f9
Showing
8 changed files
with
69 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
============= | ||
API reference | ||
============= | ||
|
||
.. toctree:: | ||
:maxdepth: 1 | ||
|
||
module | ||
inline_classes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,6 @@ | ||
============== | ||
Inline classes | ||
============== | ||
.. _api-example.inline_classes: | ||
|
||
This is a page to test out how we render classes and functions | ||
included inline in the page. This is common with module pages. | ||
|
||
|
||
Important APIs | ||
============== | ||
|
||
Every time you use this program, you'll want to create an instance of | ||
:class:`api_example.inline_classes.SimpleInlineClass`. It has a simple interface: | ||
|
||
.. autoclass:: api_example.inline_classes.SimpleInlineClass | ||
|
||
It can be useful to use free functions rather than the class: | ||
|
||
.. autofunction:: api_example.my_function | ||
:noindex: | ||
|
||
Sometimes, you even need to use a really complex class! | ||
|
||
.. autoclass:: api_example.inline_classes.InlineClassWithMethods | ||
.. automodule:: api_example.inline_classes | ||
:no-members: | ||
:show-inheritance: | ||
|
||
.. rubric:: Attributes | ||
|
||
.. autoattribute:: CLASS_ATTRIBUTE | ||
.. autoattribute:: interest_rate | ||
|
||
.. rubric:: Methods | ||
|
||
.. automethod:: method1 | ||
.. automethod:: method2 | ||
|
||
|
||
Warning: exceptions | ||
------------------- | ||
|
||
The above APIs might raise an exception! Be careful! | ||
|
||
.. autoexception:: api_example.inline_classes.CustomException | ||
|
||
Other prose | ||
=========== | ||
|
||
Blah blah blah. | ||
:no-inherited-members: | ||
:no-special-members: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
-268 Bytes
(100%)
tests/js/tests.js-snapshots/Sphinx-Design-elements-have-no-shadows-1-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-13.9 KB
(91%)
tests/js/tests.js-snapshots/api-docs-inline-classes-1-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-8.28 KB
(80%)
...s/js/tests.js-snapshots/inline-table-of-contents-have-correct-fonts-1-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+2.24 KB
(110%)
tests/js/tests.js-snapshots/left-side-bar-renders-correctly-1-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.