Skip to content

Commit

Permalink
Update paths in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
aborgna-q committed Nov 2, 2023
1 parent 3c03354 commit eee99cb
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 16 deletions.
26 changes: 15 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion pytket-tk2/dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# Development requirements
maturin # Build wheels
black # Code formatting
ruff # Code formatting
pytket # TKET1
jupyterlab # For running the examples
graphviz # Visualisation of Hugrs in the notebooks
8 changes: 4 additions & 4 deletions pytket-tk2/pytket_tk2/__init__.py
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

0 comments on commit eee99cb

Please sign in to comment.