1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90
|
# check spelling, codestyle
name: Style and Docstring Check
on: [pull_request, workflow_dispatch]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
PYTEST_ADDOPTS: "--color=yes"
permissions:
id-token: none
jobs:
docstringcheck:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.13
cache: "pip"
- uses: actions/cache@v4
with:
path: ~/.local/share/pyvista/examples
key: Examples-Data-${{ hashFiles('*') }}
restore-keys: |
Examples-Data-
- name: Install pyvista and doctest requirements
run: |
pip install --upgrade pip
pip install -e . --group test
- name: Setup headless display
uses: pyvista/setup-headless-display-action@7d84ae825e6d9297a8e99bdbbae20d1b919a0b19
- name: Software Report
run: |
python -c "import pyvista; print(pyvista.Report()); from pyvista import examples; print('Examples path:', examples.USER_DATA_PATH)"
which python
pip list
- name: Test Package Docstrings
run: make doctest-modules
- name: Test Package Docstrings with Local Namespace
run: make doctest-modules-local-namespace
vale:
name: Vale
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.13
- name: Install test dependencies
run: |
pip install --upgrade pip
pip install . --group docs
# this is equivalent to
# vale --config doc/.vale.ini doc pyvista examples
# GHA SHA is pinned to a reviewdog branch commit
- name: "Run Vale"
uses: errata-ai/vale-action@dcded780f1ff68e2558e802a165a484a4a3e2fb8
with:
files: '["doc", "pyvista", "examples"]'
vale_flags: "--config=doc/.vale.ini"
reporter: github-pr-check
level: error
filter_mode: nofilter
fail_on_error: true
version: 2.29.5
reviewdog_url: https://github.com/reviewdog/reviewdog/releases/download/v0.17.5/reviewdog_0.17.5_Linux_x86_64.tar.gz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|