Skip to content

Commit

Permalink
Update conversion pipeline integration test (#1472)
Browse files Browse the repository at this point in the history
qiskit-sphinx-theme was updated to better show inline classes.
  • Loading branch information
Eric-Arellano authored May 31, 2024
1 parent 640bd7a commit b4313d7
Show file tree
Hide file tree
Showing 7 changed files with 395 additions and 47 deletions.
51 changes: 27 additions & 24 deletions scripts/lib/api/__snapshots__/conversionPipeline.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ exports[`qiskit-sphinx-theme: _toc 1`] = `
{
"title": "my_function",
"url": "/api/qiskit-sphinx-theme/api_example.my_function"
},
{
"title": "SimpleInlineClass",
"url": "/api/qiskit-sphinx-theme/inline_classes"
}
]
},
{
"title": "api_example.inline_classes",
"url": "/api/qiskit-sphinx-theme/inline_classes"
}
],
"collapsed": true
Expand Down Expand Up @@ -196,15 +196,27 @@ python_api_name: api_example.my_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: SimpleInlineClass
description: API reference for api_example.inline_classes.SimpleInlineClass
in_page_toc_min_heading_level: 1
python_api_type: class
python_api_name: api_example.inline_classes.SimpleInlineClass
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.
Expand All @@ -223,20 +235,15 @@ Every time you use this program, you’ll want to create an instance of [\`api_e
It can be useful to use free functions rather than the class:
###
### inline\\_function
<Function github="https://github.com/Qiskit/qiskit_sphinx_theme/tree/stable/0.1/api_example.py" signature="api_example.my_function(input1, input2, input3=None, **kwargs)">
<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.
**Raises**
* **ValueError** – If the inputs are not the correct values.
* **TypeError** – If the inputs are not strings.
**Return type**
int
Expand All @@ -253,19 +260,15 @@ Sometimes, you even need to use a really complex class!
Note how the methods and attributes are rendered and indented when this class is inlined on the docs page.
## Attributes
### CLASS\\_ATTRIBUTE
#### CLASS\\_ATTRIBUTE
<Attribute id="api_example.inline_classes.InlineClassWithMethods.CLASS_ATTRIBUTE" attributeTypeHint="str" attributeValue="'An important part of any API.'" />
### interest\\_rate
#### interest\\_rate
<Attribute id="api_example.inline_classes.InlineClassWithMethods.interest_rate" />
## Methods
### method1
#### method1
<Function id="api_example.inline_classes.InlineClassWithMethods.method1" signature="method1()">
A simple method.
Expand All @@ -275,7 +278,7 @@ Sometimes, you even need to use a really complex class!
int
</Function>
### method2
#### method2
<Function id="api_example.inline_classes.InlineClassWithMethods.method2" signature="method2(arg1, arg2, description)">
A method with a lot of args!
Expand Down
Loading

0 comments on commit b4313d7

Please sign in to comment.