Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build for python 3.9 #32

Merged
merged 4 commits into from
Jul 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions .ci/build_wheels.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@ set -e -x
# build based on python version from args
PYTHON_VERSION="$1"
case $PYTHON_VERSION in
2.7)
PYBIN="/opt/python/cp27-cp27m/bin"
;;
3.5)
PYBIN="/opt/python/cp35-cp35m/bin"
;;
3.6)
PYBIN="/opt/python/cp36-cp36m/bin"
;;
Expand All @@ -21,6 +15,9 @@ case $PYTHON_VERSION in
3.8)
PYBIN="/opt/python/cp38-cp38/bin"
;;
3.9)
PYBIN="/opt/python/cp39-cp39/bin"
;;
esac

# build, don't install
Expand Down
58 changes: 58 additions & 0 deletions .github/workflows/testing-and-deployment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Unit Testing

on:
push:
branches: "*"
tags: "*"
pull_request:
branches: "**"

jobs:
macOS:
runs-on: macos-latest
name: Mac OS Unit Testing
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 }}

- name: Build package
run: |
pip install -r requirements_build.txt
python setup.py bdist_wheel
pip install dist/*

- name: Install package
run: |
pip install dist/*
python -c "import pyvista; print(pyvista.Report(gpu=False))"

- name: Install test dependencies
run: |
pip install -r requirements_test.txt

- name: Unit testing
run: |
pytest -v

- name: Validate package
run: |
pip install twine
twine check dist/*

- name: Upload to PyPi
if: startsWith(github.event.ref, 'refs/tags')
run: |
twine upload -u __token__ --skip-existing dist/*
env:
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
30 changes: 5 additions & 25 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ jobs:
- job: Linux
strategy:
matrix:
Python35:
python.version: '3.5'
Python36:
python.version: '3.6'
Python37:
python.version: '3.7'
Python38:
python.version: '3.8'
Python39:
python.version: '3.9'
pool:
vmImage: 'ubuntu-18.04'
steps:
Expand All @@ -44,42 +44,22 @@ jobs:
(cd tests && pytest --cov $(package_name) --cov-report html)
- template: .ci/azure-publish-dist.yml

- job: macOS
variables:
python.architecture: 'x64'
strategy:
matrix:
Python36:
python.version: '3.6'
Python37:
python.version: '3.7'
Python38:
python.version: '3.8'
pool:
vmImage: 'macOS-10.14'
steps:
- script: .ci/macos-install-python.sh '$(python.version)'
displayName: Install Python
- template: .ci/azure-setup.yml
- template: .ci/azure-steps.yml
- template: .ci/azure-publish-dist.yml


- job: Windows
pool:
vmIMage: 'VS2017-Win2016'
vmIMage: 'windows-2019'
variables:
python.architecture: 'x64'
strategy:
matrix:
Python35:
python.version: '3.5'
Python36:
python.version: '3.6'
Python37:
python.version: '3.7'
Python38:
python.version: '3.8'
Python39:
python.version: '3.9'
steps:
- template: .ci/azure-setup.yml
- template: .ci/azure-steps.yml
Expand Down
11 changes: 9 additions & 2 deletions pymeshfix/_version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
"""pymeshfix version"""
version_info = 0, 14, 2
"""pymeshfix version

On the ``master`` branch, use 'dev0' to denote a development version.
For example:

version_info = 0, 27, 'dev0'

"""
version_info = 0, 14, 'dev0'
__version__ = '.'.join(map(str, version_info))
3 changes: 1 addition & 2 deletions requirements_build.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
setuptools>=41.0.0
wheel>=0.33.0
numpy>=1.15.0
numpy<1.20.0
cython>=0.29.0
vtk>=8.0.0
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,10 @@ def build_extensions(self):
classifiers=['Development Status :: 4 - Beta',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8'
'Programming Language :: Python :: 3.9',
],
url='https://github.com/pyvista/pymeshfix',

Expand Down Expand Up @@ -139,6 +139,6 @@ def build_extensions(self):
package_data={'pymeshfix/examples': ['StanfordBunny.ply',
'planar_mesh.ply']},
install_requires=['numpy>1.11.0',
'pyvista>=0.23.0'],
'pyvista>=0.30.0'],
setup_requires=setup_requires,
)
1 change: 1 addition & 0 deletions tests/test_pyx_meshfix.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ def test_load_and_save_file(tmpdir):
new_bunny = pv.PolyData(filename)
assert new_bunny.points.shape == v.shape


def test_load_array():
meshfix = _meshfix.PyTMesh()
v = bunny.points
Expand Down
6 changes: 3 additions & 3 deletions tests/test_withvtk.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
from pymeshfix.examples import bunny_scan



def test_repair_vtk():
meshin = pv.PolyData(bunny_scan)
meshfix = pymeshfix.MeshFix(meshin)
Expand All @@ -18,6 +17,7 @@ def test_repair_vtk():
assert meshfix.mesh.n_points

# test for any holes
pdata = meshout.extract_edges(non_manifold_edges=False, feature_edges=False,
manifold_edges=False)
pdata = meshout.extract_feature_edges(non_manifold_edges=False,
feature_edges=False,
manifold_edges=False)
assert pdata.n_points == 0