CQCL / pytket-docs

User manual and example notebooks for the pytket quantum computing toolkit
https://docs.quantinuum.com/tket/user-guide/
Apache License 2.0
331 stars 90 forks source link

missing `ipykernel` requirement #272

Closed dlyongemallo closed 6 months ago

dlyongemallo commented 11 months ago

Using Ubuntu 22.04.3 LTS. pip version is 22.0.2.

Steps to repro:

Expected: requirements are installed and the manual is built successfully

Actual: No module named 'pytket.circuit'

The error message is actually a red herring. The build-manual script actually does install pytket into the current environment, but the sphinx-build does not recognise it. (It's possible to bypass the error by installing pytket outside the virtual environment. But then this leads to a series of other error messages like ModuleNotFoundError: No module named 'pytket.extensions.qiskit'.)

The real fix is to pip install ipykernel. When this is missing, sphinx-build seems not to recognise the virtual environment.

(Also, running build-manual requires graphviz to be installed. But at least the error message there is clear: ExecutableNotFound: failed to execute PosixPath('dot'), make sure the Graphviz executables are on your systems' PATH.)

dlyongemallo commented 11 months ago

Incidentally: what is the reason for the duplication in the manual/build and docs/manual subdirectories? I noticed that the last step of build-manual just copies manual/build into docs/manual, and both are in .gitignore. Would it be better if a temporary directory (such as returned by mktemp) were used instead?

CalMacCQ commented 11 months ago

Thank you for pointing this out.

Indeed, ipykernel is required. I've been restructuring some of the docs recently and must've removed ipykernel by accident. I'll make a note to fix that.

There is also some duplication of directories as you point out. I don't think there was an expecially good reason from this. Do you know differently @cqc-melf ?

Previously we deployed the whole docs/manual directory but this was deleted in https://github.com/CQCL/pytket/pull/268.

Our docs build/deployment is a bit untidy at the moment but I'm in the process of consolidating docs at https://tket.quantinuum.com.

cqc-melf commented 11 months ago

As @CalMacCQ we are currently in the process of restructuring how the manual is build and deployed.

For me this is still working, there are some additional steps required at the moment to get that to work, you can find them in the github workflow file at https://github.com/CQCL/pytket/blob/main/.github/workflows/check-manual.yml#L44C13-L44C13

If you need more help with the, or that is still not working, please let us know.

cqc-alec commented 11 months ago

@CalMacCQ I think we can delete the step that copies into docs/manual now that we are not deploying from there? (Then it can also be removed from .gitignore.)

CalMacCQ commented 6 months ago

Closing this for now as I think the issue was addressed in #273. If anything else comes up feel free to reopen.

I think it'd be a good idea to improve how dependecies etc are managed by the manual and examples.