You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The files qiskit.primitives.BaseEstimator and qiskit.primitives.BaseSampler are not being created in Qiskit 1.0 docs even though the HTML files exist in the Sphinx output uploaded to Box.
--
What's happening is that the HTML is really short and being classified as an attribute:
This is the HTML:
<sectionid="basesampler"><h1>BaseSampler<aclass="headerlink" href="#basesampler" title="Permalink to this heading">¶</a></h1><dlclass="py attribute"><dtclass="sig sig-object py" id="qiskit.primitives.BaseSampler"><spanclass="sig-prename descclassname"><spanclass="pre">qiskit.primitives.</span></span><spanclass="sig-name descname"><spanclass="pre">BaseSampler</span></span><aclass="headerlink" href="#qiskit.primitives.BaseSampler" title="Permalink to this definition">¶</a></dt><dd><p>alias of <codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">BaseSamplerV1</span></code></p></dd></dl></section>
This code then returns this result, viewing it as an attribute API type:
If you comment out that line, we generate this file:
---title: BaseSamplerdescription: API reference for qiskit.primitives.BaseSamplerin_page_toc_min_heading_level: 1python_api_type: attributepython_api_name: qiskit.primitives.BaseSampler---# BaseSampler
alias of `BaseSamplerV1`
I think there are two things we should do:
Update Qiskit 1.0 to include BaseSamplerV1 and BaseEstimatorV1 in their API docs. That way, we'll have their full class page, and then the pages for BaseSampler will link to the BaseSamplerV1 properly.
Fix our API generation script to handle this situation. We can't get rid of mergeClassMembers because it's necessary for historical API docs. Instead, we should change its logic to recognize this edge case. Maybe look if the attribute starts with the string "alias of" & check that there is no corresponding class page?
The text was updated successfully, but these errors were encountered:
Part of #814. We shouldn't
be deleting attribute pages if they don't correspond to an owning class.
This PR also runs `npm run regen-apis`; as shown, this PR's logic change
only impacts Qiskit v1 docs.
Part of Qiskit#814. We shouldn't
be deleting attribute pages if they don't correspond to an owning class.
This PR also runs `npm run regen-apis`; as shown, this PR's logic change
only impacts Qiskit v1 docs.
The files
qiskit.primitives.BaseEstimator
andqiskit.primitives.BaseSampler
are not being created in Qiskit 1.0 docs even though the HTML files exist in the Sphinx output uploaded to Box.--
What's happening is that the HTML is really short and being classified as an attribute:
This is the HTML:
This code then returns this result, viewing it as an
attribute
API type:documentation/scripts/commands/updateApiDocs.ts
Lines 166 to 168 in 5167d51
That then gets removed due to this line that tries to inline the attribute into the non-existent class file for
qiskit.primitives.BaseEstimator
:documentation/scripts/commands/updateApiDocs.ts
Line 207 in 5167d51
If you comment out that line, we generate this file:
I think there are two things we should do:
BaseSamplerV1
andBaseEstimatorV1
in their API docs. That way, we'll have their full class page, and then the pages forBaseSampler
will link to theBaseSamplerV1
properly.mergeClassMembers
because it's necessary for historical API docs. Instead, we should change its logic to recognize this edge case. Maybe look if the attribute starts with the string "alias of" & check that there is no corresponding class page?The text was updated successfully, but these errors were encountered: