Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add actions #8

Merged
merged 18 commits into from
Oct 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[run]
omit =
setup.py
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
28 changes: 28 additions & 0 deletions .github/workflows/test_all.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Run all Qadence tests on schedule.

on:
schedule:
# 03:00 every Saturday morning
- cron: '0 3 * * 6'
workflow_dispatch: {}

concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
test_qadence_ubuntu:
name: Test Qadence (ubuntu)
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Select Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install Hatch
run: |
pip install hatch
- name: Run tests
run: |
hatch -v run test
33 changes: 33 additions & 0 deletions .github/workflows/test_docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Run Qadence docs tests.

on:
push:
branches:
- main
pull_request:
branches:
- main
paths:
- docs
workflow_dispatch: {}

concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
test_qadence_ubuntu:
name: Test Qadence (ubuntu)
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Select Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install Hatch
run: |
pip install hatch
- name: Run doc tests
run: |
hatch -e docs run test-docs
35 changes: 35 additions & 0 deletions .github/workflows/test_examples.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Run Qadence example tests.

on:
push:
branches:
- main
pull_request:
branches:
- main
paths:
- examples
paths-ignore:
- examples/notebooks
workflow_dispatch: {}

concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
test_qadence_ubuntu:
name: Test Qadence (ubuntu)
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Select Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install Hatch
run: |
pip install hatch
- name: Run example tests
run: |
hatch -v run test-examples
14 changes: 5 additions & 9 deletions .github/workflows/test.yml → .github/workflows/test_fast.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
name: Test Qadence.
name: Run Qadence fast tests.

on:
pull_request:
push:
branches:
- main
- develop
push:
pull_request:
branches:
- develop
schedule:
# 03:00 every Saturday morning
- cron: '0 3 * * 6'
- main
workflow_dispatch: {}

concurrency:
Expand All @@ -30,6 +26,6 @@ jobs:
- name: Install Hatch
run: |
pip install hatch
- name: Run tests
- name: Run fast tests
run: |
hatch -v run test -m "not slow"
33 changes: 33 additions & 0 deletions .github/workflows/test_notebooks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Run Qadence notebooks tests.

on:
push:
branches:
- main
pull_request:
branches:
- main
paths:
- examples/notebooks
workflow_dispatch: {}

concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
test_qadence_ubuntu:
name: Test Qadence (ubuntu)
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Select Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install Hatch
run: |
pip install hatch
- name: Run notebooks tests
run: |
hatch -v run test-notebooks
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
<h1 style="display: none;">noheading</h1>

!!! warning "Large Logo"
Put a large verion of the logo herec.
# Qadence

Qadence is a Python package that provides a simple interface to build _**digital-analog quantum
programs**_ with tunable interaction defined on _**arbitrary qubit register layouts**_.

[![pre-commit](https://github.com/pasqal-io/qadence/actions/workflows/lint.yml/badge.svg)](https://github.com/pasqal-io/qadence/actions/workflows/lint.yml)
[![tests](https://github.com/pasqal-io/qadence/actions/workflows/test_fast.yml/badge.svg)](https://github.com/pasqal-io/qadence/actions/workflows/test_fast.yml)

## Feature highlights

* A [block-based system](tutorials/getting_started.md) for composing _**complex digital-analog
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ dependencies = [
features = ["all"]

[tool.hatch.envs.default.scripts]
test = "pytest --cov-report=term-missing --cov-config=pyproject.toml --cov=qadence --cov=tests --ignore=./tests/test_examples.py --ignore=./tests/test_notebooks.py {args}"
test = "pytest --cov-report=xml --cov-config=pyproject.toml --cov=qadence --cov=tests --ignore=./tests/test_examples.py --ignore=./tests/test_notebooks.py {args}"
test-examples = "pytest ./tests/test_examples.py {args}"
test-notebooks = "pytest ./tests/test_notebooks.py {args}"
no-cov = "cov --no-cov {args}"
Expand Down