Add docs infrastructure#13
Conversation
Pull Request Test Coverage Report for Build 5671046568
💛 - Coveralls |
|
I see that the CI fails on |
Does it have the executable attribute set? |
Maybe try adding a release note - could do a prelude one and put text that is similar explanation to what Terra is saying about the deprecation/move. We need something like that here anyway. Not sure if it will fix things or not. |
What version of the qiskit-sphinx-theme do you have. I think the apps are set with this |
|
|
||
| jobs: | ||
| docs_publish: | ||
| if: ${{ startsWith(github.ref, 'refs/heads/stable') && contains('["mtreinish","Cryoris","ElePT","woodsp-ibm"]', github.actor) }} |
There was a problem hiding this comment.
why this part about the maintainer?
There was a problem hiding this comment.
Docs deploy is manually run which publishes them to the live site - we didn't want just anyone to be able to run this.
There was a problem hiding this comment.
Only people with write access could run it though. Is it necessary to have the extra check?
There was a problem hiding this comment.
As far as I am aware anyone can run actions - we set it up for the apps and this is what they have. One could do some more checking again. For now I want to keep it.
| run: | | ||
| echo "earliest_version: 0.1.0" >> releasenotes/config.yaml | ||
| tools/ignore_untagged_notes.sh | ||
| make html |
There was a problem hiding this comment.
I'm surprised these aren't using Tox. I'd recommend that because it will move the configuration of your third-party dependencies (the virtualenv) into tox.ini rather than this YAML file. tox -e docs will install all the right requirements already without CI needing to know about e.g. pip install jupyter.
There was a problem hiding this comment.
Since the VM is created for each job and requirements etv installed into that base it was all done via makes rather than have yet another virtual env on top of that. I am trying to recall why pip install jupyter - I think it was just a workaround as some transitive dependent that used to be installed did not. Either way this all needs to get setup in an expedited fashion and following what we have working in the apps was the chosen path. Things can be toxified if wanted later, we need to get this all setup and running asap to have the release in the next couple of days.
| make clean_sphinx | ||
| make html |
| name: documentation | ||
| path: docs/_build/html/artifacts/documentation.tar.gz | ||
| if: ${{ !cancelled() }} | ||
| - run: make doctest |
| run: | | ||
| echo "earliest_version: 0.1.0" >> releasenotes/config.yaml | ||
| tools/ignore_untagged_notes.sh | ||
| make html |
There was a problem hiding this comment.
Ditto tox. But also this is much slower than necessary. This will rebuild all the docs. Instead, you only need to run the tutorials to check if they've broken. See Qiskit/qiskit#10443 for how I use nbconvert.
|
|
||
| # -- Options for Doctest -------------------------------------------------------- | ||
|
|
||
| doctest_default_flags = ( |
There was a problem hiding this comment.
Are you using doctest?
There was a problem hiding this comment.
It's ran but not used anywhere yet. I think it could be useful if we added a "getting started" page with a code example like the apps modules do.
| @@ -0,0 +1,338 @@ | |||
| { | |||
There was a problem hiding this comment.
Did this tutorial already exist? Or it's new content?
There was a problem hiding this comment.
this is from qiskit-tutorials, not a history-preserving copy, but I thought we could do that in a follow-up.
Co-authored-by: Eric Arellano <14852634+Eric-Arellano@users.noreply.github.com>
Co-authored-by: Eric Arellano <14852634+Eric-Arellano@users.noreply.github.com>
|
@Eric-Arellano With this theme the links in the sidebar, when they refer to modules, are not matching whats in the page. In the page, since they are sub-folders of the current content, they have just the name. In the sidebar they are fully qualified paths which as you go down the structure gets longer and longer. Any thought Also, the notebook that is here, as a placeholder to have all the algorithms tutorials, looking at the tutorials in the html output it does not come out properly as a tile (you can download a build artifact and see - either say the documentation zip or a tutorials one where they are built out in the content, rather than being included as-is). Are we missing some config for this theme - I did not double check myself yet - had been more concerned with getting things working. |
|
Answering #13 (comment) et al not to leave all of the tox comments hanging: I think it could be good to simplify the setup, but given that we now have a runnable CI and limited time before the release, I would not like to break it again just now. I would leave these improvements for a follow-up. |
| .. toctree:: | ||
| :hidden: | ||
|
|
||
| API References <apidocs/algorithms> |
There was a problem hiding this comment.
| API References <apidocs/algorithms> | |
| About Qiskit Algorithms <self> | |
| Getting Started <getting_started> | |
| API References <apidocs/algorithms> |
There was a problem hiding this comment.
A minor comment. In the apps the reference text is 'Overview' which is also what is on the page. As Qiskit Algorithms is at the top of the sidebar there and on the page, having it yet again there in the text seems rather repetitive as hopefully the context is clear. But its easy enough to change at any point of course, at least this adds the link back to the start which was missing.
There was a problem hiding this comment.
I don't have a strong preference :) Others use Documentation Home for that reason. Overview works for me too.
Oof, it looks like you're hitting Qiskit/qiskit_sphinx_theme#518. I've only been able to figure that out for one project, which was removing Note that it is a problem on the Pytorch theme too, only not as obvious because of some styling Pytorch uses. Experiments didn't have time to debug so copied in the CSS file directly to work around it: qiskit-community/qiskit-experiments#1225.
I'm not reproducing that. Perhaps you have to scroll down on the left sidebar more? |
I mean the names in the sidebar eg are My take on time_evolvers would have just been to have a link to time_evolvers where variational and trotterization were modules documented there rather than hoist it to the level it is. Either way again its a fully qualified name in the sidebar rather than relative. |
|
The Furo theme highlights whatever the current page is. If you are at apidocs/algorithms.html, and scroll down your page to see the Gradients subsection, you'll have your screenshot: That's as expected. Now, click on the Gradients link either from the page or the left sidebar, and you go to the page This is all expected. It's how the base Furo theme and autodoc/autosummary work. |
|
Yes but I am talking about whats in the sidebar - it just seems off that the navigation in the page has |
If you wanted to change the left sidebar, you would need to figure out how to get autodoc/autosummary to not set the page title for each module page to be the fully qualified module. The Sphinx theme simply uses whatever the page title is for the left sidebar. |
|
Ok so its more like alter the title of the target page to be that same name, as long as the full context is there near the top it does not have to be in the title - none of the classes pages are that way. Anyway it was just something that jumped out at me - something for later though if we want to change things |
|
@Eric-Arellano I see the search output is a little different. Before if I seached for VQE (like now in the terra docs) it gives hits like PVQD and Minimizer which it still does. The difference was before is that additional text was present so you could see the hit in context e.g search in current Qiskit (terra API ref for VQE) which may be enough for you to want to check it out or skip/ here all I see is and I guess I just have to assume it found VQE in that link somewhere. Is this output as expected, do we need to configure anything further.... |
Thanks @Eric-Arellano. |
Co-authored-by: Steve Wood <40241007+woodsp-ibm@users.noreply.github.com> Co-authored-by: Eric Arellano <14852634+Eric-Arellano@users.noreply.github.com>
Co-authored-by: Steve Wood <40241007+woodsp-ibm@users.noreply.github.com>








Summary
This PR adds the docs infrastructure for the API reference and tutorials. The templates are taken from Qiskit/qiskit#10455.
Details and comments