-
Notifications
You must be signed in to change notification settings - Fork 90
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
Attributes with incomplete signatures for some versions of qiskit #1217
Comments
@arnaucasau this can be fixed by manually fixing the HTML as part of #1252, right? If so, can you please close this as "not planned"? |
I think we can maybe fix both issues by only changing our script and not the HTML. The result simplifies the script instead of making it more complex. I created a draft PR with a possible fix here. |
github-merge-queue bot
pushed a commit
that referenced
this issue
May 3, 2024
This PR removes the signature prop from the Attribute component and instead, sets `attributeTypeHint` and `attributeValue`. This change simplifies the script that was using different props for attributes embedded in the class page and the rest. As a side effect, this PR also fixes an issue with some default values not showing correctly. These values were treated as signatures and wrongly converted into HTML by a unified plugin. Closes #1217 #1252
frankharkins
pushed a commit
to frankharkins/documentation
that referenced
this issue
Jul 22, 2024
This PR removes the signature prop from the Attribute component and instead, sets `attributeTypeHint` and `attributeValue`. This change simplifies the script that was using different props for attributes embedded in the class page and the rest. As a side effect, this PR also fixes an issue with some default values not showing correctly. These values were treated as signatures and wrongly converted into HTML by a unified plugin. Closes Qiskit#1217 Qiskit#1252
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There are some attributes in the qiskit API docs with incomplete signatures. We can find two examples in qiskit 0.19 at BaseSchema and FlowController.
For the former, we can see how the attribute
TYPE_MAPPING
andopts
don't have a correct default value:These attributes seem to correspond to the
Schema
class of the marshmallow library (search forTYPE_MAPPING
on this page). In the next screenshot we can see how the signature would look like without processing it with a unified plugin like in the API generation script and instead using$child.text()
:In the previous screenshot we can see also one attribute from the
FlowController
class which in some versions like 0.40, has that exact value:We should figure out why sometimes these signatures are incomplete for some versions. One solution to explore would be to remove the unified plugin used in
generateApiComponents.ts
and replace it with$child.text()
, making sure we espace the apostrophes and double quotes symbols of the signature.The text was updated successfully, but these errors were encountered: