-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix the properties that were incorrectly marked as methods in Qiskit 0.24-0.28 #1387
Conversation
Thanks for contributing to Qiskit documentation! Before your PR can be merged, it will first need to pass continuous integration tests and be reviewed. Sometimes the review process can be slow, so please be patient. Thanks! 🙌 |
@@ -117,7 +117,7 @@ function prepareProps( | |||
// Remove the attributes and properties modifiers as we don't show their signatures, | |||
// but we still use them to create their headers | |||
if (apiType == "attribute" || apiType == "property") { | |||
findByText($, $main, "em.property", apiType).remove(); | |||
findByText($, $child, "em.property", apiType).remove(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is to restrict the search to the signature node. Before we were searching in the whole DOM which should be slower. Tested regenerating some historical versions (not all of them) as well as qiskit 1.0 and the dev version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting, so the properties were already in the right section of the file (## Attributes
vs ## Methods
).
Neat fix! Thanks for doing this.
Actually, they are not in any section. For historical versions, both methods and attributes are all together alphabetically sorted (not sure if that happens always). I think the right ToC is a little confusing there because we assign an Here is an example of that: https://docs.quantum.ibm.com/api/qiskit/0.24/qiskit.aqua.QuantumInstance#assemble |
…0.24-0.28 (Qiskit#1387) Closes Qiskit#1352 We have 18989 misclassified properties across different versions of Qiskit (0.24 - 0.28). To fix them, this PR added an early return to the `getApiType()` to return the correct `apyType` in case a member has the property modifier. This is an example of the HTML of a property: ```html <dl class="py method"> <dt id="qiskit.circuit.Measure.definition"> <em class="property">property </em><code class="sig-name descname">definition</code><a class="headerlink" href="#qiskit.circuit.Measure.definition" title="Permalink to this definition">¶</a></dt> <dd><p>Return definition in terms of other basic gates.</p> </dd></dl> ``` The script searches for the `property` modifier inside the `<dt>` tag inside the `<dl>` tag.
Closes #1352
We have 18989 misclassified properties across different versions of Qiskit (0.24 - 0.28). To fix them, this PR added an early return to the
getApiType()
to return the correctapyType
in case a member has the property modifier.This is an example of the HTML of a property:
The script searches for the
property
modifier inside the<dt>
tag inside the<dl>
tag.