-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into fix/pre-commit-config
- Loading branch information
Showing
17 changed files
with
197 additions
and
196 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,10 @@ name: Pull Request | |
|
||
on: pull_request | ||
|
||
env: | ||
SCCACHE_GHA_ENABLED: "true" | ||
RUSTC_WRAPPER: "sccache" | ||
|
||
jobs: | ||
check: | ||
name: Check Python | ||
|
@@ -13,6 +17,8 @@ jobs: | |
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Run sccache-cache | ||
uses: mozilla-actions/[email protected] | ||
- name: Install poetry | ||
run: pipx install poetry | ||
- name: Set up Python ${{ matrix.python-version }} | ||
|
@@ -21,20 +27,9 @@ jobs: | |
python-version: ${{ matrix.python-version }} | ||
cache: "poetry" | ||
|
||
- name: Build Hugr validator | ||
uses: PyO3/maturin-action@v1 | ||
with: | ||
command: build | ||
sccache: 'true' | ||
rust-toolchain: '1.75' | ||
working-directory: validator | ||
|
||
- name: Install Guppy | ||
run: poetry install | ||
|
||
- name: Install Hugr validator | ||
run: poetry add validator/target/wheels/* | ||
|
||
- name: Type check with mypy | ||
run: poetry run mypy guppylang | ||
|
||
|
@@ -50,25 +45,14 @@ jobs: | |
src: "./guppylang" | ||
args: check | ||
|
||
- name: Install Guppy with validation | ||
run: poetry install --with validation | ||
|
||
- name: Run tests | ||
run: poetry run pytest | ||
|
||
- name: Checkout tket2 | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: CQCL/tket2 | ||
path: tket2 | ||
|
||
- name: Build tket2-py | ||
uses: PyO3/maturin-action@v1 | ||
with: | ||
command: build | ||
sccache: 'true' | ||
rust-toolchain: '1.75' | ||
working-directory: tket2/tket2-py | ||
|
||
- name: Install tket2-py validator | ||
run: poetry add tket2/target/wheels/* | ||
- name: Install tket2 dependencies | ||
run: poetry install --with pytket | ||
|
||
- name: Rerun `py(...)` expression tests with tket2 installed | ||
run: poetry run pytest tests/integration/test_py.py tests/error/test_py_errors.py |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
|
||
# 1. Getting Started | ||
|
||
This file explains how you can get started using Guppy. | ||
|
||
TODO | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,5 @@ | ||
__all__ = ["types.py"] | ||
from guppylang.decorator import guppy | ||
from guppylang.module import GuppyModule | ||
from guppylang.prelude import builtins, quantum | ||
from guppylang.prelude.builtins import Bool, Float, Int, List, linst | ||
from guppylang.prelude.quantum import Qubit |
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.