Skip to content

Correct detector shape of returned EBSD signal from downsample() #306

Correct detector shape of returned EBSD signal from downsample()

Correct detector shape of returned EBSD signal from downsample() #306

Workflow file for this run

name: Tests
on:
push:
branches:
- '*'
pull_request:
branches:
- '*'
workflow_dispatch:
jobs:
code:
name: code style
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: psf/black@stable
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- uses: isort/isort-action@master
with:
configuration: --profile black --filter-files --force-sort-within-sections --check-only --diff
- name: Install Black with Jupyter extension
run: |
pip install black[jupyter]
- name: Check code style of Jupyter notebooks
run: |
black --diff --line-length 77 doc/tutorials/*.ipynb
# Make sure all necessary files are included in a release
manifest:
name: check manifest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install dependencies
run: |
pip install manifix
- name: Check MANIFEST.in file
run: |
python setup.py manifix
tests:
name: ${{ matrix.os }}-py${{ matrix.python-version }}${{ matrix.LABEL }}
runs-on: ${{ matrix.os }}
timeout-minutes: 15
env:
MPLBACKEND: agg
PYTEST_ARGS: --pyargs kikuchipy --reruns 2 -n 2 --cov=kikuchipy
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ['3.10', '3.11']
include:
- os: ubuntu-latest
python-version: 3.8
DEPENDENCIES: dask==2021.8.1 diffsims==0.5.1 hyperspy==1.7.3 matplotlib==3.5 numba==0.55 numpy==1.21.6 orix==0.11.1 pooch==1.3.0 pyebsdindex==0.2 scikit-image==0.16.2
LABEL: -oldest
- os: ubuntu-latest
python-version: 3.11
LABEL: -minimum_requirement
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies and package
shell: bash
run: |
pip install wheel
pip install -U -e .'[tests]'
- name: Install oldest supported version
if: contains(matrix.LABEL, 'oldest')
run: |
pip install ${{ matrix.DEPENDENCIES }}
- name: Install optional dependencies
if: ${{ contains(matrix.LABEL, 'minimum_requirement') == false }}
shell: bash
run: |
pip install -e .'[all]'
pip install pyopencl
- name: Display Python, pip and package versions
run: |
python -V
pip -V
pip list
- name: Set up headless display necessary for PyVista on Linux
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
sudo apt-get update
sudo apt-get install xvfb
/sbin/ldconfig -p | grep stdc++ # Temporarily check location
- name: Set up headless display necessary for PyVista on Windows
if: ${{ matrix.os == 'windows-latest' }}
uses: pyvista/setup-headless-display-action@v1
- name: Run docstring tests
if: ${{ matrix.os == 'ubuntu-latest' }}
continue-on-error: true
run: |
xvfb-run pytest --doctest-modules --doctest-continue-on-failure --ignore-glob=kikuchipy/*/tests kikuchipy/*.py
- name: Run tests in a virtual X server environment on Ubuntu
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
sudo apt-get update
sudo apt-get install xvfb
xvfb-run pytest ${{ env.PYTEST_ARGS }}
- name: Run tests on Windows or macOS
if: ${{ matrix.os != 'ubuntu-latest' }}
run: |
pytest ${{ env.PYTEST_ARGS }}
- name: Generate line coverage
run: |
coverage report --show-missing
- name: Upload coverage to Coveralls
if: ${{ matrix.os == 'ubuntu-latest' }}
uses: AndreMiras/coveralls-python-action@develop
with:
parallel: true
coveralls-finish:
needs: tests
runs-on: ubuntu-latest
steps:
- name: Coveralls finished
uses: AndreMiras/coveralls-python-action@develop
with:
parallel-finished: true