374 lines
10 KiB
Plaintext
374 lines
10 KiB
Plaintext
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||
|
||
exports[`qiskit-sphinx-theme: _package 1`] = `
|
||
"{
|
||
"name": "qiskit-sphinx-theme",
|
||
"version": "0.1.1"
|
||
}
|
||
"
|
||
`;
|
||
|
||
exports[`qiskit-sphinx-theme: _toc 1`] = `
|
||
"{
|
||
"title": "Qiskit Sphinx Theme",
|
||
"children": [
|
||
{
|
||
"title": "API index",
|
||
"url": "/api/qiskit-sphinx-theme"
|
||
},
|
||
{
|
||
"title": "api_example",
|
||
"children": [
|
||
{
|
||
"title": "Module overview",
|
||
"url": "/api/qiskit-sphinx-theme/module"
|
||
},
|
||
{
|
||
"title": "Electron",
|
||
"url": "/api/qiskit-sphinx-theme/api_example.Electron"
|
||
},
|
||
{
|
||
"title": "my_function1",
|
||
"url": "/api/qiskit-sphinx-theme/api_example.my_function1"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"title": "api_example.inline_classes",
|
||
"url": "/api/qiskit-sphinx-theme/inline_classes"
|
||
}
|
||
],
|
||
"collapsed": true
|
||
}
|
||
"
|
||
`;
|
||
|
||
exports[`qiskit-sphinx-theme: api_example.Electron 1`] = `
|
||
"---
|
||
title: Electron
|
||
description: API reference for api_example.Electron
|
||
in_page_toc_min_heading_level: 1
|
||
python_api_type: class
|
||
python_api_name: api_example.Electron
|
||
---
|
||
|
||
# Electron
|
||
|
||
<Class id="api_example.Electron" isDedicatedPage={true} github="https://github.com/Qiskit/qiskit_sphinx_theme/tree/stable/0.1/api_example/electron.py" signature="api_example.Electron(size=None, name=None)" modifiers="class">
|
||
Bases: \`object\`
|
||
|
||
A representation of an electron.
|
||
|
||
**Examples**
|
||
|
||
\`\`\`python
|
||
from api_example import Electron
|
||
|
||
ELECTRON = Electron(size="2GB", name="QuantumComputing")
|
||
\`\`\`
|
||
|
||
### size
|
||
|
||
<Attribute id="api_example.Electron.size">
|
||
How big the Electron is.
|
||
|
||
**Type**
|
||
|
||
str
|
||
</Attribute>
|
||
|
||
### name
|
||
|
||
<Attribute id="api_example.Electron.name">
|
||
What the Electron is called.
|
||
</Attribute>
|
||
|
||
Create an electron.
|
||
|
||
**Parameters**
|
||
|
||
* **size** (*str*) – How big should this thing be?
|
||
* **name** (*str*) – The name we’ll call the electron. Nicknames preferred.
|
||
|
||
**Raises**
|
||
|
||
**ValueError** – You did something wrong
|
||
|
||
## Attributes
|
||
|
||
### CLASS\\_ATTRIBUTE
|
||
|
||
<Attribute id="api_example.Electron.CLASS_ATTRIBUTE" attributeValue="re.compile('abc')" />
|
||
|
||
### charge
|
||
|
||
<Attribute id="api_example.Electron.charge" />
|
||
|
||
### mass
|
||
|
||
<Attribute id="api_example.Electron.mass">
|
||
The mass of the electron.
|
||
</Attribute>
|
||
|
||
### really\\_long\\_named\\_attribute\\_that\\_probably\\_does\\_not\\_fit\\_nicely
|
||
|
||
<Attribute id="api_example.Electron.really_long_named_attribute_that_probably_does_not_fit_nicely">
|
||
A bit too verbose if you ask me.
|
||
</Attribute>
|
||
|
||
## Methods
|
||
|
||
### compute\\_momentum
|
||
|
||
<Function id="api_example.Electron.compute_momentum" signature="compute_momentum(velocity)">
|
||
Compute the electron’s velocity.
|
||
|
||
**Parameters**
|
||
|
||
**velocity** (*float*) – The electron’s velocity
|
||
|
||
**Returns**
|
||
|
||
The computed momentum.
|
||
|
||
**Raises**
|
||
|
||
**ValueError** – You did something wrong
|
||
|
||
**Return type**
|
||
|
||
float
|
||
</Function>
|
||
|
||
### method\\_with\\_a\\_reallyyreallreallyreallyreallyreallyreallreallyreallyreallyreally\\_long\\_title
|
||
|
||
<Function id="api_example.Electron.method_with_a_reallyyreallreallyreallyreallyreallyreallreallyreallyreallyreally_long_title" signature="method_with_a_reallyyreallreallyreallyreallyreallyreallreallyreallyreallyreally_long_title()">
|
||
blahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblah
|
||
</Function>
|
||
|
||
### overloaded\\_func
|
||
|
||
<Function id="api_example.Electron.overloaded_func" signature="overloaded_func(arg1: tuple[str, str], arg2: list[str], arg3: int, arg4: Electron) → None" extraSignatures={["overloaded_func(arg1: tuple[int, int], arg2: list[int], arg3: bool, arg4: set[Electron]) → None"]}>
|
||
This is meant to test out [https://github.com/Qiskit/qiskit\\_sphinx\\_theme/pull/319](https://github.com/Qiskit/qiskit_sphinx_theme/pull/319).
|
||
|
||
**Parameters**
|
||
|
||
* **arg1** – Tuples ftw!
|
||
* **arg2** – But lists are more flexy.
|
||
* **arg3** – Primitive values are good too.
|
||
* **arg4** – Recursionnnnn.
|
||
</Function>
|
||
</Class>
|
||
|
||
"
|
||
`;
|
||
|
||
exports[`qiskit-sphinx-theme: api_example.my_function1 1`] = `
|
||
"---
|
||
title: my_function1
|
||
description: API reference for api_example.my_function1
|
||
in_page_toc_min_heading_level: 1
|
||
python_api_type: function
|
||
python_api_name: api_example.my_function1
|
||
---
|
||
|
||
<span id="api-example-my-function1" />
|
||
|
||
# api\\_example.my\\_function1
|
||
|
||
<Function id="api_example.my_function1" isDedicatedPage={true} github="https://github.com/Qiskit/qiskit_sphinx_theme/tree/stable/0.1/api_example.py" signature="api_example.my_function1(input1, input2, input3=None, **kwargs)">
|
||
A function that does awesome stuff.
|
||
|
||
**Returns**
|
||
|
||
Did the function work.
|
||
|
||
**Raises**
|
||
|
||
* **ValueError** – If the inputs are not the correct values.
|
||
* **TypeError** – If the inputs are not strings.
|
||
|
||
**Return type**
|
||
|
||
int
|
||
</Function>
|
||
|
||
"
|
||
`;
|
||
|
||
exports[`qiskit-sphinx-theme: index 1`] = `
|
||
"# API reference
|
||
|
||
* [API example (\`api_example\`)](module)
|
||
* [Inline classes](inline_classes)
|
||
"
|
||
`;
|
||
|
||
exports[`qiskit-sphinx-theme: inline_classes 1`] = `
|
||
"---
|
||
title: inline_classes
|
||
description: API reference for api_example.inline_classes
|
||
in_page_toc_min_heading_level: 2
|
||
python_api_type: module
|
||
python_api_name: api_example.inline_classes
|
||
---
|
||
|
||
<span id="module-api_example.inline_classes" />
|
||
|
||
<span id="api-example-inline-classes" />
|
||
|
||
# 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 [\`api_example.inline_classes.SimpleInlineClass\`](#api_example.inline_classes.SimpleInlineClass "api_example.inline_classes.SimpleInlineClass"). It has a simple interface:
|
||
|
||
### SimpleInlineClass
|
||
|
||
<Class id="api_example.inline_classes.SimpleInlineClass" github="https://github.com/Qiskit/qiskit_sphinx_theme/tree/stable/0.1/api_example/inline_classes.py" signature="api_example.inline_classes.SimpleInlineClass(arg1)" modifiers="class">
|
||
This is a simple class that does not have any methods or attributes.
|
||
|
||
It only has the class description and constructor. Many classes in Qiskit docs are simple like this.
|
||
</Class>
|
||
|
||
It can be useful to use free functions rather than the class:
|
||
|
||
### inline\\_function
|
||
|
||
<Function id="api_example.inline_classes.inline_function" github="https://github.com/Qiskit/qiskit_sphinx_theme/tree/stable/0.1/api_example/inline_classes.py" signature="api_example.inline_classes.inline_function(input1, input2)">
|
||
A function that does awesome stuff.
|
||
|
||
**Returns**
|
||
|
||
Did the function work.
|
||
|
||
**Return type**
|
||
|
||
int
|
||
</Function>
|
||
|
||
Sometimes, you even need to use a really complex class!
|
||
|
||
### InlineClassWithMethods
|
||
|
||
<Class id="api_example.inline_classes.InlineClassWithMethods" github="https://github.com/Qiskit/qiskit_sphinx_theme/tree/stable/0.1/api_example/inline_classes.py" signature="api_example.inline_classes.InlineClassWithMethods" modifiers="class">
|
||
Bases: \`object\`
|
||
|
||
This class is more involved.
|
||
|
||
Note how the methods and attributes are rendered and indented when this class is inlined on the docs page.
|
||
|
||
#### CLASS\\_ATTRIBUTE
|
||
|
||
<Attribute id="api_example.inline_classes.InlineClassWithMethods.CLASS_ATTRIBUTE" attributeTypeHint="str" attributeValue="'An important part of any API.'" />
|
||
|
||
#### interest\\_rate
|
||
|
||
<Attribute id="api_example.inline_classes.InlineClassWithMethods.interest_rate" />
|
||
|
||
#### method1
|
||
|
||
<Function id="api_example.inline_classes.InlineClassWithMethods.method1" signature="method1()">
|
||
A simple method.
|
||
|
||
**Return type**
|
||
|
||
int
|
||
</Function>
|
||
|
||
#### method2
|
||
|
||
<Function id="api_example.inline_classes.InlineClassWithMethods.method2" signature="method2(arg1, arg2, description)">
|
||
A method with a lot of args!
|
||
|
||
This method will use a Hamiltonian to reach quantum advantage. Hamilton: great play & the secret to quantum computing. What a polymath.
|
||
|
||
**Parameters**
|
||
|
||
* **arg1** (*int | float*) – All numbers accepted.
|
||
* **arg2** (*list\\[*[*InlineClassWithMethods*](#api_example.inline_classes.InlineClassWithMethods "api_example.inline_classes.InlineClassWithMethods")*]*) – A list of other instances, although these will be discarded.
|
||
* **description** (*str*) – If your description is too boring or too cryptic, this program will crash your computer.
|
||
|
||
**Return type**
|
||
|
||
tuple\\[int, [*InlineClassWithMethods*](#api_example.inline_classes.InlineClassWithMethods "api_example.inline_classes.InlineClassWithMethods")]
|
||
</Function>
|
||
</Class>
|
||
|
||
### Warning: exceptions
|
||
|
||
The above APIs might raise an exception! Be careful!
|
||
|
||
#### CustomException
|
||
|
||
<Class id="api_example.inline_classes.CustomException" github="https://github.com/Qiskit/qiskit_sphinx_theme/tree/stable/0.1/api_example/inline_classes.py" signature="api_example.inline_classes.CustomException" modifiers="exception">
|
||
See how exceptions render too.
|
||
</Class>
|
||
|
||
## Other prose
|
||
|
||
Blah blah blah.
|
||
|
||
"
|
||
`;
|
||
|
||
exports[`qiskit-sphinx-theme: module 1`] = `
|
||
"---
|
||
title: api_example
|
||
description: API reference for api_example
|
||
in_page_toc_min_heading_level: 2
|
||
python_api_type: module
|
||
python_api_name: api_example
|
||
---
|
||
|
||
<span id="api-example-api-example" />
|
||
|
||
<span id="module-api_example" />
|
||
|
||
# API example
|
||
|
||
<span id="module-api_example" />
|
||
|
||
\`api_example\`
|
||
|
||
Welcome to my super cool module!
|
||
|
||
<Admonition title="Note" type="note">
|
||
This is an example!
|
||
</Admonition>
|
||
|
||
Testing internal references… [\`Electron.compute_momentum()\`](api_example.Electron#compute_momentum "api_example.Electron.compute_momentum").
|
||
|
||
## Contents
|
||
|
||
| | |
|
||
| ------------------------------------------------------------------------------------------------ | ----------------------------------- |
|
||
| [\`Electron\`](api_example.Electron "api_example.Electron")(\\[size, name]) | A representation of an electron. |
|
||
| [\`my_function1\`](api_example.my_function1 "api_example.my_function1")(input1, input2\\[, input3]) | A function that does awesome stuff. |
|
||
|
||
## Functions
|
||
|
||
### my\\_function2
|
||
|
||
<Function id="api_example.my_function2" github="https://github.com/Qiskit/qiskit_sphinx_theme/tree/stable/0.1/api_example.py" signature="api_example.my_function2(input1, input2, input3=None, **kwargs)">
|
||
A function that does awesome stuff.
|
||
|
||
**Returns**
|
||
|
||
Did the function work.
|
||
|
||
**Raises**
|
||
|
||
* **ValueError** – If the inputs are not the correct values.
|
||
* **TypeError** – If the inputs are not strings.
|
||
|
||
**Return type**
|
||
|
||
int
|
||
</Function>
|
||
|
||
"
|
||
`;
|