From f133710d4e8019d719662e9fbe3dc015b0b274a7 Mon Sep 17 00:00:00 2001 From: David Plankensteiner Date: Thu, 26 Mar 2026 14:41:42 +0100 Subject: [PATCH] Add bloqade-lanes to the documentation build --- .github/pull_bloqade_submodules/action.yml | 15 +++++++++++++++ .github/workflows/dev-doc-nightly.yml | 9 ++++++++- docs/reference/index.md | 1 + docs/scripts/gen_ref_nav.py | 13 +++++++++++++ mkdocs.yml | 1 + pyproject.toml | 3 ++- 6 files changed, 40 insertions(+), 2 deletions(-) diff --git a/.github/pull_bloqade_submodules/action.yml b/.github/pull_bloqade_submodules/action.yml index db7faf2e2..d2ff78906 100644 --- a/.github/pull_bloqade_submodules/action.yml +++ b/.github/pull_bloqade_submodules/action.yml @@ -32,3 +32,18 @@ runs: repository: QuEraComputing/bloqade-analog path: 'submodules/bloqade-analog' ref: ${{ steps.bloqade_analog_extract_version.outputs.version }} + + - name: extract bloqade-lanes version + id: bloqade_lanes_extract_version + shell: bash + run: | + VERSION=$(uv pip show bloqade-lanes | awk '/^Version: / {print "v"$2}') + echo "version=$VERSION" >> $GITHUB_OUTPUT + + - name: clone the latest bloqade-lanes release + id: clone_bloqade_lanes + uses: actions/checkout@v5 + with: + repository: QuEraComputing/bloqade-lanes + path: 'submodules/bloqade-lanes' + ref: ${{ steps.bloqade_lanes_extract_version.outputs.version }} diff --git a/.github/workflows/dev-doc-nightly.yml b/.github/workflows/dev-doc-nightly.yml index 898895ebc..0ac5218f2 100644 --- a/.github/workflows/dev-doc-nightly.yml +++ b/.github/workflows/dev-doc-nightly.yml @@ -32,6 +32,13 @@ jobs: repository: QuEraComputing/bloqade-circuit path: 'submodules/bloqade-circuit' + - name: clone the latest bloqade-lanes + id: clone_bloqade_lanes + uses: actions/checkout@v6 + with: + repository: QuEraComputing/bloqade-lanes + path: 'submodules/bloqade-lanes' + - name: clone the latest bloqade-analog id: clone_bloqade_analog uses: actions/checkout@v6 @@ -40,7 +47,7 @@ jobs: path: 'submodules/bloqade-analog' - name: add local repos as dependencies - run: uv add submodules/bloqade-circuit submodules/bloqade-analog + run: uv add submodules/bloqade-circuit submodules/bloqade-lanes submodules/bloqade-analog - name: Set up build cache uses: actions/cache@v5 diff --git a/docs/reference/index.md b/docs/reference/index.md index 31a5f5e0a..af56af60e 100644 --- a/docs/reference/index.md +++ b/docs/reference/index.md @@ -3,6 +3,7 @@ Here you can find a full API reference grouped by the respective submodules of bloqade: * [`bloqade-circuit`](./bloqade-circuit/src/bloqade/types) +* [`bloqade-lanes`](./bloqade-lanes/python/bloqade/lanes/device) * [`bloqade-analog`](./bloqade-analog/src/bloqade/analog/) Please note that the reference is auto-generated and therefore follows the structure of the code. diff --git a/docs/scripts/gen_ref_nav.py b/docs/scripts/gen_ref_nav.py index 517b8d644..e8fa5fde1 100644 --- a/docs/scripts/gen_ref_nav.py +++ b/docs/scripts/gen_ref_nav.py @@ -8,6 +8,7 @@ if os.getenv("GITHUB_ACTIONS") == "true": BLOQADE_CIRCUIT_SRC_PATH = "submodules/bloqade-circuit/" BLOQADE_ANALOG_SRC_PATH = "submodules/bloqade-analog/" + BLOQADE_LANES_SRC_PATH = "submodules/bloqade-lanes/" else: """ NOTE: we assume the following project structure when building locally: @@ -15,9 +16,11 @@ ../ ├── bloqade ├── bloqade-analog + ├── bloqade-lanes └── bloqade-circuit """ BLOQADE_CIRCUIT_SRC_PATH = "../bloqade-circuit/" + BLOQADE_LANES_SRC_PATH = "../bloqade-lanes/" BLOQADE_ANALOG_SRC_PATH = "../bloqade-analog/" @@ -41,6 +44,12 @@ "docs/", "debug/", "squin/cirq/emit/", # NOTE: this fails when included because there is an __init__.py missing, but the files have no docs anyway and it will be moved so safe to ignore + "demo/", + "scripts/", + "examples/", + "crates/", + "lanes/analysis/", # TODO: don't skip this + "lanes/arch/gemini/", ] @@ -101,3 +110,7 @@ def make_nav(bloqade_package_name: str, BLOQADE_PACKAGE_PATH: str): bloqade_analog_nav = make_nav("bloqade-analog", BLOQADE_ANALOG_SRC_PATH) with mkdocs_gen_files.open("reference/SUMMARY_BLOQADE_ANALOG.md", "w") as nav_file: nav_file.writelines(bloqade_analog_nav.build_literate_nav()) + +bloqade_lanes_nav = make_nav("bloqade-lanes", BLOQADE_LANES_SRC_PATH) +with mkdocs_gen_files.open("reference/SUMMARY_BLOQADE_LANES.md", "w") as nav_file: + nav_file.writelines(bloqade_lanes_nav.build_literate_nav()) diff --git a/mkdocs.yml b/mkdocs.yml index 524073c4f..eec4ec6e4 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -59,6 +59,7 @@ nav: - API Reference: - 'reference/index.md' - Bloqade Digital: 'reference/bloqade-circuit/src/bloqade/' + - Bloqade Lanes: 'reference/bloqade-lanes/python/bloqade/' - Bloqade Analog: 'reference/bloqade-analog/src/bloqade/analog/' - Blog: - blog/index.md diff --git a/pyproject.toml b/pyproject.toml index a39680a36..c6e73ea9d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,8 +20,9 @@ classifiers = [ ] requires-python = ">=3.10" dependencies = [ - "bloqade-circuit[cirq,qasm2,qbraid,vis,stim]~=0.11.0", + "bloqade-circuit[cirq,qasm2,qbraid,vis,stim]~=0.14.0", "bloqade-analog~=0.16.3", + "bloqade-lanes~=0.6.0", ] [build-system]