Extract Pauli flow from XZ-corrections (closes #432) #1690
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: typecheck | |
| on: | |
| pull_request: | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| # We stick to Python 3.13 since qiskit-aer is not available yet for Python 3.14. | |
| # See https://github.com/Qiskit/qiskit-aer/issues/2378. | |
| python-version: "3.13" | |
| jobs: | |
| mypy-pyright: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 # Fetch all, necessary to find tags and branches | |
| fetch-tags: true | |
| - name: Setup uv | |
| uses: ./.github/actions/setup-uv | |
| with: | |
| enable-cache: true | |
| python-version: ${{ env.python-version }} | |
| - run: uv run --extra dev --extra extra --extra typing mypy | |
| - run: uv run --extra dev --extra extra --extra typing pyright | |
| # Check that `mypy` find installed `graphix` package (#328) | |
| # | |
| # Note that `mypy` does not find editable packages (installed with | |
| # the option `pip install -e`), unless they are installed in | |
| # `compat` or `strict` mode. | |
| # | |
| # pip install -e . --config-settings editable_mode=strict | |
| # | |
| # See https://github.com/pypa/setuptools/issues/3518. | |
| typed-package: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 # Fetch all, necessary to find tags and branches | |
| fetch-tags: true | |
| - name: Setup uv | |
| uses: ./.github/actions/setup-uv | |
| with: | |
| enable-cache: true | |
| python-version: ${{ env.python-version }} | |
| - name: Install graphix and mypy | |
| run: uv sync --extra dev --no-editable | |
| - name: Test type-checking | |
| run: | | |
| cd ${{ runner.temp }} | |
| echo "from graphix import Pattern" > test_graphix_type.py | |
| uv run --project ${{ github.workspace }} --no-sync mypy test_graphix_type.py |