Add description of how to navigate RGBA images to the kikuchipy documentation #261
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tests | |
on: | |
push: | |
branches: | |
- '*' | |
pull_request: | |
branches: | |
- '*' | |
workflow_dispatch: | |
workflow: '*' | |
env: | |
MPLBACKEND: agg | |
jobs: | |
code: | |
name: code style | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: psf/black@stable | |
- 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 | |
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.7 | |
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 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 -n 2 --cov=kikuchipy --pyargs kikuchipy | |
- name: Run tests on Windows and macOS | |
if: ${{ matrix.os != 'ubuntu-latest' }} | |
run: | | |
pytest -n 2 --cov=kikuchipy --pyargs kikuchipy | |
- 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 |