Skip to content

Commit

Permalink
Merge commit 'e77405d0b97f2beeaf167ef5bb4dbfed619668e3' of https://gi…
Browse files Browse the repository at this point in the history
  • Loading branch information
dc-devops committed Nov 23, 2021
2 parents 06c53b0 + e77405d commit 3865420
Show file tree
Hide file tree
Showing 278 changed files with 28,067 additions and 6,794 deletions.
2 changes: 2 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[run]
omit = pyvista/ext/coverage.py
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: Bug Report
about: Create a report to help us fix broken features
title: ''
labels: ''
labels: 'bug'
assignees: ''

---
Expand Down
18 changes: 18 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
name: Feature Request
about: Request that a feature be added to PyVista
title: ''
labels: 'feature-request'
assignees: ''

---

**Describe what feature you would like added.**

A clear and concise description of what you would like added.

If you are requesting that a feature from VTK be wrapped or exposed, please include links to the VTK documentation, example, or class definition.

Feel free to include pseudocode or screenshots of the requested outcome.

-----
9 changes: 9 additions & 0 deletions .github/label.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: Labeler
on: [pull_request]
jobs:
label:
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v2
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
4 changes: 4 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
documentation:
- doc/*
- examples/*
- examples_flask/*
19 changes: 19 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# release.yml

changelog:
exclude:
labels:
- ignore-for-release
categories:
- title: New Features
labels:
- enhancement
- title: Bug fixes or behavior changes
labels:
- bug
- title: Documentation
labels:
- documentation
- title: Maintenance
labels:
- maintenance
2 changes: 1 addition & 1 deletion .github/workflows/greetings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ jobs:
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
issue-message: 'Hi and welcome! Thanks for posting your first issue in the PyVista project! Someone from @pyvista/developers will chime in before too long. If your question is support related, it may be automatically transferred to [Discussions](https://github.com/pyvista/pyvista/discussions).'
pr-message: '🚀 Thanks for opening your first pull request in PyVista! 🚀\nPlease make sure you read (skim 😉) our [Contributing Guide](https://github.com/pyvista/pyvista/blob/master/CONTRIBUTING.md) and abide by our [Code of Conduct](https://github.com/pyvista/pyvista/blob/master/CODE_OF_CONDUCT.md).\n\nA few things to keep in mind:\n\n- Remember to run the tests locally to make debugging issues easier.\n- If you need help writing tests, take a look at the existing ones for inspiration. If you don not know where to start, let `@pyvista/developers` know and we will walk you through it.\n- All new features should be documented. It helps to write the docstrings for your functions/classes before writing the code. This will help you think about your code design and results in better code.\n- No matter what, we are really grateful that you put in the effort to open this PR! ⭐'
pr-message: '🚀 Thanks for opening your first pull request in PyVista! 🚀\nPlease make sure you read (skim 😉) our [Contributing Guide](https://github.com/pyvista/pyvista/blob/main/CONTRIBUTING.md) and abide by our [Code of Conduct](https://github.com/pyvista/pyvista/blob/main/CODE_OF_CONDUCT.md).\n\nA few things to keep in mind:\n\n- Remember to run the tests locally to make debugging issues easier.\n- If you need help writing tests, take a look at the existing ones for inspiration. If you don not know where to start, let `@pyvista/developers` know and we will walk you through it.\n- All new features should be documented. It helps to write the docstrings for your functions/classes before writing the code. This will help you think about your code design and results in better code.\n- No matter what, we are really grateful that you put in the effort to open this PR! ⭐'
25 changes: 25 additions & 0 deletions .github/workflows/intersphinx-update-pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Update Local Intersphinx Mappings

on:
workflow_dispatch:
schedule:
- cron: "0 3 1 * *"


jobs:
intersphinx_update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Update intersphinx objects
run: make -C doc update-intersphinx

- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
commit-message: "[create-pull-request] update local intersphinx"
body: |
Automated changes by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action
These changes update all the intersphinx mappings. To run CI close and reopen PR.
title: "Automated PR: Update Local Intersphinx"
80 changes: 80 additions & 0 deletions .github/workflows/style_docstr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# check spelling, codestyle
name: Style and Docstring Check

on: [pull_request, workflow_dispatch]

jobs:
stylecheck:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2

- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.9

- name: Install style requirements
run: |
pip install -r requirements_style.txt --disable-pip-version-check
- name: Code and Spelling Check
run: |
make stylecheck
staticcheck:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2

- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.9

- name: Install style requirements
run: |
pip install -r requirements_static.txt --disable-pip-version-check
- name: Static code check
run: |
make mypy
docstringcheck:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2

- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.9

- uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ hashFiles('setup.py') }}-${{ hashFiles('requirements_test.txt') }}

- name: Install PyVista
run: |
pip install .
- name: Install Doctest Requirements
run: |
sudo apt-get update
sudo apt-get install libgl1-mesa-glx xvfb python-tk -y
pip install -r requirements_test.txt
- name: Software Report
run: |
xvfb-run python -c "import pyvista; print(pyvista.Report())"
which python
pip list
- name: Test Package Docstrings
run: |
xvfb-run pytest -v --doctest-modules pyvista
- name: Test Package Docstrings with Local Namespace
run: |
xvfb-run make doctest-modules-local-namespace
98 changes: 92 additions & 6 deletions .github/workflows/testing-and-deployment.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
name: Unit Testing
name: Unit Testing and Deployment

on:
push:
pull_request:
workflow_dispatch:
schedule:
- cron: "0 4 * * *"
push:
tags:
- "*"
branches:
- main

jobs:
macOS:
runs-on: macos-latest
name: Mac OS Unit Testing
strategy:
matrix:
python-version: ['3.6', '3.7', '3.8', '3.9']
python-version: ['3.7', '3.8']

env:
ALLOW_PLOTTING: true
Expand All @@ -27,15 +31,22 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- uses: actions/cache@v2
with:
path: ~/Library/Caches/pip
key: Python-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('setup.py') }}-${{ hashFiles('requirements_test.txt') }}
restore-keys: |
Python-${{ runner.os }}-${{ matrix.python-version }}
- name: Install PyVista
run: |
python -m pip install wheel
python -m pip install -e .
pip install wheel
pip install -e .
python -c "import pyvista; print(pyvista.Report(gpu=False))"
- name: Install test dependencies
run: |
python -m pip install -r requirements_test.txt
pip install -r requirements_test.txt
- name: Test Core API
run: |
Expand All @@ -62,10 +73,19 @@ jobs:
run: |
.ci/setup_headless_display.sh
- name: Cache Conda
uses: actions/cache@v1
with:
path: ~/anaconda3/pkgs
key: Conda-${{ runner.os }}-${{ hashFiles('environment.yml') }}
restore-keys: |
${{ runner.os }}-conda-
- name: Create Anaconda environment
run: |
source /usr/share/miniconda/etc/profile.d/conda.sh
conda config --add channels conda-forge
conda config --set channel_priority strict
sed -i -e 's/- vtk$/- vtk= ${{ env.VTK_VERSION }} /' environment.yml
conda env create --quiet -n ${{ env.conda_env }} --file environment.yml
conda activate ${{ env.conda_env }}
Expand Down Expand Up @@ -100,3 +120,69 @@ jobs:
source /usr/share/miniconda/etc/profile.d/conda.sh
conda activate ${{ env.conda_env }}
pytest -v --doctest-modules pyvista
Linux:
name: Linux Unit Testing
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.6', '3.7', '3.8', '3.9']
env:
SHELLOPTS: 'errexit:pipefail'

steps:
- uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}

- uses: actions/cache@v2
with:
path: ~/.cache/pip
key: Python-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('setup.py') }}-${{ hashFiles('requirements_test.txt') }}
restore-keys: |
Python-${{ runner.os }}-${{ matrix.python-version }}
- name: Build wheel and install pyvista
run: |
pip install wheel
python setup.py bdist_wheel
pip install dist/pyvista*.whl
- name: Install Testing Requirements
run: |
sudo apt-get update
sudo apt-get install libgl1-mesa-glx xvfb python-tk -y
pip install -r requirements_test.txt
pip install pytest-azurepipelines
- name: Software Report
run: |
xvfb-run python -c "import pyvista; print(pyvista.Report())"
which python
pip list
- name: Unit Testing
run: |
xvfb-run pytest -v --cov pyvista --cov-report html
- name: Upload coverage to codecov.io
if: matrix.python-version == '3.9'
run: bash <(curl -s https://codecov.io/bash)

- name: Check package
run: |
pip install twine
python setup.py sdist
twine check dist/*
- name: Upload to PyPi
if: matrix.python-version == '3.9' && startsWith(github.ref, 'refs/tags')
run: |
twine upload --skip-existing dist/pyvista*
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
TWINE_REPOSITORY_URL: "https://upload.pypi.org/legacy/"
7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,16 @@ build/
dist/

# MISC
# *.sh
.mypy_cache


# doc generated
tests/tinypages/_build
doc/_build
wiki/
**/beam.gif
**/beam_wireframe.gif

doc/build_errors.txt

# testing coverage and cache
.pytest_cache/
Expand Down Expand Up @@ -61,6 +63,7 @@ doc/images/auto-generated
api-autogen/
_autosummary/
doc/getting-started/external_examples.rst
**/grid.vtu

# hypothesis
.hypothesis
Expand Down
Loading

0 comments on commit 3865420

Please sign in to comment.