Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
9118c80
Update version
TheoLaudatQM Mar 31, 2026
17b5ba7
update test name
TheoLaudatQM Mar 31, 2026
88a93a7
test with 3.13.0
TheoLaudatQM Apr 13, 2026
dbc562f
test with 3.12
TheoLaudatQM Apr 14, 2026
fbbb9ff
test with 3.12
TheoLaudatQM Apr 14, 2026
3cbd1ff
test with 3.11
TheoLaudatQM Apr 14, 2026
abb95b1
revert pyproject to 3.12
TheoLaudatQM Apr 14, 2026
0bfe3c0
revert pyproject to 3.12
TheoLaudatQM Apr 16, 2026
bf40b79
Test again with Numpy 2
TheoLaudatQM Apr 16, 2026
e243e49
Test again with Python 3.12
TheoLaudatQM Apr 16, 2026
a9d1695
Test again with Python 3.13
TheoLaudatQM Apr 16, 2026
053273b
Test again with Python 3.13.0
TheoLaudatQM Apr 16, 2026
6b5fe92
Get workflow from quam-builder
TheoLaudatQM Apr 16, 2026
ce46a71
Clean test
TheoLaudatQM Apr 16, 2026
7254c38
wip
TheoLaudatQM Apr 16, 2026
688ee3d
wip
TheoLaudatQM Apr 16, 2026
99851b8
wip
TheoLaudatQM Apr 16, 2026
5371082
wip
TheoLaudatQM Apr 16, 2026
8e73236
wip
TheoLaudatQM Apr 16, 2026
4fd675a
wip
TheoLaudatQM Apr 16, 2026
5e2b9e9
pylint
TheoLaudatQM Apr 16, 2026
ee4dbc9
pylint
TheoLaudatQM Apr 16, 2026
6741ea6
pylint
TheoLaudatQM Apr 16, 2026
912fac5
pylint
TheoLaudatQM Apr 16, 2026
e815d97
pylint
TheoLaudatQM Apr 16, 2026
28304a1
refactor tests folder
TheoLaudatQM Apr 16, 2026
e3be2a9
put back right quam-builder version
TheoLaudatQM Apr 16, 2026
6a5eb03
put back right quam-builder version
TheoLaudatQM Apr 16, 2026
da44123
put back right quam-builder version
TheoLaudatQM Apr 16, 2026
f070614
put back right quam-builder version
TheoLaudatQM Apr 16, 2026
4b3258f
fix python version
TheoLaudatQM Apr 16, 2026
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
57 changes: 44 additions & 13 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,60 @@
name: Run Tests
name: CI

on:
push:
branches: [main]
pull_request:
types: [opened, synchronize, reopened]
branches: [main]
workflow_dispatch:

jobs:
test:
runs-on: ubuntu-latest
lint-and-test:
name: Python ${{ matrix.python-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ["3.10", "3.11", "3.12", "3.13"]

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history for pre-commit to compare

- name: Set up Python 3.11
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: '3.13'
cache: 'pip'
python-version: ${{ matrix.python-version }}

- name: Install uv
uses: astral-sh/setup-uv@v4
with:
enable-cache: true
cache-dependency-glob: "pyproject.toml"

- name: Install dependencies
run: |
pip install --upgrade pip
pip install git+https://github.com/qua-platform/quam-builder.git
pip install -e .
pip install pytest
uv sync --group dev --prerelease=allow

- name: Run pre-commit on changed files
run: |
if [ "${{ github.event_name }}" == "pull_request" ]; then
uv run pre-commit run --from-ref origin/${{ github.base_ref }} --to-ref HEAD
else
uv run pre-commit run --from-ref HEAD~1 --to-ref HEAD
fi

- name: Run tests with pytest
run: |
uv run pytest tests/ --verbose --cov --cov-report=xml --cov-report=term

- name: Run tests
run: pytest -v
- name: Upload coverage to Codecov
if: matrix.python-version == '3.12' && matrix.os == 'ubuntu-latest'
uses: codecov/codecov-action@v4
with:
file: ./coverage.xml
flags: unittests
name: codecov-umbrella
fail_ci_if_error: false
48 changes: 48 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
repos:
# 1. Generic hygiene hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-merge-conflict
- id: check-added-large-files
exclude: ^uv\.lock$
- id: check-yaml
- id: check-json

# 2. Black: code formatting
- repo: https://github.com/psf/black
rev: 24.10.0
hooks:
- id: black
language_version: python3

# 3. Pylint: linting with QUA plugin for suppressing false positives in QUA contexts
# Uses language: system to access the local pylint_qua_plugin package
- repo: local
hooks:
- id: pylint
name: pylint
entry: python -m pylint --rcfile=.pylintrc
language: system
types: [python]
# Exclude the pylint plugin and its test files (which contain intentional lint violations)
exclude: ^(pylint_qua_plugin|tests/pylint_plugin|tests)/
# 4. Type checking – heavier, so run on push instead of every commit
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.11.1
hooks:
- id: mypy
stages: [pre-push]
additional_dependencies:
# Add stubs/internal deps here as needed
- types-setuptools

# 5. Conventional commit messages (commitizen)
- repo: https://github.com/commitizen-tools/commitizen
rev: v3.29.0
hooks:
- id: commitizen
stages: [commit-msg]
additional_dependencies: ["commitizen"]
39 changes: 39 additions & 0 deletions .pylintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
[MAIN]
# Load the QUA plugin for suppressing false positives in QUA contexts
# The init-hook finds the repo root (where pyproject.toml lives) and adds it to sys.path
init-hook=import sys, os; d = os.getcwd(); exec('while d != os.path.dirname(d):\n if os.path.isfile(os.path.join(d, "pyproject.toml")): sys.path.insert(0, d); break\n d = os.path.dirname(d)')
load-plugins=pylint_qua_plugin

# Folders to ignore
# tests/pylint_plugin contains intentional lint violations for testing the plugin
ignore=venv,.venv,pylint_qua_plugin,tests/pylint_plugin
ignore-patterns=^tests/

[MESSAGES CONTROL]
# Enable ONLY:
# E = Errors
# R = Refactor suggestions
# C = Convention checks
# F = fatal
enable=E, R, F, C

# Disable W (Warnings), and I (Information)
# Also disable specific checks that don't fit this codebase:
# - invalid-name: Module names start with numbers (01a_time_of_flight), variables use physics conventions (I, Q)
# - import-error, no-name-in-module: quam_config is project-specific, pylint can't resolve it
# - too-many-locals: Quantum calibration code often needs many variables
disable=W, I, invalid-name, import-error, no-name-in-module, too-many-locals, duplicate-code, too-many-branches, too-many-return-statements, too-many-arguments, too-many-positional-arguments, too-many-lines, wrong-import-order, ungrouped-imports, consider-iterating-dictionary, use-implicit-booleaness-not-comparison-to-zero, unexpected-keyword-arg, undefined-all-variable, missing-module-docstring, missing-function-docstring, missing-class-docstring, missing-final-newline, line-too-long, wrong-import-position, import-outside-toplevel, consider-using-with, no-else-raise, unnecessary-dunder-call, undefined-variable, no-else-return, no-else-continue, too-many-instance-attributes, too-many-public-methods, useless-return, consider-using-in, use-dict-literal, no-value-for-parameter, too-few-public-methods, inconsistent-return-statements, unnecessary-comprehension, redefined-outer-name, use-implicit-booleaness-not-comparison, function-redefined, use-implicit-booleaness-not-comparison-to-string


[REPORTS]
# Cleaner output, no extra reports
reports=no


[FORMAT]
# Optional — set your preferred line length
max-line-length=120


[DESIGN]
max-parents=15
11 changes: 7 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)

## [Unreleased]

## [0.3.0] - 2026-03-31
### Added
- Added support for Python 3.13.
-
- Added support for Python 3.13 and Numpy 2.

### Fixed
- parameters: Use qualibrate.core.parameters instead of removed qualibrate.parameters (fixes ModuleNotFoundError with current qualibrate API).
- analysis/fitting - allows the fit to converge even if the exponential is inverted.
- analysis/fitting - fit oscillations in a more robust manner.
- analysis/fitting - fit oscillations in a more robust manner.

### Changed
- Raise minimum qualibrate to 1.0.2 and require Python >=3.10 to align with qualibrate.
Expand Down Expand Up @@ -41,7 +43,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
### Added
- First release for the Superconducting QUAlibration graph.

[Unreleased]: https://github.com/qua-platform/qualibration-libs/compare/v0.2.1...HEAD
[Unreleased]: https://github.com/qua-platform/qualibration-libs/compare/v0.3.0...HEAD
[0.2.1]: https://github.com/qua-platform/qualibration-libs/releases/tag/v0.3.0
[0.2.1]: https://github.com/qua-platform/qualibration-libs/releases/tag/v0.2.1
[0.2.0]: https://github.com/qua-platform/qualibration-libs/releases/tag/v0.2.0
[0.1.0]: https://github.com/qua-platform/qualibration-libs/releases/tag/v0.1.0
Loading
Loading