Skip to content

Commit

Permalink
Fix function ID in integration test (#1474)
Browse files Browse the repository at this point in the history
The name of the function was missing due to duplicate IDs.
  • Loading branch information
Eric-Arellano authored May 31, 2024
1 parent b4313d7 commit 0f0ff6f
Show file tree
Hide file tree
Showing 6 changed files with 83 additions and 80 deletions.
30 changes: 15 additions & 15 deletions scripts/lib/api/__snapshots__/conversionPipeline.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ exports[`qiskit-sphinx-theme: _toc 1`] = `
"url": "/api/qiskit-sphinx-theme/api_example.Electron"
},
{
"title": "my_function",
"url": "/api/qiskit-sphinx-theme/api_example.my_function"
"title": "my_function1",
"url": "/api/qiskit-sphinx-theme/api_example.my_function1"
}
]
},
Expand Down Expand Up @@ -163,20 +163,20 @@ python_api_name: api_example.Electron
"
`;

exports[`qiskit-sphinx-theme: api_example.my_function 1`] = `
exports[`qiskit-sphinx-theme: api_example.my_function1 1`] = `
"---
title: my_function
description: API reference for api_example.my_function
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_function
python_api_name: api_example.my_function1
---
<span id="api-example-my-function" />
<span id="api-example-my-function1" />
# api\\_example.my\\_function
# api\\_example.my\\_function1
<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)">
<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**
Expand Down Expand Up @@ -343,16 +343,16 @@ Testing internal references… [\`Electron.compute_momentum()\`](api_example.Ele
## Contents
| | |
| --------------------------------------------------------------------------------------------- | ----------------------------------- |
| [\`Electron\`](api_example.Electron "api_example.Electron")(\\[size, name]) | A representation of an electron. |
| [\`my_function\`](api_example.my_function "api_example.my_function")(input1, input2\\[, input3]) | A function that does awesome stuff. |
| | |
| ------------------------------------------------------------------------------------------------ | ----------------------------------- |
| [\`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 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.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**
Expand Down
18 changes: 9 additions & 9 deletions scripts/lib/api/testdata/qiskit-sphinx-theme/apidoc/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<link rel="stylesheet" type="text/css" href="../_static/styles/furo.css?v=135e06be" />
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=a746c00c" />
<link rel="stylesheet" type="text/css" href="../_static/styles/qiskit-sphinx-theme.css?v=9e3589df" />
<link rel="stylesheet" type="text/css" href="../_static/jupyter-sphinx.css?v=572af1d6" />
<link rel="stylesheet" type="text/css" href="../_static/jupyter-sphinx.css" />
<link rel="stylesheet" type="text/css" href="../_static/copybutton.css?v=76b2166b" />
<link rel="stylesheet" type="text/css" href="../_static/design-style.1e8bd061cd6da7fc9cf755528e8ffc24.min.css?v=0a3b3ea7" />
<link rel="stylesheet" type="text/css" href="../_static/styles/furo-extensions.css?v=36a5483c" />
Expand Down Expand Up @@ -163,28 +163,28 @@
<input type="hidden" name="area" value="default">
</form>
<div id="searchbox"></div><div class="sidebar-scroll"><div class="sidebar-tree">
<ul>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../index.html">Documentation Home</a></li>
<li class="toctree-l1"><a class="reference internal" href="../sphinx_guide/lists.html">Lists</a></li>
<li class="toctree-l1"><a class="reference internal" href="../sphinx_guide/tables.html">Tables</a></li>
<li class="toctree-l1"><a class="reference internal" href="../sphinx_guide/panels.html">Panels</a></li>
<li class="toctree-l1"><a class="reference internal" href="../sphinx_guide/images.html">Images</a></li>
<li class="toctree-l1"><a class="reference internal" href="../sphinx_guide/paragraph.html">Paragraph Level Markup</a></li>
<li class="toctree-l1"><a class="reference internal" href="../sphinx_guide/structural.html">Generic formatting</a></li>
<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>
<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>
<li class="toctree-l3"><a class="reference internal" href="../stubs/api_example.Electron.html">Electron</a></li>
<li class="toctree-l3"><a class="reference internal" href="../stubs/api_example.my_function1.html">api_example.my_function1</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">API</span></p>
<ul>
<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>
<li class="toctree-l2"><a class="reference internal" href="../stubs/api_example.Electron.html">Electron</a></li>
<li class="toctree-l2"><a class="reference internal" href="../stubs/api_example.my_function.html">api_example.my_function</a></li>
</li>
<li class="toctree-l2"><a class="reference internal" href="inline_classes.html">Inline classes</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="inline_classes.html"> Inline classes</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">Special elements</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../sphinx_guide/jupyter.html">Jupyter</a></li>
<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>
<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>
<li class="toctree-l2"><a class="reference internal" href="../sphinx_guide/notebook.html">My tutorial with a long title</a></li>
<li class="toctree-l2"><a class="reference internal" href="../sphinx_guide/notebook2.html">Tutorial #2</a></li>
</ul>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
<head><meta charset="utf-8"/>
<meta name="viewport" content="width=device-width,initial-scale=1"/>
<meta name="color-scheme" content="light dark"><meta name="viewport" content="width=device-width, initial-scale=1" />
<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" />
<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" />

<!-- Generated with Sphinx 7.2.6 and Furo 2024.01.29 -->
<title>Inline classes - Example Docs 9.99</title>
<link rel="stylesheet" type="text/css" href="../_static/styles/furo.css?v=135e06be" />
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=a746c00c" />
<link rel="stylesheet" type="text/css" href="../_static/styles/qiskit-sphinx-theme.css?v=9e3589df" />
<link rel="stylesheet" type="text/css" href="../_static/jupyter-sphinx.css?v=572af1d6" />
<link rel="stylesheet" type="text/css" href="../_static/jupyter-sphinx.css" />
<link rel="stylesheet" type="text/css" href="../_static/copybutton.css?v=76b2166b" />
<link rel="stylesheet" type="text/css" href="../_static/design-style.1e8bd061cd6da7fc9cf755528e8ffc24.min.css?v=0a3b3ea7" />
<link rel="stylesheet" type="text/css" href="../_static/styles/furo-extensions.css?v=36a5483c" />
Expand Down Expand Up @@ -163,28 +163,28 @@
<input type="hidden" name="area" value="default">
</form>
<div id="searchbox"></div><div class="sidebar-scroll"><div class="sidebar-tree">
<ul>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../index.html">Documentation Home</a></li>
<li class="toctree-l1"><a class="reference internal" href="../sphinx_guide/lists.html">Lists</a></li>
<li class="toctree-l1"><a class="reference internal" href="../sphinx_guide/tables.html">Tables</a></li>
<li class="toctree-l1"><a class="reference internal" href="../sphinx_guide/panels.html">Panels</a></li>
<li class="toctree-l1"><a class="reference internal" href="../sphinx_guide/images.html">Images</a></li>
<li class="toctree-l1"><a class="reference internal" href="../sphinx_guide/paragraph.html">Paragraph Level Markup</a></li>
<li class="toctree-l1"><a class="reference internal" href="../sphinx_guide/structural.html">Generic formatting</a></li>
<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">
<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>
<li class="toctree-l3"><a class="reference internal" href="../stubs/api_example.Electron.html">Electron</a></li>
<li class="toctree-l3"><a class="reference internal" href="../stubs/api_example.my_function1.html">api_example.my_function1</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">API</span></p>
<ul class="current">
<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>
<li class="toctree-l2"><a class="reference internal" href="../stubs/api_example.Electron.html">Electron</a></li>
<li class="toctree-l2"><a class="reference internal" href="../stubs/api_example.my_function.html">api_example.my_function</a></li>
</li>
<li class="toctree-l2 current current-page"><a class="current reference internal" href="#">Inline classes</a></li>
</ul>
</li>
<li class="toctree-l1 current current-page"><a class="current reference internal" href="#"> Inline classes</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">Special elements</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../sphinx_guide/jupyter.html">Jupyter</a></li>
<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>
<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>
<li class="toctree-l2"><a class="reference internal" href="../sphinx_guide/notebook.html">My tutorial with a long title</a></li>
<li class="toctree-l2"><a class="reference internal" href="../sphinx_guide/notebook2.html">Tutorial #2</a></li>
</ul>
Expand Down Expand Up @@ -395,14 +395,14 @@ <h2>Other prose<a class="headerlink" href="#other-prose" title="Link to this hea
</div>
<svg class="furo-related-icon"><use href="#svg-arrow-right"></use></svg>
</a>
<a class="prev-page" href="../stubs/api_example.my_function.html">
<a class="prev-page" href="../stubs/api_example.my_function1.html">
<svg class="furo-related-icon"><use href="#svg-arrow-right"></use></svg>
<div class="page-info">
<div class="context">
<span>Previous</span>
</div>

<div class="title">api_example.my_function</div>
<div class="title">api_example.my_function1</div>

</div>
</a>
Expand Down
Loading

0 comments on commit 0f0ff6f

Please sign in to comment.