Skip to content

Commit 0f0ff6f

Browse files
Fix function ID in integration test (#1474)
The name of the function was missing due to duplicate IDs.
1 parent b4313d7 commit 0f0ff6f

File tree

6 files changed

+83
-80
lines changed

6 files changed

+83
-80
lines changed

scripts/lib/api/__snapshots__/conversionPipeline.test.ts.snap

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ exports[`qiskit-sphinx-theme: _toc 1`] = `
2828
"url": "/api/qiskit-sphinx-theme/api_example.Electron"
2929
},
3030
{
31-
"title": "my_function",
32-
"url": "/api/qiskit-sphinx-theme/api_example.my_function"
31+
"title": "my_function1",
32+
"url": "/api/qiskit-sphinx-theme/api_example.my_function1"
3333
}
3434
]
3535
},
@@ -163,20 +163,20 @@ python_api_name: api_example.Electron
163163
"
164164
`;
165165

166-
exports[`qiskit-sphinx-theme: api_example.my_function 1`] = `
166+
exports[`qiskit-sphinx-theme: api_example.my_function1 1`] = `
167167
"---
168-
title: my_function
169-
description: API reference for api_example.my_function
168+
title: my_function1
169+
description: API reference for api_example.my_function1
170170
in_page_toc_min_heading_level: 1
171171
python_api_type: function
172-
python_api_name: api_example.my_function
172+
python_api_name: api_example.my_function1
173173
---
174174
175-
<span id="api-example-my-function" />
175+
<span id="api-example-my-function1" />
176176
177-
# api\\_example.my\\_function
177+
# api\\_example.my\\_function1
178178
179-
<Function id="api_example.my_function" isDedicatedPage={true} 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)">
179+
<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)">
180180
A function that does awesome stuff.
181181
182182
**Returns**
@@ -343,16 +343,16 @@ Testing internal references… [\`Electron.compute_momentum()\`](api_example.Ele
343343
344344
## Contents
345345
346-
| | |
347-
| --------------------------------------------------------------------------------------------- | ----------------------------------- |
348-
| [\`Electron\`](api_example.Electron "api_example.Electron")(\\[size, name]) | A representation of an electron. |
349-
| [\`my_function\`](api_example.my_function "api_example.my_function")(input1, input2\\[, input3]) | A function that does awesome stuff. |
346+
| | |
347+
| ------------------------------------------------------------------------------------------------ | ----------------------------------- |
348+
| [\`Electron\`](api_example.Electron "api_example.Electron")(\\[size, name]) | A representation of an electron. |
349+
| [\`my_function1\`](api_example.my_function1 "api_example.my_function1")(input1, input2\\[, input3]) | A function that does awesome stuff. |
350350
351351
## Functions
352352
353-
###
353+
### my\\_function2
354354
355-
<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)">
355+
<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)">
356356
A function that does awesome stuff.
357357
358358
**Returns**

scripts/lib/api/testdata/qiskit-sphinx-theme/apidoc/index.html

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<link rel="stylesheet" type="text/css" href="../_static/styles/furo.css?v=135e06be" />
1111
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=a746c00c" />
1212
<link rel="stylesheet" type="text/css" href="../_static/styles/qiskit-sphinx-theme.css?v=9e3589df" />
13-
<link rel="stylesheet" type="text/css" href="../_static/jupyter-sphinx.css?v=572af1d6" />
13+
<link rel="stylesheet" type="text/css" href="../_static/jupyter-sphinx.css" />
1414
<link rel="stylesheet" type="text/css" href="../_static/copybutton.css?v=76b2166b" />
1515
<link rel="stylesheet" type="text/css" href="../_static/design-style.1e8bd061cd6da7fc9cf755528e8ffc24.min.css?v=0a3b3ea7" />
1616
<link rel="stylesheet" type="text/css" href="../_static/styles/furo-extensions.css?v=36a5483c" />
@@ -163,28 +163,28 @@
163163
<input type="hidden" name="area" value="default">
164164
</form>
165165
<div id="searchbox"></div><div class="sidebar-scroll"><div class="sidebar-tree">
166-
<ul>
166+
<ul class="current">
167167
<li class="toctree-l1"><a class="reference internal" href="../index.html">Documentation Home</a></li>
168168
<li class="toctree-l1"><a class="reference internal" href="../sphinx_guide/lists.html">Lists</a></li>
169169
<li class="toctree-l1"><a class="reference internal" href="../sphinx_guide/tables.html">Tables</a></li>
170170
<li class="toctree-l1"><a class="reference internal" href="../sphinx_guide/panels.html">Panels</a></li>
171171
<li class="toctree-l1"><a class="reference internal" href="../sphinx_guide/images.html">Images</a></li>
172172
<li class="toctree-l1"><a class="reference internal" href="../sphinx_guide/paragraph.html">Paragraph Level Markup</a></li>
173173
<li class="toctree-l1"><a class="reference internal" href="../sphinx_guide/structural.html">Generic formatting</a></li>
174+
<li class="toctree-l1 current has-children current-page"><a class="current reference internal" href="#">API Reference</a><input checked="" class="toctree-checkbox" id="toctree-checkbox-1" name="toctree-checkbox-1" role="switch" type="checkbox"/><label for="toctree-checkbox-1"><div class="visually-hidden">Toggle navigation of API Reference</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul>
175+
<li class="toctree-l2 has-children"><a class="reference internal" href="module.html">API example (<code class="xref py py-mod docutils literal notranslate"><span class="pre">api_example</span></code>)</a><input class="toctree-checkbox" id="toctree-checkbox-2" name="toctree-checkbox-2" role="switch" type="checkbox"/><label for="toctree-checkbox-2"><div class="visually-hidden">Toggle navigation of API example (api_example)</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul>
176+
<li class="toctree-l3"><a class="reference internal" href="../stubs/api_example.Electron.html">Electron</a></li>
177+
<li class="toctree-l3"><a class="reference internal" href="../stubs/api_example.my_function1.html">api_example.my_function1</a></li>
174178
</ul>
175-
<p class="caption" role="heading"><span class="caption-text">API</span></p>
176-
<ul>
177-
<li class="toctree-l1 has-children"><a class="reference internal" href="module.html"> Autodoc</a><input class="toctree-checkbox" id="toctree-checkbox-1" name="toctree-checkbox-1" role="switch" type="checkbox"/><label for="toctree-checkbox-1"><div class="visually-hidden">Toggle navigation of Autodoc</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul>
178-
<li class="toctree-l2"><a class="reference internal" href="../stubs/api_example.Electron.html">Electron</a></li>
179-
<li class="toctree-l2"><a class="reference internal" href="../stubs/api_example.my_function.html">api_example.my_function</a></li>
179+
</li>
180+
<li class="toctree-l2"><a class="reference internal" href="inline_classes.html">Inline classes</a></li>
180181
</ul>
181182
</li>
182-
<li class="toctree-l1"><a class="reference internal" href="inline_classes.html"> Inline classes</a></li>
183183
</ul>
184184
<p class="caption" role="heading"><span class="caption-text">Special elements</span></p>
185185
<ul>
186186
<li class="toctree-l1"><a class="reference internal" href="../sphinx_guide/jupyter.html">Jupyter</a></li>
187-
<li class="toctree-l1 has-children"><a class="reference internal" href="../sphinx_guide/notebook_gallery.html">Tutorials</a><input class="toctree-checkbox" id="toctree-checkbox-2" name="toctree-checkbox-2" role="switch" type="checkbox"/><label for="toctree-checkbox-2"><div class="visually-hidden">Toggle navigation of Tutorials</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul>
187+
<li class="toctree-l1 has-children"><a class="reference internal" href="../sphinx_guide/notebook_gallery.html">Tutorials</a><input class="toctree-checkbox" id="toctree-checkbox-3" name="toctree-checkbox-3" role="switch" type="checkbox"/><label for="toctree-checkbox-3"><div class="visually-hidden">Toggle navigation of Tutorials</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul>
188188
<li class="toctree-l2"><a class="reference internal" href="../sphinx_guide/notebook.html">My tutorial with a long title</a></li>
189189
<li class="toctree-l2"><a class="reference internal" href="../sphinx_guide/notebook2.html">Tutorial #2</a></li>
190190
</ul>

scripts/lib/api/testdata/qiskit-sphinx-theme/apidoc/inline_classes.html

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
<head><meta charset="utf-8"/>
44
<meta name="viewport" content="width=device-width,initial-scale=1"/>
55
<meta name="color-scheme" content="light dark"><meta name="viewport" content="width=device-width, initial-scale=1" />
6-
<link rel="index" title="Index" href="../genindex.html" /><link rel="search" title="Search" href="../search.html" /><link rel="next" title="Jupyter" href="../sphinx_guide/jupyter.html" /><link rel="prev" title="api_example.my_function" href="../stubs/api_example.my_function.html" />
6+
<link rel="index" title="Index" href="../genindex.html" /><link rel="search" title="Search" href="../search.html" /><link rel="next" title="Jupyter" href="../sphinx_guide/jupyter.html" /><link rel="prev" title="api_example.my_function1" href="../stubs/api_example.my_function1.html" />
77

88
<!-- Generated with Sphinx 7.2.6 and Furo 2024.01.29 -->
99
<title>Inline classes - Example Docs 9.99</title>
1010
<link rel="stylesheet" type="text/css" href="../_static/styles/furo.css?v=135e06be" />
1111
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=a746c00c" />
1212
<link rel="stylesheet" type="text/css" href="../_static/styles/qiskit-sphinx-theme.css?v=9e3589df" />
13-
<link rel="stylesheet" type="text/css" href="../_static/jupyter-sphinx.css?v=572af1d6" />
13+
<link rel="stylesheet" type="text/css" href="../_static/jupyter-sphinx.css" />
1414
<link rel="stylesheet" type="text/css" href="../_static/copybutton.css?v=76b2166b" />
1515
<link rel="stylesheet" type="text/css" href="../_static/design-style.1e8bd061cd6da7fc9cf755528e8ffc24.min.css?v=0a3b3ea7" />
1616
<link rel="stylesheet" type="text/css" href="../_static/styles/furo-extensions.css?v=36a5483c" />
@@ -163,28 +163,28 @@
163163
<input type="hidden" name="area" value="default">
164164
</form>
165165
<div id="searchbox"></div><div class="sidebar-scroll"><div class="sidebar-tree">
166-
<ul>
166+
<ul class="current">
167167
<li class="toctree-l1"><a class="reference internal" href="../index.html">Documentation Home</a></li>
168168
<li class="toctree-l1"><a class="reference internal" href="../sphinx_guide/lists.html">Lists</a></li>
169169
<li class="toctree-l1"><a class="reference internal" href="../sphinx_guide/tables.html">Tables</a></li>
170170
<li class="toctree-l1"><a class="reference internal" href="../sphinx_guide/panels.html">Panels</a></li>
171171
<li class="toctree-l1"><a class="reference internal" href="../sphinx_guide/images.html">Images</a></li>
172172
<li class="toctree-l1"><a class="reference internal" href="../sphinx_guide/paragraph.html">Paragraph Level Markup</a></li>
173173
<li class="toctree-l1"><a class="reference internal" href="../sphinx_guide/structural.html">Generic formatting</a></li>
174+
<li class="toctree-l1 current has-children"><a class="reference internal" href="index.html">API Reference</a><input checked="" class="toctree-checkbox" id="toctree-checkbox-1" name="toctree-checkbox-1" role="switch" type="checkbox"/><label for="toctree-checkbox-1"><div class="visually-hidden">Toggle navigation of API Reference</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul class="current">
175+
<li class="toctree-l2 has-children"><a class="reference internal" href="module.html">API example (<code class="xref py py-mod docutils literal notranslate"><span class="pre">api_example</span></code>)</a><input class="toctree-checkbox" id="toctree-checkbox-2" name="toctree-checkbox-2" role="switch" type="checkbox"/><label for="toctree-checkbox-2"><div class="visually-hidden">Toggle navigation of API example (api_example)</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul>
176+
<li class="toctree-l3"><a class="reference internal" href="../stubs/api_example.Electron.html">Electron</a></li>
177+
<li class="toctree-l3"><a class="reference internal" href="../stubs/api_example.my_function1.html">api_example.my_function1</a></li>
174178
</ul>
175-
<p class="caption" role="heading"><span class="caption-text">API</span></p>
176-
<ul class="current">
177-
<li class="toctree-l1 has-children"><a class="reference internal" href="module.html"> Autodoc</a><input class="toctree-checkbox" id="toctree-checkbox-1" name="toctree-checkbox-1" role="switch" type="checkbox"/><label for="toctree-checkbox-1"><div class="visually-hidden">Toggle navigation of Autodoc</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul>
178-
<li class="toctree-l2"><a class="reference internal" href="../stubs/api_example.Electron.html">Electron</a></li>
179-
<li class="toctree-l2"><a class="reference internal" href="../stubs/api_example.my_function.html">api_example.my_function</a></li>
179+
</li>
180+
<li class="toctree-l2 current current-page"><a class="current reference internal" href="#">Inline classes</a></li>
180181
</ul>
181182
</li>
182-
<li class="toctree-l1 current current-page"><a class="current reference internal" href="#"> Inline classes</a></li>
183183
</ul>
184184
<p class="caption" role="heading"><span class="caption-text">Special elements</span></p>
185185
<ul>
186186
<li class="toctree-l1"><a class="reference internal" href="../sphinx_guide/jupyter.html">Jupyter</a></li>
187-
<li class="toctree-l1 has-children"><a class="reference internal" href="../sphinx_guide/notebook_gallery.html">Tutorials</a><input class="toctree-checkbox" id="toctree-checkbox-2" name="toctree-checkbox-2" role="switch" type="checkbox"/><label for="toctree-checkbox-2"><div class="visually-hidden">Toggle navigation of Tutorials</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul>
187+
<li class="toctree-l1 has-children"><a class="reference internal" href="../sphinx_guide/notebook_gallery.html">Tutorials</a><input class="toctree-checkbox" id="toctree-checkbox-3" name="toctree-checkbox-3" role="switch" type="checkbox"/><label for="toctree-checkbox-3"><div class="visually-hidden">Toggle navigation of Tutorials</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul>
188188
<li class="toctree-l2"><a class="reference internal" href="../sphinx_guide/notebook.html">My tutorial with a long title</a></li>
189189
<li class="toctree-l2"><a class="reference internal" href="../sphinx_guide/notebook2.html">Tutorial #2</a></li>
190190
</ul>
@@ -395,14 +395,14 @@ <h2>Other prose<a class="headerlink" href="#other-prose" title="Link to this hea
395395
</div>
396396
<svg class="furo-related-icon"><use href="#svg-arrow-right"></use></svg>
397397
</a>
398-
<a class="prev-page" href="../stubs/api_example.my_function.html">
398+
<a class="prev-page" href="../stubs/api_example.my_function1.html">
399399
<svg class="furo-related-icon"><use href="#svg-arrow-right"></use></svg>
400400
<div class="page-info">
401401
<div class="context">
402402
<span>Previous</span>
403403
</div>
404404

405-
<div class="title">api_example.my_function</div>
405+
<div class="title">api_example.my_function1</div>
406406

407407
</div>
408408
</a>

0 commit comments

Comments
 (0)