Skip to content
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

docs: use pytket-docs-theming submodule #153

Merged
merged 45 commits into from
Oct 2, 2024
Merged
Show file tree
Hide file tree
Changes from 33 commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
3e827f3
add .venv to .gitignore
CalMacCQ Aug 27, 2024
c23ae04
remove legacy docs directory
CalMacCQ Aug 27, 2024
a4e3072
rename intro.txt -> index.rst
CalMacCQ Aug 27, 2024
59d3816
add docs theming submodule
CalMacCQ Aug 27, 2024
82cd247
delete custom.css
CalMacCQ Aug 27, 2024
bcc950b
use latest submodule commit
CalMacCQ Aug 27, 2024
7199963
delete outdated submodule
CalMacCQ Aug 27, 2024
fe7f67a
add updated submodule
CalMacCQ Aug 27, 2024
87930b6
add bash script to build the docs
CalMacCQ Aug 27, 2024
6147e79
update README
CalMacCQ Aug 27, 2024
5db35ff
update README once more
CalMacCQ Aug 27, 2024
2eea52a
delete duplicate submodule dir
CalMacCQ Aug 27, 2024
e9282fb
update bash script
CalMacCQ Aug 27, 2024
8f4cf4d
Use updated submodule with extensions_deps
CalMacCQ Aug 28, 2024
aae823b
add dependency files to .gitignore
CalMacCQ Aug 28, 2024
9b0631e
add docs install script
CalMacCQ Aug 28, 2024
c00bfe0
add install script
CalMacCQ Aug 28, 2024
efd4f13
update submodule to avoid build warnings
CalMacCQ Aug 28, 2024
f92a6fd
update README
CalMacCQ Aug 28, 2024
de12ff2
add some comments
CalMacCQ Aug 28, 2024
d1990d1
add some comments
CalMacCQ Aug 28, 2024
30fdb76
add the correct title of the project
CalMacCQ Aug 28, 2024
73d2a40
update comment
CalMacCQ Aug 28, 2024
7836974
minor cleanup
CalMacCQ Aug 28, 2024
704ee3f
Fix typo in bash script
CalMacCQ Aug 28, 2024
0cf0c20
remove instructions from README, link to theming repo
CalMacCQ Sep 3, 2024
2bca1a6
rename extensions_deps to extensions
CalMacCQ Sep 3, 2024
40580bd
update theming submodule
CalMacCQ Sep 3, 2024
52c7d63
add link to instructions
CalMacCQ Sep 3, 2024
14ffb0c
fix github link in navbar
CalMacCQ Sep 4, 2024
2d4e588
update comment
CalMacCQ Sep 4, 2024
caa1fe0
improve build-docs.sh script
CalMacCQ Sep 4, 2024
be6456a
add left sidebar links
CalMacCQ Sep 4, 2024
b76e5a0
update docs.yml
CalMacCQ Oct 1, 2024
14ce84f
update docs build in build_and_test.yml
CalMacCQ Oct 1, 2024
1b4e53c
fix installation of docs dependencies
CalMacCQ Oct 1, 2024
265ee71
remove duplicate name
CalMacCQ Oct 1, 2024
0e4540a
try to fix poetry issue
CalMacCQ Oct 1, 2024
11c7f35
try another way to fix poetry issue
CalMacCQ Oct 1, 2024
71a3097
another attempt
CalMacCQ Oct 1, 2024
084c3ab
try again to fix docs build
CalMacCQ Oct 1, 2024
2e650d5
use latest docs theming
CalMacCQ Oct 1, 2024
1190705
update install docs dependencies once again
CalMacCQ Oct 1, 2024
586ac2e
try yet again
CalMacCQ Oct 1, 2024
6f9e3e6
try using submodules: true
CalMacCQ Oct 2, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed .github/workflows/docs/Quantinuum_logo_black.png
Binary file not shown.
Binary file removed .github/workflows/docs/Quantinuum_logo_white.png
Binary file not shown.
114 changes: 0 additions & 114 deletions .github/workflows/docs/build-docs

This file was deleted.

10 changes: 0 additions & 10 deletions .github/workflows/docs/check-build-docs

This file was deleted.

149 changes: 0 additions & 149 deletions .github/workflows/docs/conf.py

This file was deleted.

6 changes: 0 additions & 6 deletions .github/workflows/docs/requirements.txt

This file was deleted.

4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,7 @@ pytket/extensions/cutensornet/_metadata.py
result
.direnv
.envrc
.venv
docs/pyproject.toml
docs/poetry.lock

4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[submodule "docs/pytket-docs-theming"]
path = docs/pytket-docs-theming
url = https://github.com/CQCL/pytket-docs-theming.git
branch = main
5 changes: 5 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Building the docs
cqc-melf marked this conversation as resolved.
Show resolved Hide resolved

The docs are built by using the [pytket-docs-theming](https://github.com/CQCL/pytket-docs-theming/) repository as a git submodule. If there are issues with the docs build, feel free to open an issue or pull request there.

For instructions on how to build the docs, take a look at the [extensions README](https://github.com/CQCL/pytket-docs-theming/blob/main/extensions/README.md).
35 changes: 0 additions & 35 deletions docs/_static/custom.css

This file was deleted.

21 changes: 21 additions & 0 deletions docs/build-docs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash
rm -rf build/

# Move theming elements into the docs folder
cp -R pytket-docs-theming/_static .
cp -R pytket-docs-theming/quantinuum-sphinx .
cp pytket-docs-theming/conf.py .

# Get the name of the project
EXTENSION_NAME="$(basename "$(dirname `pwd`)")"

# Correct github link in navbar
sed -i '' 's#CQCL/tket#CQCL/'$EXTENSION_NAME'#' _static/nav-config.js

# Build the docs. Ensure we have the correct project title.
sphinx-build -b html -D html_title="$EXTENSION_NAME" . build

# Remove copied files. This ensures reusability.
rm -r _static
rm -r quantinuum-sphinx
rm conf.py
6 changes: 6 additions & 0 deletions docs/intro.txt → docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,9 @@ This will include the necessary dependencies such as CUDA toolkit. Then, to inst
.. toctree::
api.rst
changelog.rst

.. toctree::
:caption: Useful links

Issue tracker <https://github.com/CQCL/pytket-cutensornet/issues>
PyPi <https://pypi.org/project/pytket-cutensornet/>
8 changes: 8 additions & 0 deletions docs/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Copy over poetry dependencies from theming repository
cp pytket-docs-theming/extensions/pyproject.toml .
cp pytket-docs-theming/extensions/poetry.lock .

# Install the docs dependencies. Creates a .venv directory in docs
poetry install

# NOTE: Editable wheel should be installed separately.
cqc-melf marked this conversation as resolved.
Show resolved Hide resolved
1 change: 1 addition & 0 deletions docs/pytket-docs-theming
Submodule pytket-docs-theming added at 3c19f6
Loading