Fix rendering of vertexes of shape layers with small scale #13107
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
# Our minimal suite of tests that run on each pull request | |
name: PR Test | |
on: | |
pull_request: | |
branches: | |
- main | |
- "v*x" | |
paths-ignore: | |
- 'docs/**' | |
env: | |
COLUMNS: 120 | |
jobs: | |
manifest: | |
# make sure all necessary files will be bundled in the release | |
name: Check Manifest | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
cache-dependency-path: setup.cfg | |
- name: Check Manifest | |
run: | | |
pip install --upgrade pip | |
pip install -e .[build] | |
make typestubs | |
make check-manifest | |
localization_syntax: | |
# make sure all necessary files will be bundled in the release | |
name: Check l18n syntax | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.x" | |
- name: Check localization formatting | |
run: | | |
pip install --upgrade pip semgrep | |
# f"..." and f'...' are the same for semgrep | |
semgrep --error --lang python --pattern 'trans._(f"...")' napari | |
semgrep --error --lang python --pattern 'trans._($X.format(...))' napari | |
test: | |
name: ${{ matrix.platform }} ${{ matrix.python }} ${{ matrix.toxenv || matrix.backend }} ${{ matrix.MIN_REQ && 'min_req' }} | |
runs-on: ${{ matrix.platform }} | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: [ubuntu-latest] | |
python: ["3.8", "3.9", "3.10", "3.11"] | |
backend: [pyqt5, pyside2] | |
pydantic: ["_pydantic_1"] | |
exclude: | |
- python: '3.11' | |
backend: pyside2 | |
include: | |
# Windows py38 | |
- python: 3.8 | |
platform: windows-latest | |
backend: pyqt5 | |
- python: 3.8 | |
platform: windows-latest | |
backend: pyside2 | |
- python: 3.9 | |
platform: macos-latest | |
backend: pyqt5 | |
# minimum specified requirements | |
- python: 3.8 | |
platform: ubuntu-20.04 | |
backend: pyqt5 | |
MIN_REQ: 1 | |
# test with --async_only | |
- python: 3.8 | |
platform: ubuntu-20.04 | |
toxenv: async-pyqt5-py38-linux | |
# test without any Qt backends | |
- python: 3.8 | |
platform: ubuntu-20.04 | |
backend: headless | |
- python: 3.9 | |
platform: ubuntu-latest | |
backend: pyqt5 | |
pydantic: "" | |
- python: 3.11 | |
platform: ubuntu-latest | |
backend: pyqt6 | |
pydantic: "" | |
- python: 3.9 | |
platform: ubuntu-latest | |
backend: pyside6 | |
# pyside 6 | |
- python: '3.10' | |
platform: ubuntu-latest | |
backend: pyside6 | |
- python: '3.11' | |
platform: ubuntu-latest | |
backend: pyside6 | |
steps: | |
- name: Cancel Previous Runs | |
uses: styfle/cancel-workflow-action@0.11.0 | |
with: | |
access_token: ${{ github.token }} | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python }} | |
cache: "pip" | |
cache-dependency-path: setup.cfg | |
- uses: tlambert03/setup-qt-libs@v1 | |
# strategy borrowed from vispy for installing opengl libs on windows | |
- name: Install Windows OpenGL | |
if: runner.os == 'Windows' | |
run: | | |
git clone --depth 1 https://github.com/pyvista/gl-ci-helpers.git | |
powershell gl-ci-helpers/appveyor/install_opengl.ps1 | |
if (Test-Path -Path "C:\Windows\system32\opengl32.dll" -PathType Leaf) {Exit 0} else {Exit 1} | |
- name: Disable ptrace security restrictions | |
if: runner.os == 'Linux' | |
run: | | |
echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope | |
# tox and tox-gh-actions will take care of the "actual" installation | |
# of python dependendencies into a virtualenv. see tox.ini for more | |
- name: Install dependencies | |
run: | | |
pip install --upgrade pip | |
pip install setuptools tox tox-gh-actions | |
python tools/minreq.py | |
env: | |
# tools/minreq.py sets all deps to their minumim stated versions | |
# it is a no-op if MIN_REQ is not set | |
MIN_REQ: ${{ matrix.MIN_REQ }} | |
# here we pass off control of environment creation and running of tests to tox | |
# tox-gh-actions, installed above, helps to convert environment variables into | |
# tox "factors" ... limiting the scope of what gets tested on each platform | |
# for instance, on ubuntu-latest with python 3.8, it would be equivalent to this command: | |
# `tox -e py38-linux-pyqt,py38-linux-pyside` | |
# see tox.ini for more | |
- name: Test with tox | |
uses: aganders3/headless-gui@v1 | |
with: | |
run: python -m tox | |
env: | |
PLATFORM: ${{ matrix.platform }} | |
BACKEND: ${{ matrix.backend }} | |
TOXENV: ${{ matrix.toxenv }} | |
NUMPY_EXPERIMENTAL_ARRAY_FUNCTION: ${{ matrix.MIN_REQ || 1 }} | |
PYVISTA_OFF_SCREEN: True | |
MIN_REQ: ${{ matrix.MIN_REQ }} | |
FORCE_COLOR: 1 | |
PIP_CONSTRAINT: resources/constraints/constraints_py${{ matrix.python }}${{ matrix.MIN_REQ && '_min_req' }}${{ matrix.pydantic }}.txt | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: upload pytest timing reports as json | |
path: | | |
./report-*.json | |
- name: Coverage | |
uses: codecov/codecov-action@v3 | |
test_pip_install: | |
name: ubuntu-latest 3.9 pip install | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
path: napari-from-github | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
cache: "pip" | |
cache-dependency-path: napari-from-github/setup.cfg | |
- uses: tlambert03/setup-qt-libs@v1 | |
- name: Install this commit | |
run: | | |
pip install --upgrade pip | |
pip install ./napari-from-github[all,testing] | |
env: | |
PIP_CONSTRAINT: napari-from-github/resources/constraints/constraints_py3.9.txt | |
- name: Test | |
uses: aganders3/headless-gui@v1 | |
with: | |
run: | | |
python -m pytest --pyargs napari --color=yes | |
python -m pytest --pyargs napari_builtins --color=yes | |
test_examples: | |
name: test examples | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
cache-dependency-path: setup.cfg | |
- uses: tlambert03/setup-qt-libs@v1 | |
- name: Install this commit | |
run: | | |
pip install --upgrade pip | |
pip install setuptools tox tox-gh-actions | |
- name: Test | |
uses: aganders3/headless-gui@v1 | |
with: | |
run: tox -e py39-linux-pyside2-examples | |
env: | |
PIP_CONSTRAINT: resources/constraints/constraints_py3.9_examples.txt |