Skip to content
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
44 changes: 44 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Lint and test idscope with both kinds of Qt binding, without a display.
name: tests

on:
push:
branches: [main]
pull_request:
workflow_dispatch:

jobs:
test:
name: Python ${{ matrix.python }}, ${{ matrix.qt }}
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
include:
# imas-core, which imas-python needs, has wheels from Python 3.10 on
- python: "3.10"
qt: PyQt5
- python: "3.12"
qt: PySide6
env:
QT_QPA_PLATFORM: offscreen
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
cache: pip
cache-dependency-path: pyproject.toml
- name: Libraries that Qt loads
run: |
sudo apt-get update
sudo apt-get install -y libegl1 libgl1 libxkbcommon0 libfontconfig1
- name: Install
run: |
python -m pip install --upgrade pip
python -m pip install -e ".[test]" ${{ matrix.qt }} pyflakes
- name: pyflakes
run: python -m pyflakes src tests
- name: pytest
run: python -m pytest -q
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# idscope

[![tests](https://github.com/icyspirit/idscope/actions/workflows/tests.yml/badge.svg)](https://github.com/icyspirit/idscope/actions/workflows/tests.yml)

A lightweight [jScope](https://www.mdsplus.org/index.php/Documentation:Tutorial:GUIs:jScope)-like
viewer for [IMAS](https://imas.iter.org) IDS data. It reads data with
[imas-python](https://github.com/iterorganization/IMAS-Python) and draws it with
Expand Down Expand Up @@ -357,7 +359,8 @@ QT_QPA_PLATFORM=offscreen pytest
```

The tests create synthetic data (netCDF and HDF5) and use the ITER 134173/106 training
data bundled with imas-python.
data bundled with imas-python. GitHub Actions runs them, and pyflakes, on every pull
request, with PyQt5 (Python 3.10) and with PySide6 (Python 3.12).

Code layout: `idscope.data` (sources, signal paths, extraction; no Qt),
`idscope.config` (YAML configuration), `idscope.templates` (YAML templates),
Expand Down
Loading