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: add pytket-docs-theming submodule #392

Merged
merged 22 commits into from
Oct 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
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
20 changes: 13 additions & 7 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: '0'
submodules: true
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* +refs/heads/*:refs/remotes/origin/*
- name: Set up Python 3.10
if: github.event_name == 'push' || github.event_name == 'schedule'
Expand Down Expand Up @@ -73,15 +74,18 @@ jobs:
with:
name: artefact-${{ matrix.os }}
path: wheelhouse/
- name: Install poetry
run: pip install poetry
- name: Install docs dependencies
if: (matrix.os == 'ubuntu-22.04') && (github.event_name == 'pull_request' || github.event_name == 'schedule' )
run: |
pip install -r .github/workflows/docs/requirements.txt
cd docs && bash ./install.sh
for w in `find wheelhouse/ -type f -name "*.whl"` ; do poetry install $w ; done
- name: Build docs
if: (matrix.os == 'ubuntu-22.04') && (github.event_name == 'pull_request' || github.event_name == 'schedule' )
timeout-minutes: 20
run: |
./.github/workflows/docs/check-build-docs
cd docs && poetry run bash ./build-docs.sh


publish_to_pypi:
Expand Down Expand Up @@ -128,14 +132,16 @@ jobs:
path: wheelhouse
- name: Install pip, wheel
run: pip install -U pip wheel
- name: Install poetry
run: pip install poetry
- name: Install extension
run: for w in `find wheelhouse/ -type f -name "*.whl"` ; do pip install $w ; done
run: for w in `find wheelhouse/ -type f -name "*.whl"` ; do poetry install $w ; done
- name: Install docs dependencies
run: |
pip install -r .github/workflows/docs/requirements.txt
cd docs
poetry install
- name: Build docs
timeout-minutes: 20
run: |
cd .github/workflows/docs
mkdir extensions
./build-docs -d ${GITHUB_WORKSPACE}/.github/workflows/docs/extensions/api
cd docs
poetry run bash ./build-docs.sh
24 changes: 10 additions & 14 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,20 @@ jobs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Upgrade pip and install wheel
run: pip install --upgrade pip wheel
- name: Install pytket qiskit
run: pip install .
- name: install poetry
run: pip install poetry
- name: Install docs dependencies
run: |
pip install -r .github/workflows/docs/requirements.txt
run: cd docs && bash install.sh
- name: Install pytket qiskit
run: cd docs && poetry run pip install ../.
- name: Test building docs
timeout-minutes: 20
timeout-minutes: 10
Copy link
Collaborator

Choose a reason for hiding this comment

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

Have you reduced the timeout on purpose?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, would you prefer I changed it back?

run: |
cd .github/workflows/docs
mkdir extensions
./build-docs -d ${GITHUB_WORKSPACE}/.github/workflows/docs/extensions
- uses: actions/upload-artifact@v4
with:
name: pytket-extension-docs
path: .github/workflows/docs/extensions/
cd docs
poetry run bash build-docs.sh
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.
111 changes: 0 additions & 111 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.

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

This file was deleted.

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

This file was deleted.

Empty file.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@ docs/extensions
.ipynb_checkpoints
pytket/extensions/qiskit/_metadata.py
*.ipynb
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

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).
Loading