-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
20 additions
and
16 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 |
---|---|---|
|
@@ -29,14 +29,22 @@ jobs: | |
with: | ||
components: rustfmt, clippy | ||
- uses: mozilla-actions/[email protected] | ||
- name: Check formatting | ||
- name: Check rust formatting | ||
run: cargo fmt -- --check | ||
- name: Check python formatting | ||
uses: chartboost/ruff-action@v1 | ||
with: | ||
args: format --check | ||
- name: Run clippy | ||
run: cargo clippy --all-targets --all-features --workspace -- -D warnings | ||
- name: Build docs | ||
run: cargo doc --no-deps --all-features | ||
env: | ||
RUSTDOCFLAGS: "-Dwarnings" | ||
- name: Python lints | ||
uses: chartboost/ruff-action@v1 | ||
with: | ||
args: check | ||
|
||
benches: | ||
# Not required, we can ignore it for the merge queue check. | ||
|
@@ -102,12 +110,11 @@ jobs: | |
- name: Build pyo3 bindings | ||
run: | | ||
pip install -r requirements.txt | ||
cd pyrs | ||
maturin build | ||
pip install ../target/wheels/*.whl | ||
maturin build -m pytket-tk2/Cargo.toml | ||
pip install target/wheels/*.whl | ||
- name: Test pyo3 bindings | ||
run: | | ||
cd pyrs | ||
pip install pytest -r pytket-tk2/dev-requirements.txt | ||
pytest | ||
coverage: | ||
|
@@ -151,13 +158,10 @@ jobs: | |
run: | | ||
pip install -r requirements.txt | ||
pip install pytest-cov | ||
cd pyrs | ||
maturin build | ||
pip install ../target/wheels/*.whl | ||
maturin build -m pytket-tk2/Cargo.toml | ||
pip install target/wheels/*.whl | ||
- name: Run python tests with coverage instrumentation | ||
run: | | ||
cd pyrs | ||
pytest --cov=./ --cov-report=xml | ||
run: pytest --cov=./ --cov-report=xml | ||
- name: Upload python coverage to codecov.io | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
|
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
from .pytket_tk2 import * | ||
from .pytket_tk2 import * # noqa: F403,F405 | ||
|
||
__doc__ = pytket_tk2.__doc__ | ||
if hasattr(pytket_tk2, "__all__"): | ||
__all__ = pytket_tk2.__all__ | ||
__doc__ = pytket_tk2.__doc__ # noqa: F405 | ||
if hasattr(pytket_tk2, "__all__"): # noqa: F405 | ||
__all__ = pytket_tk2.__all__ # noqa: F405 |