Skip to content

Commit

Permalink
Merge pull request #15 from QSAR-UBC/improve-ci
Browse files Browse the repository at this point in the history
Improve CI pipeline
  • Loading branch information
glassnotes authored May 11, 2024
2 parents f35cdd2 + ca80d90 commit 28b6a5b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
16 changes: 7 additions & 9 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,21 @@ jobs:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install black pytest pylint
python -m pip install pytest pylint
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
python -m pip install .
- name: Format with black
run: |
black -l 100 ionizer/*.py tests/*.py
- name: Add & Commit
uses: EndBug/[email protected]
- name: Check for black formatting
uses: psf/black@stable
with:
add: "ionizer/*.py tests/*.py"
message: "Auto-format with black"
options: "--check -l 100"
src: "./ionizer ./tests"
- name: Lint with pylint
run: |
pylint ionizer/*.py tests/*.py
Expand Down
4 changes: 2 additions & 2 deletions ionizer/identity_hunter.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ def _test_inclusion_in_identity_db(db_subset, single_gates, candidate_angles, ca
"""Helper function to test if a candidate gate identity was already found.
Args:
db_subset (Dict[str, Tuple(List[float], str, float)]): Subset of database we
wish to search for presence of idendity.
db_subset (Dict[str, Tuple(Tuple(float), str, float)]): Subset of database we
wish to search for presence of identity.
single_gates (Dict[str, List[Tuple(float, tensor)]]): Dictionary containing
which gates to generate identities from, along with list of special
cases of angles/matrices to use in identity generation.
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
pennylane>=0.33
pennylane==0.36

0 comments on commit 28b6a5b

Please sign in to comment.