Skip to content

Clipping magnitude and phase #1055

Clipping magnitude and phase

Clipping magnitude and phase #1055

Workflow file for this run

name: Tests
on:
# Trigger the workflow on push or pull request,
# but only for the main branch
push:
branches:
- master
pull_request:
branches:
- master
- dev
- hotfixes
# Also trigger on page_build, as well as release created events
page_build:
release:
types: # This configuration does not affect the page_build event above
- created
jobs:
build-linux:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -el {0}
strategy:
max-parallel: 10
fail-fast: false
matrix:
python-version:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
- "3.13"
conda-env:
- "core"
- "full"
name: Python ${{ matrix.python-version }} and ${{ matrix.conda-env }} dependencies
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
auto-activate-base: false
conda-remove-defaults: true
channels: conda-forge
activate-environment: ptypy_env
python-version: ${{ matrix.python-version }}
miniforge-version: latest
- name: Install ${{ matrix.conda-env }} dependencies
run: |
sed -i 's/python/python=${{ matrix.python-version }}/' dependencies_${{ matrix.conda-env }}.yml
conda install -c conda-forge mpich
conda env update --file dependencies_${{ matrix.conda-env }}.yml --name ptypy_env
conda install -c conda-forge flake8 pytest pytest-cov
conda list
- name: Prepare ptypy
run: pip install .
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --ignore=F824 --show-source --statistics
- name: Test with pytest
run: pytest -v