forked from pyvista/pyvistaqt
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/main' into mem
* upstream/main: (125 commits) Bump check-jsonschema from 0.17.1 to 0.20.0 (pyvista#261) Bump pre-commit from 2.20.0 to 2.21.0 (pyvista#263) Bump matplotlib from 3.5.2 to 3.6.2 (pyvista#262) Bump isort from 5.10.1 to 5.11.4 (pyvista#264) Bump pre-commit-hooks from 4.3.0 to 4.4.0 (pyvista#260) Bump flake8 from 4.0.1 to 6.0.0 (pyvista#251) Bump actions/checkout from 2 to 3 in /.github/workflows (pyvista#246) Bump pylint from 2.13.0 to 2.15.9 (pyvista#256) Bump peter-evans/create-pull-request from 3 to 4 in /.github/workflows (pyvista#249) Bump codecov/codecov-action from 2 to 3 in /.github/workflows (pyvista#247) Bump actions/setup-python from 2 to 4 in /.github/workflows (pyvista#248) Bump numpy from 1.21.6 to 1.24.1 (pyvista#257) Bump ipython from 7.34.0 to 8.8.0 (pyvista#259) Update pre-commit hooks (pyvista#231) BUG: Safe app window close (pyvista#258) update pre-commit hooks (pyvista#228) Bump pyvista from 0.35.2 to 0.36.0 (pyvista#217) Bump imageio from 2.20.0 to 2.21.0 (pyvista#216) Bump sphinx from 5.0.2 to 5.1.1 (pyvista#213) Bump imageio from 2.19.5 to 2.20.0 (pyvista#214) ...
- Loading branch information
Showing
46 changed files
with
2,623 additions
and
920 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,5 @@ | ||
#!/bin/sh | ||
set -x | ||
#!/bin/bash -ef | ||
|
||
# sudo apt-get update && sudo apt-get install python-qt4 libgl1-mesa-glx | ||
sudo apt-get install python-qt4 libgl1-mesa-glx | ||
sudo apt-get install -y xvfb | ||
export DISPLAY=:99.0 | ||
export PYVISTA_OFF_SCREEN=True | ||
which Xvfb | ||
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 & | ||
# Debugging commands: | ||
# ls -l /etc/init.d/ | ||
# sh -e /etc/init.d/xvfb start | ||
# give xvfb some time to start | ||
sleep 3 | ||
set +x | ||
sudo apt-get update | ||
sudo apt-get install -yqq libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0 libxcb-shape0 libopengl0 libegl1 | ||
/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 1400x900x24 -ac +extension GLX +render -noreset |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[codespell] | ||
skip = ./.ci/*,./.git/*,./.hypothesis/*,./dist/*,./doc/examples/*,./doc/images/*,./docs/_build/*,./docs/images/*,./tests/tinypages/_build/*,.hypothesis*,*.doctree,*.eot,*.gif,*.html,*.inv,*.ipynb,*.jpg,*.js,*.json,*.mp4,*.mypy_cache/*,*.pickle,*.ply,*.png,*.pyc,*.ttf,*.txt,*.vti,*.vtk,*.vtu,*.woff,*.woff2,*.yml,*/_autosummary/*,*~,*cover,doc/_build/*,flycheck* | ||
ignore-words-list = lod,byteorder,flem,parm,doubleclick,revered,PullRequest | ||
quiet-level = 3 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
[run] | ||
branch = True | ||
source = pyvistaqt | ||
omit = | ||
*/setup.py | ||
*/pyvistaqt/rwi.py | ||
|
||
[report] | ||
exclude_lines = | ||
pragma: no cover | ||
if __name__ == .__main__.: | ||
@abstractmethod | ||
@abstractclassmethod |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
[flake8] | ||
max-line-length = 88 | ||
exclude = | ||
__pycache__, | ||
.venv, | ||
.cache, | ||
.eggs | ||
.git, | ||
.tox, | ||
*.egg-info, | ||
*.pyc, | ||
*.pyi, | ||
build, | ||
dist, | ||
# This is adopted from VTK | ||
pyvistaqt/rwi.py, | ||
# Only lint source files | ||
tests/*.py, | ||
docs/*.py, | ||
# Ignore errors here in this commit (fix in future PR) | ||
pyvistaqt/*.py, | ||
setup.py | ||
max-complexity = 10 | ||
doctests = true | ||
extend-ignore = | ||
# whitespace before ':' | ||
E203, | ||
# line break before binary operator | ||
W503, | ||
# line length too long | ||
E501, | ||
# do not assign a lambda expression, use a def | ||
E731, | ||
# missing class docstring; use ``__init__`` docstring instead | ||
D101, | ||
# missing docstring in magic method | ||
D105, | ||
# Qt uses camelCase | ||
N802 | ||
per-file-ignores = | ||
# Allow re-export of modules at package level | ||
__init__.py:F401 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "pip" # See documentation for possible values | ||
directory: "/" # Location of package manifests | ||
insecure-external-code-execution: allow | ||
schedule: | ||
interval: "daily" | ||
labels: | ||
- "maintenance" | ||
- "dependencies" | ||
- package-ecosystem: "github-actions" | ||
directory: "/.github/workflows" | ||
schedule: | ||
interval: "daily" | ||
labels: | ||
- "maintenance" | ||
- "dependencies" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,170 @@ | ||
name: 'CI' | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.number }}-${{ github.event.ref }} | ||
cancel-in-progress: true | ||
on: | ||
push: | ||
branches: | ||
- '*' | ||
pull_request: | ||
branches: | ||
- '*' | ||
schedule: | ||
- cron: "0 4 * * *" | ||
|
||
jobs: | ||
pip-pre: | ||
name: ubuntu-latest / Python3.9 / ${{ matrix.qt }} / pyvista-main / qtpy-master | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
qt: ['None', 'PySide2', 'PySide6', 'PyQt5', 'PyQt6'] | ||
defaults: | ||
run: | ||
shell: bash | ||
env: | ||
ALLOW_PLOTTING: 'true' | ||
DISPLAY: ':99' | ||
PYTHON_VERSION: '3.9' | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- run: .ci/setup_headless_display.sh | ||
name: 'Setup xvfb' | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ env.PYTHON_VERSION }} | ||
name: 'Setup python' | ||
- run: | | ||
python -m pip install --upgrade pip wheel | ||
pip install --upgrade -r requirements_test.txt | ||
pip install --upgrade --progress-bar off https://github.com/pyvista/pyvista/zipball/main https://github.com/spyder-ide/qtpy/zipball/master | ||
name: 'Install dependencies with pip' | ||
- run: pip install ${{ matrix.qt }} | ||
name: 'Install Qt binding' | ||
if: matrix.qt != 'None' | ||
- run: | | ||
pip install -e . | ||
python -c "import pyvista; print(pyvista.Report())" | ||
name: 'Install pyvistaqt' | ||
- run: python pyvistaqt/rwi.py | ||
name: 'Run QVTKRenderWidgetConeExample' | ||
if: matrix.qt != 'None' | ||
- run: pytest -v --cov pyvistaqt --cov-report html | ||
name: 'Run Tests' | ||
if: matrix.qt != 'None' | ||
- run: | | ||
pip uninstall -y pytest-qt | ||
pytest -v tests/test_qt.py | ||
name: 'Import without Qt' | ||
if: matrix.qt == 'None' | ||
- uses: codecov/codecov-action@v3 | ||
if: success() | ||
name: 'Upload coverage to CodeCov' | ||
|
||
pip: | ||
name: ${{ matrix.os }} / pip / PyQt5 / pyvista-${{ matrix.pyvista }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: ['ubuntu-latest', 'macos-latest', 'windows-latest'] | ||
pyvista: ['0'] # All OSes on latest release | ||
include: # and Linux for older ones | ||
- os: 'ubuntu-latest' | ||
pyvista: '0.32' | ||
- os: 'ubuntu-latest' | ||
pyvista: '0.33' | ||
- os: 'ubuntu-latest' | ||
pyvista: '0.34' | ||
- os: 'ubuntu-latest' | ||
pyvista: '0.35' | ||
- os: 'ubuntu-latest' | ||
pyvista: '0.36' | ||
defaults: | ||
run: | ||
shell: bash | ||
env: | ||
ALLOW_PLOTTING: 'true' | ||
DISPLAY: ':99' | ||
PYTHON_VERSION: '3.9' | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- run: .ci/setup_headless_display.sh | ||
name: 'Setup xvfb' | ||
if: matrix.os == 'ubuntu-latest' | ||
- run: | | ||
git clone --depth 1 https://github.com/pyvista/gl-ci-helpers.git | ||
./gl-ci-helpers/appveyor/install_opengl.ps1 | ||
shell: pwsh | ||
name: 'Setup opengl' | ||
if: matrix.os == 'windows-latest' | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ env.PYTHON_VERSION }} | ||
name: 'Setup python' | ||
- run: | | ||
python -m pip install --upgrade pip wheel | ||
pip install -r requirements_test.txt | ||
name: 'Install dependencies with pip' | ||
- run: pip install PyQt5 | ||
name: 'Install Qt binding' | ||
- run: pip install --upgrade "pyvista==${{ matrix.pyvista }}.*" | ||
name: 'Install PyVista' | ||
- run: | | ||
pip install -e . | ||
python -c "import pyvista; print(pyvista.Report())" | ||
name: 'Install pyvistaqt' | ||
- run: pytest -v --cov pyvistaqt --cov-report html | ||
name: 'Run Tests' | ||
- uses: codecov/codecov-action@v3 | ||
if: success() | ||
name: 'Upload coverage to CodeCov' | ||
|
||
conda: | ||
name: ${{ matrix.os }} / conda / ${{ matrix.qt }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: ['ubuntu-latest', 'macos-latest', 'windows-latest'] | ||
qt: ['PyQt5'] | ||
defaults: | ||
run: | ||
shell: bash | ||
env: | ||
ALLOW_PLOTTING: 'true' | ||
DISPLAY: ':99' | ||
CONDA_ENV: 'environment.yml' | ||
PYTHON_VERSION: '3.8' | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- run: .ci/setup_headless_display.sh | ||
name: 'Setup xvfb' | ||
if: matrix.os == 'ubuntu-latest' | ||
- run: | | ||
git clone --depth 1 https://github.com/pyvista/gl-ci-helpers.git | ||
./gl-ci-helpers/appveyor/install_opengl.ps1 | ||
shell: pwsh | ||
name: 'Setup opengl' | ||
if: matrix.os == 'windows-latest' | ||
- uses: conda-incubator/setup-miniconda@v2 | ||
with: | ||
activate-environment: 'pyvistaqt-env' | ||
python-version: ${{ env.PYTHON_VERSION }} | ||
environment-file: ${{ env.CONDA_ENV }} | ||
name: 'Setup conda' | ||
- shell: bash -el {0} | ||
run: pip install ${{ matrix.qt }} | ||
name: 'Install Qt binding' | ||
- shell: bash -el {0} | ||
run: | | ||
pip install -e . | ||
python -c "import pyvista; print(pyvista.Report())" | ||
name: 'Install pyvistaqt' | ||
- shell: bash -el {0} | ||
run: pytest -v --cov pyvistaqt --cov-report html | ||
name: 'Run Tests' | ||
- uses: codecov/codecov-action@v3 | ||
if: success() | ||
name: 'Upload coverage to CodeCov' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Pre-commit auto-update | ||
|
||
on: | ||
# every sunday at midnight GMT | ||
schedule: | ||
- cron: "0 0 * * 0" | ||
# on demand | ||
workflow_dispatch: | ||
|
||
jobs: | ||
auto-update: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
|
||
- name: Install pre-commit | ||
run: pip install pre-commit | ||
|
||
- name: Run pre-commit autoupdate | ||
run: pre-commit autoupdate | ||
|
||
- uses: peter-evans/create-pull-request@v4 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
branch: ci/update-pre-commit-hooks | ||
title: Update pre-commit hooks | ||
commit-message: "update pre-commit hooks" | ||
body: Update versions of pre-commit hooks to latest version. |
Oops, something went wrong.