Skip to content

Deprecation of the top-level cmap registration and access functions in mpl.cm in plot_utils.py from matplotlib 3.9.0 #785

Deprecation of the top-level cmap registration and access functions in mpl.cm in plot_utils.py from matplotlib 3.9.0

Deprecation of the top-level cmap registration and access functions in mpl.cm in plot_utils.py from matplotlib 3.9.0 #785

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
strategy:
max-parallel: 10
fail-fast: false
matrix:
python-version:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
conda-env:
- "core"
- "full"
name: Python ${{ matrix.python-version }} and ${{ matrix.conda-env }} dependencies
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
# - name: Setup MPI
# uses: mpi4py/setup-mpi@v1
# with:
# mpi: openmpi
- name: Add conda to system path
run: |
# $CONDA is an environment variable pointing to the root of the miniconda directory
echo $CONDA/bin >> $GITHUB_PATH
conda --version
- name: Make sure conda is updated
run: |
conda update conda
conda --version
- name: Install ${{ matrix.conda-env }} dependencies
run: |
# replace python version in dependencies
sed -i 's/python/python=${{ matrix.python-version }}/' dependencies_${{ matrix.conda-env }}.yml
if [ ${{ matrix.conda-env }} == 'full' ] && [ ${{ matrix.python-version }} == '3.12' ]; then
sed -i '/- pyfftw/d' dependencies_${{ matrix.conda-env }}.yml
fi
if [ ${{ matrix.conda-env }} == 'full' ] && [ ${{ matrix.python-version }} == '3.9' ]; then
sed -i '/- mpi4py/d' dependencies_${{ matrix.conda-env }}.yml
fi
conda env update --file dependencies_${{ matrix.conda-env }}.yml --name base
conda install --solver=classic flake8 pytest pytest-cov
conda list
- name: Prepare ptypy
run: |
# Install ptypy
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 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
# flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Python check
run: python --version
- name: Test core with pytest
run: |
pytest test/core_tests
- name: Setup tmate session
if: failure()
uses: mxschmitt/action-tmate@v3
- name: Test engine with pytest
run: |
pytest test/engine_tests
- name: Test io with pytest
run: |
pytest test/io_tests
- name: Test ptyscan with pytest
run: |
pytest test/ptyscan_tests
- name: Test template with pytest
run: |
pytest test/template_tests
- name: Test utils with pytest
run: |
pytest test/util_tests
- name: Test with pytest
run: |
# pytest ptypy/test -v --doctest-modules --junitxml=junit/test-results.xml --cov=ptypy --cov-report=xml --cov-report=html --cov-config=.coveragerc
pytest -vvv
# - name: cobertura-report
# if: github.event_name == 'pull_request' && (github.event.action == 'opened' || github.event.action == 'reopened' || github.event.action == 'synchronize')
# uses: 5monkeys/cobertura-action@v7
# with:
# # The GITHUB_TOKEN for this repo
# repo_token: ${{ secrets.GITHUB_TOKEN }}
# # Path to the cobertura file.
# path: coverage.xml
# # If files with 100% should be skipped from report.
# skip_covered: true
# # Minimum allowed coverage percentage as an integer.
# minimum_coverage: 90
# only_changed_files: true
# - name: Junit Report to Annotations
# uses: ashley-taylor/junit-report-annotations-action@master
# with:
# # github token
# access-token: ${{ secrets.GITHUB_TOKEN }}
# # glob to junit xml files
# path: junit/test-results.xml
# # include summary annotation
# includeSummary: true
# # max number of failed tests to include
# numFailures: 10