Skip to content

chore(deps-py): bump the dev group across 1 directory with 3 updates #2973

chore(deps-py): bump the dev group across 1 directory with 3 updates

chore(deps-py): bump the dev group across 1 directory with 3 updates #2973

Workflow file for this run

# A check that ensures that `guppylang` and `guppylang-internals` work correctly with the lowest and highest allowed
# versions of their dependencies.
#
# If checks fail, it is likely that the packages are not compatible with the respective versions of their dependencies
# and the version ranges have to be adjusted.
name: 🚚 Release checks
on:
pull_request:
branches:
- main
- "release/**"
workflow_dispatch: {}
env:
# Pinned version for the uv package manager
UV_VERSION: "0.9.5"
jobs:
check-release-guppylang:
name: Check release compatibility with ${{ matrix.target.resolution }} dependencies
runs-on: ubuntu-latest
if: github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-pr--')
strategy:
fail-fast: false
matrix:
target:
- resolution: "highest"
python: "3.14"
- resolution: "lowest-direct"
python: "3.12"
steps:
- uses: actions/checkout@v7
- uses: mozilla-actions/sccache-action@v0.0.11
- name: Set up uv
uses: astral-sh/setup-uv@v7
with:
version: ${{ env.UV_VERSION }}
enable-cache: true
- name: Set up Just
uses: extractions/setup-just@v4
- name: Install Python ${{ matrix.target.python }}
run: |
uv python install ${{ matrix.target.python }}
uv python pin ${{ matrix.target.python }}
- name: Setup `guppylang` and `guppylang-internals` with only pypi dependencies
env:
RES: ${{ matrix.target.resolution }}
run: |
UV_RESOLUTION="$RES" uv lock --prerelease=allow -U
UV_RESOLUTION="$RES" uv sync --prerelease=allow
echo "\nDone! Installed dependencies:"
uv pip list
- name: Type check with mypy
run: uv run --no-sync mypy guppylang guppylang-internals
- name: Lint with ruff
run: uv run --no-sync ruff check guppylang guppylang-internals
- name: Run tests
run: UV_NO_SYNC=1 just test
check-guppy-docs-build:
name: Check the guppy-docs build for `guppylang` release
runs-on: ubuntu-latest
if: github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-pr--')
steps:
- uses: actions/checkout@v7
with:
repository: Quantinuum/guppy-docs
submodules: true
token: ${{ secrets.GITHUB_TOKEN }}
path: guppy-docs
- name: Set up uv
uses: astral-sh/setup-uv@v7
with:
version: ${{ env.UV_VERSION }}
enable-cache: true
- name: Set up Just
uses: extractions/setup-just@v4
- name: Install a develop wheel of guppylang
run: |
cd guppy-docs
uv add "guppylang @ git+https://github.com/Quantinuum/guppylang.git@${{ github.event.pull_request.head.sha }}#subdirectory=guppylang" || uv sync --group docs
- name: Checkout guppylang pyproject.toml
uses: actions/checkout@v7
with:
repository: Quantinuum/guppylang
ref: ${{ github.event.pull_request.head.sha }}
path: guppylang
sparse-checkout: |
guppylang/pyproject.toml
sparse-checkout-cone-mode: false
- name: Verify guppylang version
run: |
cd guppy-docs
uv run python <<'PY'
import re
from pathlib import Path
import guppylang
GUPPYLANG_PACKAGE_VERSION = guppylang.__version__
pyproject = Path("../guppylang/guppylang/pyproject.toml").read_text()
match = re.search(r'^version = "([^"]+)"', pyproject, re.MULTILINE)
assert match is not None, "Could not find the guppylang project version"
PYPROJECT_GUPPYLANG_VERSION = match.group(1)
assert GUPPYLANG_PACKAGE_VERSION == PYPROJECT_GUPPYLANG_VERSION
print(f"Verification complete! Verified Guppy version is {GUPPYLANG_PACKAGE_VERSION}")
PY
- name: Run docs build
run: |
cd guppy-docs
just build-docs