Skip to content

docs: replace poetry with uv in docs build, use strict sphinx build#2130

Open
CalMacCQ wants to merge 33 commits intomainfrom
cm/docs_build_uv
Open

docs: replace poetry with uv in docs build, use strict sphinx build#2130
CalMacCQ wants to merge 33 commits intomainfrom
cm/docs_build_uv

Conversation

@CalMacCQ
Copy link
Contributor

@CalMacCQ CalMacCQ commented Mar 12, 2026

Description

This PR refactors the docs build to use uv rather than poetry closing #2095. This means we no longer need to pin to a specific poetry version #2033

I've also reenabled the strict sphinx build which treats warnings as errors resolving #2044

Related issues

closes #2033, #2095, #2044

@CalMacCQ CalMacCQ marked this pull request as draft March 12, 2026 15:07
- uses: actions/checkout@v6
with:
submodules: recursive
submodules: true
Copy link
Contributor Author

@CalMacCQ CalMacCQ Mar 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We no longer have a the quantinuum-sphinx submodule inside the pytket-docs-theming submodule so "recursive" is unnecessary.

@CalMacCQ CalMacCQ marked this pull request as ready for review March 13, 2026 13:53
@CalMacCQ CalMacCQ requested a review from cqc-alec March 13, 2026 13:53
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>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given that we're not using the same editable wheel maybe the docs build should be its own workflow? Not sure

@CalMacCQ CalMacCQ changed the title docs: replace poetry with uv in docs build docs: replace poetry with uv in docs build, use strict sphinx build Mar 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant