-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Infra: Combine manual and examples build #339
Changes from 77 commits
ab8fdb8
3e6d7e1
64e9f8e
706209c
6262306
19b25f6
395903e
89005ec
376c32d
254379b
5b1dc32
890dfc1
0113fd8
f217f47
b3b95f6
baa75a7
098e19d
f87c73b
645621d
a688a93
bee3d85
db94684
c3efce3
90e297b
65c105f
3c88171
9547785
bea0a70
f5489fa
137493c
65038c8
87084cd
3cdaa66
f654414
ede0492
0f6d5e7
d3b421a
031a684
1479596
0bba024
2962f8d
30a77c7
95ca70b
d3d224b
4bcf70d
70337bd
33e898f
dc3d84d
7d943ea
c6aff9f
383f475
bc85f1e
37c912f
d3d2d94
716c653
cf6d705
5678ddc
be15f3c
1faa830
9e59a43
a510eee
0ca986d
e40cc4e
d053f9a
73f38a3
cabf99b
31953ef
2e9ce32
8dd5008
0540dbe
189c4f8
abcfe33
8b69648
4579038
141c4ae
9f2fb02
b141e14
1d9c807
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: check manual | ||
name: check docs build | ||
|
||
on: | ||
pull_request: | ||
|
@@ -28,35 +28,28 @@ jobs: | |
- '.github/**' | ||
|
||
check: | ||
name: check manual | ||
name: check docs build | ||
needs: changes | ||
if: github.event_name == 'schedule' || needs.changes.outputs.manual == 'true' | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
fetch-depth: '0' | ||
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* +refs/heads/*:refs/remotes/origin/* | ||
- name: Set up Python 3.11 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.11 | ||
- name: install python requirements for manual | ||
- name: install python requirements for docs | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install wheel | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The removed packages are now all in poetry? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, with the exception of the The furo theme is used instead. |
||
python -m pip install -c manual_constraints.txt sphinx sphinx-book-theme jupyter-sphinx quimb | ||
python -m pip install -r manual_requirements.txt | ||
python -m pip install kahypar | ||
python -m pip install sphinx-copybutton | ||
python -m pip install ipyparallel | ||
python -m pip install qiskit-algorithms | ||
python -m pip install poetry | ||
poetry install | ||
- name: install graphviz | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install graphviz | ||
- name: build manual | ||
sudo apt-get update | ||
sudo apt-get install graphviz | ||
- name: build manual and examples | ||
run: | | ||
cd manual/ | ||
sed "s/REQUIREMENTS/$(sed -e 's/[\&/]/\\&/g' -e 's/$/\\n/' ../manual_requirements.txt | tr -d '\n')/" index-rst-template > index.rst | ||
sphinx-build -b html . build -W | ||
poetry run ./build-docs.sh |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[submodule "docs/quantinuum-sphinx"] | ||
path = docs/quantinuum-sphinx | ||
url = https://github.com/CQCL/quantinuum-sphinx.git | ||
branch = dist | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this a protected branch? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure Is it protected @aidanCQ ? |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/sh | ||
|
||
cd docs/ | ||
|
||
rm -rf build/ | ||
sphinx-build -b html . build -W | ||
|
This file was deleted.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is this used for? Do we still need it? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think this file is needed. |
cqc-melf marked this conversation as resolved.
Show resolved
Hide resolved
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,20 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"/> | ||
<meta http-equiv="refresh" content="0; url=https://tket.quantinuum.com/user-manual/"/> | ||
|
||
<head> | ||
<meta charset="utf-8" /> | ||
<meta http-equiv="refresh" content="0; url=https://tket.quantinuum.com/user-manual/" /> | ||
<script type="text/javascript"> | ||
window.location.href = "https://tket.quantinuum.com/user-manual/" | ||
window.location.href = "https://tket.quantinuum.com/user-manual/" | ||
</script> | ||
cqc-melf marked this conversation as resolved.
Show resolved
Hide resolved
|
||
<title>TKET docs have moved to tket.quantinuum.com</title> | ||
</head> | ||
<body> | ||
</head> | ||
|
||
<body> | ||
<p> | ||
If you are not redirected automatically, follow | ||
<a href="https://tket.quantinuum.com/user-manual/">this link to the user manual on tket.quantinuum.com</a>. | ||
If you are not redirected automatically, follow | ||
<a href="https://tket.quantinuum.com/user-manual/">this link to the user manual on tket.quantinuum.com</a>. | ||
</p> | ||
</body> | ||
</html> | ||
</body> | ||
|
||
</html> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
const navConfig = { | ||
|
||
"navTextLinks": [ | ||
{ | ||
"title": "API Docs", | ||
"href": "../api-docs", | ||
"pathMatch": "somewhere", | ||
}, | ||
{ | ||
"title": "Blog", | ||
"href": "../blog/", | ||
"pathMatch": "somewhere", | ||
}, | ||
{ | ||
"title": "User Guide", | ||
"href": "../user-guide", | ||
"pathMatch": "somewhere", | ||
}, | ||
], | ||
"navProductName": "TKET", | ||
"navIconLinks": [ | ||
{ | ||
"title": "TKET Github", | ||
"href": "https://github.com/CQCL/tket", | ||
"pathMatch": "somewhere", | ||
"iconImageURL": "_static/assets/github.svg", | ||
}, | ||
{ | ||
"title": "TKET Slack Channel", | ||
"href": "https://tketusers.slack.com/", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this a valid invite link? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I checked this and it seems to go to the correct page for people not in the workspace. |
||
"pathMatch": "somewhere", | ||
"iconImageURL": "_static/assets/slack.svg", | ||
}, | ||
{ | ||
"title": "TKET Stack Exchange", | ||
"href": "https://quantumcomputing.stackexchange.com/questions/tagged/pytket", | ||
"pathMatch": "somewhere", | ||
"iconImageURL": "_static/assets/stack.svg", | ||
}, | ||
], | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
# Configuration file for the Sphinx documentation builder. | ||
# See https://www.sphinx-doc.org/en/master/usage/configuration.html | ||
|
||
copyright = "2020-2024, Quantinuum" | ||
author = "Quantinuum" | ||
|
||
|
||
html_title = "pytket user guide" | ||
|
||
extensions = [ | ||
"sphinx.ext.intersphinx", | ||
"sphinx.ext.mathjax", | ||
"jupyter_sphinx", | ||
"sphinx_copybutton", | ||
"sphinx.ext.autosectionlabel", | ||
"myst_nb", | ||
] | ||
|
||
myst_enable_extensions = ["dollarmath", "html_image", "attrs_inline"] | ||
|
||
html_theme = "furo" | ||
templates_path = ["./quantinuum-sphinx/_templates/"] | ||
html_static_path = ["./quantinuum-sphinx/_static/", "_static/"] | ||
|
||
pytketdoc_base = "https://tket.quantinuum.com/api-docs/" | ||
|
||
intersphinx_mapping = { | ||
"python": ("https://docs.python.org/3/", None), | ||
"pytket": (pytketdoc_base, None), | ||
"qiskit": ("https://docs.quantum.ibm.com/api/qiskit", None), | ||
"pytket-qiskit": ("https://tket.quantinuum.com/extensions/pytket-qiskit/", None), | ||
cqc-melf marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"pytket-quantinuum": ( | ||
"https://tket.quantinuum.com/extensions/pytket-quantinuum/", | ||
None, | ||
), | ||
"pytket-qujax": ("https://tket.quantinuum.com/extensions/pytket-qujax/", None), | ||
"pytket-cirq": ("https://tket.quantinuum.com/extensions/pytket-cirq/", None), | ||
"sympy": ("https://docs.sympy.org/latest/", None), | ||
} | ||
|
||
|
||
nb_execution_mode = "cache" | ||
|
||
nb_execution_excludepatterns = [ | ||
"examples/backends/Forest_portability_example.ipynb", | ||
"examples/backends/backends_example.ipynb", | ||
"examples/backends/qiskit_integration.ipynb", | ||
"examples/backends/comparing_simulators.ipynb", | ||
"examples/algorithms_and_protocols/expectation_value_example.ipynb", | ||
"examples/algorithms_and_protocols/pytket-qujax_heisenberg_vqe.ipynb", | ||
"examples/algorithms_and_protocols/pytket-qujax-classification.ipynb", | ||
"examples/algorithms_and_protocols/pytket-qujax_qaoa.ipynb", | ||
"examples/algorithms_and_protocols/ucc_vqe.ipynb", | ||
"examples/algorithms_and_protocols/spam_example.ipynb", | ||
"examples/algorithms_and_protocols/entanglement_swapping.ipynb", | ||
] | ||
|
||
exclude_patterns = ["jupyter_execute/*", ".jupyter_cache", "manual/README.md"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you know if there is a reason why we are not using
ubuntu-latest
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure. I can use the latest if you'd prefer?