quantumlib / Qualtran

Qᴜᴀʟᴛʀᴀɴ is a Python library for expressing and analyzing Fault Tolerant Quantum algorithms.
https://qualtran.readthedocs.io/en/latest/
Apache License 2.0
169 stars 40 forks source link

Automate doc generation and pushing #330

Open mpharrigan opened 1 year ago

mpharrigan commented 1 year ago

following #314

There are three stages of doc generation, each currently done manually.

  1. autogenerate-bloqs-notebooks.py takes a list of Bloq objects and writes stub notebooks and refreshes the docstrings in existing notebooks. The output is unexecuted notebooks that are committed to the repository
  2. (a) execute-ntoebooks.py will execute all of the un-executed source-controlled notebooks and put executed versions in docs/. This is used by the CI to check that the notebooks run successfully. (b) build-reference-docs.py will extract docstrings and stuff and put markdown files in docs/. These autogenerated files are manually pushed to a separate docs git branch.
  3. Sphinx takes the executed notebooks, the reference markdown files, and some additional hand-written files in docs/ and turns it to html. This is run via the readthedocs runner.

The task is to move to an automated pipeline

mpharrigan commented 10 months ago

I documented these stages in a readme file as part of #467