Skip to content

Commit

Permalink
docs: use pytket-docs-theming submodule (#120)
Browse files Browse the repository at this point in the history
* delete legacy docs dir

* -m

* -m

* -m

* -m

* -m

* -m

* update docs.yml workflow file

* update build_and_test [pytket-iqm]

* fix to build and test workflow
  • Loading branch information
CalMacCQ authored Oct 2, 2024
1 parent c1e52b3 commit 30f7c0f
Show file tree
Hide file tree
Showing 17 changed files with 79 additions and 329 deletions.
23 changes: 16 additions & 7 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,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 @@ -77,15 +78,20 @@ 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:
name: Publish to pypi
Expand Down Expand Up @@ -121,6 +127,7 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: '0'
submodules: true
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
Expand All @@ -131,14 +138,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
bash ./install.sh
- 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
32 changes: 14 additions & 18 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Pytket IQM Docs
name: Build docs

on:
push:
Expand All @@ -7,31 +7,27 @@ on:
schedule:
# 04:00 every Tuesday morning
- cron: '0 4 * * 2'

jobs:
docs:
name: build docs
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
with:
submodules: true
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Upgrade pip and install wheel
run: pip install --upgrade pip wheel
- name: Install pytket iqm
run: |
pip install .
python-version: '3.11'
- 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 iqm
run: cd docs && poetry run pip install ../.
- name: Test building docs
timeout-minutes: 20
timeout-minutes: 10
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.
113 changes: 0 additions & 113 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.

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

This file was deleted.

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

This file was deleted.

Empty file.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ obj
docs/extensions
.ipynb_checkpoints
pytket/extensions/iqm/_metadata.py
.DS_Store
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
Loading

0 comments on commit 30f7c0f

Please sign in to comment.