-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Replace parsed-literal with code-block #13257
Replace parsed-literal with code-block #13257
Conversation
Pull Request Test Coverage Report for Build 11373330230Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
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.
Thanks for doing this. Only nit is that maybe outputs should always be text, even when they happen to be valid Python? Lack of highlighting might help users distinguish code and outputs, especially when the two blocks are back-to-back. It's also the default behaviour of ipython and jupyter notebooks.
This reverts commit 7c5e4a1.
One or more of the following people are relevant to this code:
|
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.
Thanks for doing this - code-block:: text
feels much more intended than parsed-literal
for us. I wonder what the initial reason was.
The only question is that you seem to have introduced newlines in lots of places, but there's a few missing. I'm assuming that means that the newlines are important, which if so, means that there's a few places with substantial docstrings that don't appear to be included in the build.
I'm fine merging the PR as-is if that is the case, but we should follow up on restructuring to ensure that all the identified places are built in if they're supposed to be.
releasenotes/notes/0.23/clifford_layered_synthesis-1a6b1038458ae8c3.yaml
Outdated
Show resolved
Hide resolved
Ah, I added the newlines in a follow up commit because the Sphinx build was failing without them. But I only fixed the places Sphinx complained about: I didn't exhaustively go through every file. Even though Sphinx ignores those places you flagged, I'll still fix them today. We might want those docs in the future, and it reduces the risk of someone being confused when they copy-and-paste the code for new docs and it fails. |
Ah cool, thanks. I suspect that the |
@jakelishman how would you like me to fix the missing module docstring lint? Those aren't used by Sphinx, so it seems like a risk people will write good docs that end up getting ignored. Perhaps it's best to disable the lint? |
For the time being, I guess just put in a dummy one-line docstring or a Longer term, yeah, we should think about whether the module lint is truly adding anything - I suspect not, because most modules in Qiskit aren't public, so their docstrings aren't used. The class and function docstring lints are probably more sensible (though it'd be better if we could blanket suppress them in tests). |
Bump |
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.
Thanks for doing this. I really don't know why the template circuits are organised like that - if we ever manage to finish overhauling the template-optimisation engine, we definitely should tidy that up.
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.
Whoops, forgot to actually leave the tick.
From
@frankharkins
:@jakelishman
's response:--
This change was generated with
rg 'parsed-literal::' -l | xargs sd 'parsed-literal::' 'code-block:: text'
.This PR also fixes some circuit library docs that had module docstring that was not being built. Those docs are moved into their appropriate function docstrings.