diff --git a/docs/api/qiskit-ibm-provider/0.10/_toc.json b/docs/api/qiskit-ibm-provider/0.10/_toc.json index e1754b5d313..2137d7500e0 100644 --- a/docs/api/qiskit-ibm-provider/0.10/_toc.json +++ b/docs/api/qiskit-ibm-provider/0.10/_toc.json @@ -59,7 +59,7 @@ ] }, { - "title": "qiskit_ibm_provider.job", + "title": "...job", "children": [ { "title": "Module overview", @@ -104,23 +104,23 @@ ] }, { - "title": "qiskit_ibm_provider.jupyter", + "title": "...jupyter", "url": "/api/qiskit-ibm-provider/0.10/ibm_jupyter" }, { - "title": "qiskit_ibm_provider.transpiler", + "title": "...transpiler", "url": "/api/qiskit-ibm-provider/0.10/ibm_transpiler" }, { - "title": "qiskit_ibm_provider.transpiler.passes", + "title": "...transpiler.passes", "url": "/api/qiskit-ibm-provider/0.10/qiskit_ibm_provider.transpiler.passes" }, { - "title": "qiskit_ibm_provider.transpiler.passes.basis", + "title": "...transpiler.passes.basis", "url": "/api/qiskit-ibm-provider/0.10/qiskit_ibm_provider.transpiler.passes.basis" }, { - "title": "qiskit_ibm_provider.transpiler.passes.scheduling", + "title": "...transpiler.passes.scheduling", "children": [ { "title": "Module overview", @@ -153,7 +153,7 @@ ] }, { - "title": "qiskit_ibm_provider.utils", + "title": "...utils", "children": [ { "title": "Module overview", @@ -178,7 +178,7 @@ ] }, { - "title": "qiskit_ibm_provider.visualization", + "title": "...visualization", "children": [ { "title": "Module overview", diff --git a/docs/api/qiskit-ibm-provider/0.7/_toc.json b/docs/api/qiskit-ibm-provider/0.7/_toc.json index 010ccdfc0e9..1643ed247a6 100644 --- a/docs/api/qiskit-ibm-provider/0.7/_toc.json +++ b/docs/api/qiskit-ibm-provider/0.7/_toc.json @@ -59,7 +59,7 @@ ] }, { - "title": "qiskit_ibm_provider.job", + "title": "...job", "children": [ { "title": "Module overview", @@ -104,23 +104,23 @@ ] }, { - "title": "qiskit_ibm_provider.jupyter", + "title": "...jupyter", "url": "/api/qiskit-ibm-provider/0.7/ibm_jupyter" }, { - "title": "qiskit_ibm_provider.transpiler", + "title": "...transpiler", "url": "/api/qiskit-ibm-provider/0.7/ibm_transpiler" }, { - "title": "qiskit_ibm_provider.transpiler.passes", + "title": "...transpiler.passes", "url": "/api/qiskit-ibm-provider/0.7/qiskit_ibm_provider.transpiler.passes" }, { - "title": "qiskit_ibm_provider.transpiler.passes.basis", + "title": "...transpiler.passes.basis", "url": "/api/qiskit-ibm-provider/0.7/qiskit_ibm_provider.transpiler.passes.basis" }, { - "title": "qiskit_ibm_provider.transpiler.passes.scheduling", + "title": "...transpiler.passes.scheduling", "children": [ { "title": "Module overview", @@ -153,7 +153,7 @@ ] }, { - "title": "qiskit_ibm_provider.utils", + "title": "...utils", "children": [ { "title": "Module overview", @@ -178,7 +178,7 @@ ] }, { - "title": "qiskit_ibm_provider.visualization", + "title": "...visualization", "children": [ { "title": "Module overview", diff --git a/docs/api/qiskit-ibm-provider/0.8/_toc.json b/docs/api/qiskit-ibm-provider/0.8/_toc.json index ea87f07a71d..83a0aec95f8 100644 --- a/docs/api/qiskit-ibm-provider/0.8/_toc.json +++ b/docs/api/qiskit-ibm-provider/0.8/_toc.json @@ -59,7 +59,7 @@ ] }, { - "title": "qiskit_ibm_provider.job", + "title": "...job", "children": [ { "title": "Module overview", @@ -104,23 +104,23 @@ ] }, { - "title": "qiskit_ibm_provider.jupyter", + "title": "...jupyter", "url": "/api/qiskit-ibm-provider/0.8/ibm_jupyter" }, { - "title": "qiskit_ibm_provider.transpiler", + "title": "...transpiler", "url": "/api/qiskit-ibm-provider/0.8/ibm_transpiler" }, { - "title": "qiskit_ibm_provider.transpiler.passes", + "title": "...transpiler.passes", "url": "/api/qiskit-ibm-provider/0.8/qiskit_ibm_provider.transpiler.passes" }, { - "title": "qiskit_ibm_provider.transpiler.passes.basis", + "title": "...transpiler.passes.basis", "url": "/api/qiskit-ibm-provider/0.8/qiskit_ibm_provider.transpiler.passes.basis" }, { - "title": "qiskit_ibm_provider.transpiler.passes.scheduling", + "title": "...transpiler.passes.scheduling", "children": [ { "title": "Module overview", @@ -153,7 +153,7 @@ ] }, { - "title": "qiskit_ibm_provider.utils", + "title": "...utils", "children": [ { "title": "Module overview", @@ -178,7 +178,7 @@ ] }, { - "title": "qiskit_ibm_provider.visualization", + "title": "...visualization", "children": [ { "title": "Module overview", diff --git a/docs/api/qiskit-ibm-provider/0.9/_toc.json b/docs/api/qiskit-ibm-provider/0.9/_toc.json index 5f54b670165..7b4ef18e635 100644 --- a/docs/api/qiskit-ibm-provider/0.9/_toc.json +++ b/docs/api/qiskit-ibm-provider/0.9/_toc.json @@ -59,7 +59,7 @@ ] }, { - "title": "qiskit_ibm_provider.job", + "title": "...job", "children": [ { "title": "Module overview", @@ -104,23 +104,23 @@ ] }, { - "title": "qiskit_ibm_provider.jupyter", + "title": "...jupyter", "url": "/api/qiskit-ibm-provider/0.9/ibm_jupyter" }, { - "title": "qiskit_ibm_provider.transpiler", + "title": "...transpiler", "url": "/api/qiskit-ibm-provider/0.9/ibm_transpiler" }, { - "title": "qiskit_ibm_provider.transpiler.passes", + "title": "...transpiler.passes", "url": "/api/qiskit-ibm-provider/0.9/qiskit_ibm_provider.transpiler.passes" }, { - "title": "qiskit_ibm_provider.transpiler.passes.basis", + "title": "...transpiler.passes.basis", "url": "/api/qiskit-ibm-provider/0.9/qiskit_ibm_provider.transpiler.passes.basis" }, { - "title": "qiskit_ibm_provider.transpiler.passes.scheduling", + "title": "...transpiler.passes.scheduling", "children": [ { "title": "Module overview", @@ -153,7 +153,7 @@ ] }, { - "title": "qiskit_ibm_provider.utils", + "title": "...utils", "children": [ { "title": "Module overview", @@ -178,7 +178,7 @@ ] }, { - "title": "qiskit_ibm_provider.visualization", + "title": "...visualization", "children": [ { "title": "Module overview", diff --git a/docs/api/qiskit-ibm-provider/_toc.json b/docs/api/qiskit-ibm-provider/_toc.json index c2d3f31b06c..c86fb3541bb 100644 --- a/docs/api/qiskit-ibm-provider/_toc.json +++ b/docs/api/qiskit-ibm-provider/_toc.json @@ -59,7 +59,7 @@ ] }, { - "title": "qiskit_ibm_provider.job", + "title": "...job", "children": [ { "title": "Module overview", @@ -104,23 +104,23 @@ ] }, { - "title": "qiskit_ibm_provider.jupyter", + "title": "...jupyter", "url": "/api/qiskit-ibm-provider/ibm_jupyter" }, { - "title": "qiskit_ibm_provider.transpiler", + "title": "...transpiler", "url": "/api/qiskit-ibm-provider/ibm_transpiler" }, { - "title": "qiskit_ibm_provider.transpiler.passes", + "title": "...transpiler.passes", "url": "/api/qiskit-ibm-provider/qiskit_ibm_provider.transpiler.passes" }, { - "title": "qiskit_ibm_provider.transpiler.passes.basis", + "title": "...transpiler.passes.basis", "url": "/api/qiskit-ibm-provider/qiskit_ibm_provider.transpiler.passes.basis" }, { - "title": "qiskit_ibm_provider.transpiler.passes.scheduling", + "title": "...transpiler.passes.scheduling", "children": [ { "title": "Module overview", @@ -153,7 +153,7 @@ ] }, { - "title": "qiskit_ibm_provider.utils", + "title": "...utils", "children": [ { "title": "Module overview", @@ -178,7 +178,7 @@ ] }, { - "title": "qiskit_ibm_provider.visualization", + "title": "...visualization", "children": [ { "title": "Module overview", diff --git a/docs/api/qiskit-ibm-runtime/0.14/_toc.json b/docs/api/qiskit-ibm-runtime/0.14/_toc.json index 19ec47beb24..eab2a1c1c76 100644 --- a/docs/api/qiskit-ibm-runtime/0.14/_toc.json +++ b/docs/api/qiskit-ibm-runtime/0.14/_toc.json @@ -55,7 +55,7 @@ ] }, { - "title": "qiskit_ibm_runtime.options", + "title": "...options", "children": [ { "title": "Module overview", diff --git a/docs/api/qiskit-ibm-runtime/0.15/_toc.json b/docs/api/qiskit-ibm-runtime/0.15/_toc.json index cc291e90ce6..745e6ef91fd 100644 --- a/docs/api/qiskit-ibm-runtime/0.15/_toc.json +++ b/docs/api/qiskit-ibm-runtime/0.15/_toc.json @@ -55,7 +55,7 @@ ] }, { - "title": "qiskit_ibm_runtime.options", + "title": "...options", "children": [ { "title": "Module overview", diff --git a/docs/api/qiskit-ibm-runtime/0.16/_toc.json b/docs/api/qiskit-ibm-runtime/0.16/_toc.json index 4588967881f..3381aa3b34e 100644 --- a/docs/api/qiskit-ibm-runtime/0.16/_toc.json +++ b/docs/api/qiskit-ibm-runtime/0.16/_toc.json @@ -47,7 +47,7 @@ ] }, { - "title": "qiskit_ibm_runtime.options", + "title": "...options", "children": [ { "title": "Module overview", diff --git a/docs/api/qiskit-ibm-runtime/0.17/_toc.json b/docs/api/qiskit-ibm-runtime/0.17/_toc.json index 5369b55d765..5a187a54354 100644 --- a/docs/api/qiskit-ibm-runtime/0.17/_toc.json +++ b/docs/api/qiskit-ibm-runtime/0.17/_toc.json @@ -47,7 +47,7 @@ ] }, { - "title": "qiskit_ibm_runtime.options", + "title": "...options", "children": [ { "title": "Module overview", diff --git a/docs/api/qiskit-ibm-runtime/0.18/_toc.json b/docs/api/qiskit-ibm-runtime/0.18/_toc.json index 99d6bc71415..53a11e23a65 100644 --- a/docs/api/qiskit-ibm-runtime/0.18/_toc.json +++ b/docs/api/qiskit-ibm-runtime/0.18/_toc.json @@ -47,7 +47,7 @@ ] }, { - "title": "qiskit_ibm_runtime.fake_provider", + "title": "...fake_provider", "children": [ { "title": "Module overview", @@ -420,7 +420,7 @@ ] }, { - "title": "qiskit_ibm_runtime.options", + "title": "...options", "children": [ { "title": "Module overview", @@ -453,19 +453,19 @@ ] }, { - "title": "qiskit_ibm_runtime.transpiler", + "title": "...transpiler", "url": "/api/qiskit-ibm-runtime/0.18/transpiler" }, { - "title": "qiskit_ibm_runtime.transpiler.passes", + "title": "...transpiler.passes", "url": "/api/qiskit-ibm-runtime/0.18/qiskit_ibm_runtime.transpiler.passes" }, { - "title": "qiskit_ibm_runtime.transpiler.passes.basis", + "title": "...transpiler.passes.basis", "url": "/api/qiskit-ibm-runtime/0.18/qiskit_ibm_runtime.transpiler.passes.basis" }, { - "title": "qiskit_ibm_runtime.transpiler.passes.scheduling", + "title": "...transpiler.passes.scheduling", "children": [ { "title": "Module overview", diff --git a/docs/api/qiskit-ibm-runtime/0.19/_toc.json b/docs/api/qiskit-ibm-runtime/0.19/_toc.json index 7bebd4f09b1..dacc1714ed2 100644 --- a/docs/api/qiskit-ibm-runtime/0.19/_toc.json +++ b/docs/api/qiskit-ibm-runtime/0.19/_toc.json @@ -47,7 +47,7 @@ ] }, { - "title": "qiskit_ibm_runtime.fake_provider", + "title": "...fake_provider", "children": [ { "title": "Module overview", @@ -420,7 +420,7 @@ ] }, { - "title": "qiskit_ibm_runtime.options", + "title": "...options", "children": [ { "title": "Module overview", @@ -453,19 +453,19 @@ ] }, { - "title": "qiskit_ibm_runtime.transpiler", + "title": "...transpiler", "url": "/api/qiskit-ibm-runtime/0.19/transpiler" }, { - "title": "qiskit_ibm_runtime.transpiler.passes", + "title": "...transpiler.passes", "url": "/api/qiskit-ibm-runtime/0.19/qiskit_ibm_runtime.transpiler.passes" }, { - "title": "qiskit_ibm_runtime.transpiler.passes.basis", + "title": "...transpiler.passes.basis", "url": "/api/qiskit-ibm-runtime/0.19/qiskit_ibm_runtime.transpiler.passes.basis" }, { - "title": "qiskit_ibm_runtime.transpiler.passes.scheduling", + "title": "...transpiler.passes.scheduling", "children": [ { "title": "Module overview", diff --git a/docs/api/qiskit-ibm-runtime/0.20/_toc.json b/docs/api/qiskit-ibm-runtime/0.20/_toc.json index 5b3a27a96ca..564e1d15126 100644 --- a/docs/api/qiskit-ibm-runtime/0.20/_toc.json +++ b/docs/api/qiskit-ibm-runtime/0.20/_toc.json @@ -47,7 +47,7 @@ ] }, { - "title": "qiskit_ibm_runtime.fake_provider", + "title": "...fake_provider", "children": [ { "title": "Module overview", @@ -420,7 +420,7 @@ ] }, { - "title": "qiskit_ibm_runtime.options", + "title": "...options", "children": [ { "title": "Module overview", @@ -453,19 +453,19 @@ ] }, { - "title": "qiskit_ibm_runtime.transpiler", + "title": "...transpiler", "url": "/api/qiskit-ibm-runtime/0.20/transpiler" }, { - "title": "qiskit_ibm_runtime.transpiler.passes", + "title": "...transpiler.passes", "url": "/api/qiskit-ibm-runtime/0.20/qiskit_ibm_runtime.transpiler.passes" }, { - "title": "qiskit_ibm_runtime.transpiler.passes.basis", + "title": "...transpiler.passes.basis", "url": "/api/qiskit-ibm-runtime/0.20/qiskit_ibm_runtime.transpiler.passes.basis" }, { - "title": "qiskit_ibm_runtime.transpiler.passes.scheduling", + "title": "...transpiler.passes.scheduling", "children": [ { "title": "Module overview", diff --git a/docs/api/qiskit-ibm-runtime/0.21/_toc.json b/docs/api/qiskit-ibm-runtime/0.21/_toc.json index ac4cf1e0748..481e2de8785 100644 --- a/docs/api/qiskit-ibm-runtime/0.21/_toc.json +++ b/docs/api/qiskit-ibm-runtime/0.21/_toc.json @@ -59,7 +59,7 @@ ] }, { - "title": "qiskit_ibm_runtime.fake_provider", + "title": "...fake_provider", "children": [ { "title": "Module overview", @@ -472,7 +472,7 @@ ] }, { - "title": "qiskit_ibm_runtime.options", + "title": "...options", "children": [ { "title": "Module overview", @@ -545,19 +545,19 @@ ] }, { - "title": "qiskit_ibm_runtime.transpiler", + "title": "...transpiler", "url": "/api/qiskit-ibm-runtime/0.21/transpiler" }, { - "title": "qiskit_ibm_runtime.transpiler.passes", + "title": "...transpiler.passes", "url": "/api/qiskit-ibm-runtime/0.21/qiskit_ibm_runtime.transpiler.passes" }, { - "title": "qiskit_ibm_runtime.transpiler.passes.basis", + "title": "...transpiler.passes.basis", "url": "/api/qiskit-ibm-runtime/0.21/qiskit_ibm_runtime.transpiler.passes.basis" }, { - "title": "qiskit_ibm_runtime.transpiler.passes.scheduling", + "title": "...transpiler.passes.scheduling", "children": [ { "title": "Module overview", diff --git a/docs/api/qiskit-ibm-runtime/0.22/_toc.json b/docs/api/qiskit-ibm-runtime/0.22/_toc.json index 35b179c0f6e..5dd542d276f 100644 --- a/docs/api/qiskit-ibm-runtime/0.22/_toc.json +++ b/docs/api/qiskit-ibm-runtime/0.22/_toc.json @@ -59,7 +59,7 @@ ] }, { - "title": "qiskit_ibm_runtime.fake_provider", + "title": "...fake_provider", "children": [ { "title": "Module overview", @@ -472,7 +472,7 @@ ] }, { - "title": "qiskit_ibm_runtime.options", + "title": "...options", "children": [ { "title": "Module overview", @@ -545,19 +545,19 @@ ] }, { - "title": "qiskit_ibm_runtime.transpiler", + "title": "...transpiler", "url": "/api/qiskit-ibm-runtime/0.22/transpiler" }, { - "title": "qiskit_ibm_runtime.transpiler.passes", + "title": "...transpiler.passes", "url": "/api/qiskit-ibm-runtime/0.22/qiskit_ibm_runtime.transpiler.passes" }, { - "title": "qiskit_ibm_runtime.transpiler.passes.basis", + "title": "...transpiler.passes.basis", "url": "/api/qiskit-ibm-runtime/0.22/qiskit_ibm_runtime.transpiler.passes.basis" }, { - "title": "qiskit_ibm_runtime.transpiler.passes.scheduling", + "title": "...transpiler.passes.scheduling", "children": [ { "title": "Module overview", diff --git a/docs/api/qiskit-ibm-runtime/_toc.json b/docs/api/qiskit-ibm-runtime/_toc.json index d341d4bf877..e3720673ca4 100644 --- a/docs/api/qiskit-ibm-runtime/_toc.json +++ b/docs/api/qiskit-ibm-runtime/_toc.json @@ -63,7 +63,7 @@ ] }, { - "title": "qiskit_ibm_runtime.fake_provider", + "title": "...fake_provider", "children": [ { "title": "Module overview", @@ -476,7 +476,7 @@ ] }, { - "title": "qiskit_ibm_runtime.options", + "title": "...options", "children": [ { "title": "Module overview", @@ -549,19 +549,19 @@ ] }, { - "title": "qiskit_ibm_runtime.transpiler", + "title": "...transpiler", "url": "/api/qiskit-ibm-runtime/transpiler" }, { - "title": "qiskit_ibm_runtime.transpiler.passes", + "title": "...transpiler.passes", "url": "/api/qiskit-ibm-runtime/qiskit_ibm_runtime.transpiler.passes" }, { - "title": "qiskit_ibm_runtime.transpiler.passes.basis", + "title": "...transpiler.passes.basis", "url": "/api/qiskit-ibm-runtime/qiskit_ibm_runtime.transpiler.passes.basis" }, { - "title": "qiskit_ibm_runtime.transpiler.passes.scheduling", + "title": "...transpiler.passes.scheduling", "children": [ { "title": "Module overview", diff --git a/docs/api/qiskit-ibm-runtime/dev/_toc.json b/docs/api/qiskit-ibm-runtime/dev/_toc.json index ea7a04a8026..b9fda71c3a8 100644 --- a/docs/api/qiskit-ibm-runtime/dev/_toc.json +++ b/docs/api/qiskit-ibm-runtime/dev/_toc.json @@ -63,7 +63,7 @@ ] }, { - "title": "qiskit_ibm_runtime.fake_provider", + "title": "...fake_provider", "children": [ { "title": "Module overview", @@ -476,7 +476,7 @@ ] }, { - "title": "qiskit_ibm_runtime.options", + "title": "...options", "children": [ { "title": "Module overview", @@ -549,19 +549,19 @@ ] }, { - "title": "qiskit_ibm_runtime.transpiler", + "title": "...transpiler", "url": "/api/qiskit-ibm-runtime/dev/transpiler" }, { - "title": "qiskit_ibm_runtime.transpiler.passes", + "title": "...transpiler.passes", "url": "/api/qiskit-ibm-runtime/dev/qiskit_ibm_runtime.transpiler.passes" }, { - "title": "qiskit_ibm_runtime.transpiler.passes.basis", + "title": "...transpiler.passes.basis", "url": "/api/qiskit-ibm-runtime/dev/qiskit_ibm_runtime.transpiler.passes.basis" }, { - "title": "qiskit_ibm_runtime.transpiler.passes.scheduling", + "title": "...transpiler.passes.scheduling", "children": [ { "title": "Module overview", diff --git a/scripts/lib/api/generateToc.test.ts b/scripts/lib/api/generateToc.test.ts index 0c09d651565..63f5fd593da 100644 --- a/scripts/lib/api/generateToc.test.ts +++ b/scripts/lib/api/generateToc.test.ts @@ -99,15 +99,15 @@ describe("generateToc", () => { "url": "/docs/runtime", }, { - "title": "qiskit_ibm_runtime.options", + "title": "...options", "url": "/docs/options", }, { - "title": "qiskit_ibm_runtime.options.submodule", + "title": "...options.submodule", "url": "/docs/qiskit_ibm_runtime.options.submodule", }, { - "title": "qiskit_ibm_runtime.single", + "title": "...single", "url": "/docs/single", }, { diff --git a/scripts/lib/api/generateToc.ts b/scripts/lib/api/generateToc.ts index 86cb57e2e97..5ce162a9dca 100644 --- a/scripts/lib/api/generateToc.ts +++ b/scripts/lib/api/generateToc.ts @@ -47,7 +47,7 @@ export function generateToc(pkg: Pkg, results: HtmlToMdResultWithUrl[]): Toc { // so it's more useful to show them all and have less nesting. const sortedTocModules = pkg.nestModulesInToc ? getNestedTocModulesSorted(tocModules, tocModulesByTitle, tocModuleTitles) - : orderEntriesByTitle(tocModules); + : sortAndTruncateModules(tocModules); generateOverviewPage(tocModules); return { @@ -140,6 +140,16 @@ function getNestedTocModulesSorted( return orderEntriesByTitle(nestedTocModules); } +function sortAndTruncateModules(entries: TocEntry[]): TocEntry[] { + const sorted = orderEntriesByTitle(entries); + sorted.forEach((entry) => { + // E.g. qiskit_ibm_runtime.options -> ...options, but ignore + // qiskit_ibm_runtime without a `.`. + entry.title = entry.title.replace(/^[^.]+\./, "..."); + }); + return sorted; +} + function generateOverviewPage(tocModules: TocEntry[]): void { for (const tocModule of tocModules) { if (tocModule.children && tocModule.children.length > 0) {