docs: replace poetry with uv in docs build, use strict sphinx build#2130
docs: replace poetry with uv in docs build, use strict sphinx build#2130
Conversation
| - uses: actions/checkout@v6 | ||
| with: | ||
| submodules: recursive | ||
| submodules: true |
There was a problem hiding this comment.
We no longer have a the quantinuum-sphinx submodule inside the pytket-docs-theming submodule so "recursive" is unnecessary.
14544bf to
4b638f6
Compare
| pytket-cirq <https://docs.quantinuum.com/tket/extensions/pytket-cirq> | ||
| pytket-iqm <https://docs.quantinuum.com/tket/extensions/pytket-iqm> | ||
| pytket-pennylane <https://docs.quantinuum.com/tket/extensions/pytket-pennylane> | ||
| pytket-projectq <https://docs.quantinuum.com/tket/extensions/pytket-projectq> |
There was a problem hiding this comment.
pytket-projectq is no longer part of the website so this crossref gave a warning.
|
|
||
| Q: How can I convert my qiskit {py:class}`qiskit.circuit.QuantumCircuit` to a pytket {py:class}`~.Circuit`? | ||
|
|
||
| A: This can be achieved using the {external+pytket-qiskit:py:func}`pytket.extensions.qiskit.qiskit_to_tk` function from the [pytket-qiskit extension](https://docs.quantinuum.com/tket/extensions/pytket-qiskit/) |
There was a problem hiding this comment.
Annoyingly these links stopped resolving. Not sure why. Can probably fix them.
| build *SPHINX_ARGS: prepare | ||
| VERSION=$(poetry run python -c "import pytket; print(pytket.__version__)") && \ | ||
| poetry run sphinx-build {{SPHINX_ARGS}} -b html . build -D html_title="pytket v$VERSION API documentation" | ||
| install: prepare |
There was a problem hiding this comment.
I can maybe add some more explicit comments here to explain what the commands are doing.
| poetry install | ||
| # just build-strict # https://github.com/quantinuum/tket/issues/2044 | ||
| just build | ||
| just install-dev |
There was a problem hiding this comment.
just install-dev installs a develop version of pytket inside the .venv used by uv. In theory I could use the same editable wheel from earlier in the workflow but forcing uv to not generate a .venv turned out to be annoying.
There was a problem hiding this comment.
Given that we're not using the same editable wheel maybe the docs build should be its own workflow? Not sure
Description
This PR refactors the docs build to use
uvrather thanpoetryclosing #2095. This means we no longer need to pin to a specific poetry version #2033I've also reenabled the strict sphinx build which treats warnings as errors resolving #2044
Related issues
closes #2033, #2095, #2044