From 8baac2fc771e2020af66bd277b145dac402140c8 Mon Sep 17 00:00:00 2001 From: zacsimile Date: Wed, 31 Jul 2024 20:41:08 +0200 Subject: [PATCH 01/23] Fix pre-commit --- .pre-commit-config.yaml | 52 ++++++++++++++--------------------------- 1 file changed, 17 insertions(+), 35 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 806f2fd..61f5542 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,44 +1,26 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.0.1 + rev: v4.4.0 hooks: - id: check-docstring-first - id: end-of-file-fixer - id: trailing-whitespace - - repo: https://github.com/asottile/setup-cfg-fmt - rev: v1.20.0 - hooks: - - id: setup-cfg-fmt - - repo: https://github.com/PyCQA/flake8 - rev: 4.0.1 - hooks: - - id: flake8 - additional_dependencies: [flake8-typing-imports==1.7.0] - - repo: https://github.com/myint/autoflake - rev: v1.4 - hooks: - - id: autoflake - args: ["--in-place", "--remove-all-unused-imports"] - - repo: https://github.com/PyCQA/isort - rev: 5.10.1 - hooks: - - id: isort + - repo: https://github.com/psf/black - rev: 21.11b1 + rev: 23.7.0 hooks: - id: black - - repo: https://github.com/asottile/pyupgrade - rev: v2.29.1 - hooks: - - id: pyupgrade - args: [--py37-plus, --keep-runtime-typing] - - repo: https://github.com/tlambert03/napari-plugin-checks - rev: v0.2.0 - hooks: - - id: napari-plugin-checks - # https://mypy.readthedocs.io/en/stable/introduction.html - # you may wish to add this as well! - # - repo: https://github.com/pre-commit/mirrors-mypy - # rev: v0.910-1 - # hooks: - # - id: mypy + + - repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.0.282 + hooks: + - id: ruff + + - repo: https://github.com/pre-commit/mirrors-mypy + rev: v1.4.1 + hooks: + - id: mypy + additional_dependencies: + - types-toml + - types-PyYAML + exclude: npe2/implements.pyi|_docs/render.py From 1f90507fda2c1c22c9911d8952662eb02ee06428 Mon Sep 17 00:00:00 2001 From: zacsimile Date: Wed, 31 Jul 2024 20:42:57 +0200 Subject: [PATCH 02/23] No bare except --- src/napari_pymeshlab/_widget.py | 234 +++++++++++++++++--------------- 1 file changed, 127 insertions(+), 107 deletions(-) diff --git a/src/napari_pymeshlab/_widget.py b/src/napari_pymeshlab/_widget.py index 5141f7f..183e59c 100644 --- a/src/napari_pymeshlab/_widget.py +++ b/src/napari_pymeshlab/_widget.py @@ -1,12 +1,3 @@ -""" -This module is an example of a barebones QWidget plugin for napari - -It implements the Widget specification. -see: https://napari.org/plugins/stable/npe2_manifest_specification.html - -Replace code below according to your needs. -""" -from qtpy.QtWidgets import QWidget, QHBoxLayout, QPushButton from magicgui import magic_factory from napari.layers import Points from napari.types import LayerDataTuple, SurfaceData @@ -14,44 +5,60 @@ import pymeshlab as ml from enum import Enum + @magic_factory -def screened_poisson_reconstruction(points_layer: Points, n_neighbors: int = 10, - smooth_iter: int = 0, flip: bool = False, - viewpos: np.ndarray = [0,0,0], depth: int = 8, - full_depth: int = 5, cg_depth: int = 0, scale: float = 1.1, - samples_per_node: float = 1.5, point_weight: float = 4, - iters: int = 8, confidence: bool = False, - preclean: bool = False) -> LayerDataTuple: +def screened_poisson_reconstruction( + points_layer: Points, + n_neighbors: int = 10, + smooth_iter: int = 0, + flip: bool = False, + viewpos: np.ndarray = [0, 0, 0], + depth: int = 8, + full_depth: int = 5, + cg_depth: int = 0, + scale: float = 1.1, + samples_per_node: float = 1.5, + point_weight: float = 4, + iters: int = 8, + confidence: bool = False, + preclean: bool = False, +) -> LayerDataTuple: """ Run screened poisson reconstruction on a set of points, using pymeshlab. """ mesh = ml.Mesh(points_layer.data) - + ms = ml.MeshSet() ms.add_mesh(mesh) # compute normals - ms.compute_normals_for_point_sets(k=n_neighbors, # number of neighbors - smoothiter=smooth_iter, - flipflag=flip, - viewpos=viewpos) + ms.compute_normals_for_point_sets( + k=n_neighbors, # number of neighbors + smoothiter=smooth_iter, + flipflag=flip, + viewpos=viewpos, + ) # run SPR - ms.surface_reconstruction_screened_poisson(visiblelayer=False, - depth=depth, - fulldepth=full_depth, - cgdepth=cg_depth, - scale=scale, - samplespernode=samples_per_node, - pointweight=point_weight, - iters=iters, - confidence=confidence, - preclean=preclean) - - data = (ms.current_mesh().vertex_matrix(), - ms.current_mesh().face_matrix(), - ms.current_mesh().vertex_color_matrix().T) - + ms.surface_reconstruction_screened_poisson( + visiblelayer=False, + depth=depth, + fulldepth=full_depth, + cgdepth=cg_depth, + scale=scale, + samplespernode=samples_per_node, + pointweight=point_weight, + iters=iters, + confidence=confidence, + preclean=preclean, + ) + + data = ( + ms.current_mesh().vertex_matrix(), + ms.current_mesh().face_matrix(), + ms.current_mesh().vertex_color_matrix().T, + ) + return [(data, {"name": f"Reconstructed {points_layer.name}"}, "surface")] @@ -76,14 +83,15 @@ def convex_hull(surface: SurfaceData) -> SurfaceData: ..[0] https://pymeshlab.readthedocs.io/en/0.1.9/tutorials/apply_filter.html """ import pymeshlab + mesh = pymeshlab.Mesh(surface[0], surface[1]) ms = pymeshlab.MeshSet() ms.add_mesh(mesh) ms.set_current_mesh(0) - - try: + + try: ms.convex_hull() - except: + except AttributeError: ms.generate_convex_hull() mesh = ms.mesh(1) @@ -99,6 +107,7 @@ def convex_hull(surface: SurfaceData) -> SurfaceData: def _laplacian_smooth(surface: SurfaceData, step_smooth_num: int = 10) -> SurfaceData: return laplacian_smooth(surface, step_smooth_num) + def laplacian_smooth(surface: SurfaceData, step_smooth_num: int = 10) -> SurfaceData: """ @@ -116,16 +125,17 @@ def laplacian_smooth(surface: SurfaceData, step_smooth_num: int = 10) -> Surface ..[0] https://pymeshlab.readthedocs.io/en/0.1.9/filter_list.html#laplacian_smooth """ import pymeshlab + mesh = pymeshlab.Mesh(surface[0], surface[1]) ms = pymeshlab.MeshSet() ms.add_mesh(mesh) ms.set_current_mesh(0) - - try: + + try: ms.laplacian_smooth(stepsmoothnum=step_smooth_num) - except: + except AttributeError: ms.apply_coord_laplacian_smoothing(stepsmoothnum=step_smooth_num) - + mesh = ms.mesh(0) faces = np.asarray(mesh.polygonal_face_list()) @@ -136,19 +146,21 @@ def laplacian_smooth(surface: SurfaceData, step_smooth_num: int = 10) -> Surface @magic_factory -def _taubin_smooth(surface: SurfaceData, - lambda_: float = 0.5, - mu: float = -0.53, - step_smooth_num: int = 10 - ) -> SurfaceData: +def _taubin_smooth( + surface: SurfaceData, + lambda_: float = 0.5, + mu: float = -0.53, + step_smooth_num: int = 10, +) -> SurfaceData: return taubin_smooth(surface, lambda_, mu, step_smooth_num) -def taubin_smooth(surface: SurfaceData, - lambda_: float = 0.5, - mu: float = -0.53, - step_smooth_num: int = 10 - ) -> SurfaceData: +def taubin_smooth( + surface: SurfaceData, + lambda_: float = 0.5, + mu: float = -0.53, + step_smooth_num: int = 10, +) -> SurfaceData: """Smooth a surface using Taubin's method [1] Parameters @@ -165,7 +177,8 @@ def taubin_smooth(surface: SurfaceData, See Also -------- ..[0] https://pymeshlab.readthedocs.io/en/0.1.9/filter_list.html#taubin_smooth - ..[1] "Gabriel Taubin" A signal processing approach to fair surface design" SIGGRAPH 1995 doi:10.1145/218380.218473 + ..[1] "Gabriel Taubin" A signal processing approach to fair surface design" + SIGGRAPH 1995 doi:10.1145/218380.218473 """ import pymeshlab @@ -173,18 +186,14 @@ def taubin_smooth(surface: SurfaceData, ms = pymeshlab.MeshSet() ms.add_mesh(mesh) ms.set_current_mesh(0) - - try: - ms.taubin_smooth(lambda_=lambda_, - mu=mu, - stepsmoothnum=step_smooth_num - ) - - except: - ms.apply_coord_taubin_smoothing(lambda_=lambda_, - mu=mu, - stepsmoothnum=step_smooth_num - ) + + try: + ms.taubin_smooth(lambda_=lambda_, mu=mu, stepsmoothnum=step_smooth_num) + + except AttributeError: + ms.apply_coord_taubin_smoothing( + lambda_=lambda_, mu=mu, stepsmoothnum=step_smooth_num + ) mesh = ms.mesh(0) @@ -196,15 +205,15 @@ def taubin_smooth(surface: SurfaceData, @magic_factory -def _simplification_clustering_decimation(surface: SurfaceData, - threshold_percentage: float = 1 - ) -> SurfaceData: +def _simplification_clustering_decimation( + surface: SurfaceData, threshold_percentage: float = 1 +) -> SurfaceData: return simplification_clustering_decimation(surface, threshold_percentage) -def simplification_clustering_decimation(surface: SurfaceData, - threshold_percentage: float = 1 - ) -> SurfaceData: +def simplification_clustering_decimation( + surface: SurfaceData, threshold_percentage: float = 1 +) -> SurfaceData: """Cluster points of a surface to make it less complex Parameters @@ -227,11 +236,15 @@ def simplification_clustering_decimation(surface: SurfaceData, ms = pymeshlab.MeshSet() ms.add_mesh(mesh) ms.set_current_mesh(0) - - try: - ms.simplification_clustering_decimation(threshold=pymeshlab.Percentage(threshold_percentage)) - except: - ms.meshing_decimation_clustering(threshold=pymeshlab.PercentageValue(threshold_percentage)) + + try: + ms.simplification_clustering_decimation( + threshold=pymeshlab.Percentage(threshold_percentage) + ) + except AttributeError: + ms.meshing_decimation_clustering( + threshold=pymeshlab.PercentageValue(threshold_percentage) + ) mesh = ms.mesh(0) faces = np.asarray(mesh.polygonal_face_list()) @@ -242,31 +255,40 @@ def simplification_clustering_decimation(surface: SurfaceData, class CurvatureType(Enum): - mean = 'Mean' - gauss = 'Gauss' - k1 = 'K1' - k2 = 'K2' - approxmean = 'ApproxMean' + mean = "Mean" + gauss = "Gauss" + k1 = "K1" + k2 = "K2" + approxmean = "ApproxMean" @magic_factory -def _colorize_curvature_apss(surface: SurfaceData, - filter_scale: float = 2, - projection_accuracy: float = 0.0001, - max_projection_iterations: int = 15, - spherical_parameter: float = 1, - curvature_type: CurvatureType = CurvatureType.mean - ) -> SurfaceData: - return _colorize_curvature_apss(surface, filter_scale, projection_accuracy, max_projection_iterations, spherical_parameter, curvature_type) - - -def colorize_curvature_apss(surface: SurfaceData, - filter_scale: float = 2, - projection_accuracy: float = 0.0001, - max_projection_iterations: int = 15, - spherical_parameter: float = 1, - curvature_type: CurvatureType = CurvatureType.mean - ) -> SurfaceData: +def _colorize_curvature_apss( + surface: SurfaceData, + filter_scale: float = 2, + projection_accuracy: float = 0.0001, + max_projection_iterations: int = 15, + spherical_parameter: float = 1, + curvature_type: CurvatureType = CurvatureType.mean, +) -> SurfaceData: + return _colorize_curvature_apss( + surface, + filter_scale, + projection_accuracy, + max_projection_iterations, + spherical_parameter, + curvature_type, + ) + + +def colorize_curvature_apss( + surface: SurfaceData, + filter_scale: float = 2, + projection_accuracy: float = 0.0001, + max_projection_iterations: int = 15, + spherical_parameter: float = 1, + curvature_type: CurvatureType = CurvatureType.mean, +) -> SurfaceData: """Colorize curvature Parameters @@ -288,24 +310,24 @@ def colorize_curvature_apss(surface: SurfaceData, ms = pymeshlab.MeshSet() ms.add_mesh(mesh) ms.set_current_mesh(0) - try: + try: ms.compute_curvature_and_color_apss_per_vertex( filterscale=filter_scale, projectionaccuracy=projection_accuracy, maxprojectioniters=max_projection_iterations, sphericalparameter=spherical_parameter, - curvaturetype=curvature_type.value + curvaturetype=curvature_type.value, ) - - except: + + except AttributeError: ms.colorize_curvature_apss( filterscale=filter_scale, projectionaccuracy=projection_accuracy, maxprojectioniters=max_projection_iterations, sphericalparameter=spherical_parameter, - curvaturetype=curvature_type.value + curvaturetype=curvature_type.value, ) - + mesh = ms.mesh(0) faces = np.asarray(mesh.polygonal_face_list()) @@ -313,5 +335,3 @@ def colorize_curvature_apss(surface: SurfaceData, values = np.asarray(mesh.vertex_color_array()) return (vertices, faces, values) - - From 1d765704df8ac15997e7445bcf0055f2f5e0004f Mon Sep 17 00:00:00 2001 From: zacsimile Date: Wed, 31 Jul 2024 20:44:49 +0200 Subject: [PATCH 03/23] Update workflow to modern versions --- .github/workflows/test_and_deploy.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test_and_deploy.yml b/.github/workflows/test_and_deploy.yml index 84536d2..0b8ad6e 100644 --- a/.github/workflows/test_and_deploy.yml +++ b/.github/workflows/test_and_deploy.yml @@ -1,9 +1,8 @@ # This workflows will upload a Python Package using Twine when a release is created -# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries name: tests -on: +on: push: branches: - main @@ -23,7 +22,7 @@ jobs: strategy: matrix: platform: [ubuntu-latest, windows-latest, macos-latest] - python-version: [3.7, 3.8, 3.9] + python-version: [3.9, 3.10, 3.11, 3.12] steps: - uses: actions/checkout@v2 @@ -70,7 +69,7 @@ jobs: deploy: # this will run when you have tagged a commit, starting with "v*" - # and requires that you have put your twine API key in your + # and requires that you have put your twine API key in your # github secrets (see readme for details) needs: [test] runs-on: ubuntu-latest @@ -93,4 +92,3 @@ jobs: git tag python setup.py sdist bdist_wheel twine upload dist/* - From f369863820b0a9744ade0a7681f2ba238964607b Mon Sep 17 00:00:00 2001 From: zacsimile Date: Wed, 31 Jul 2024 21:01:44 +0200 Subject: [PATCH 04/23] Upgrade actions --- .github/workflows/test_and_deploy.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test_and_deploy.yml b/.github/workflows/test_and_deploy.yml index 0b8ad6e..c149301 100644 --- a/.github/workflows/test_and_deploy.yml +++ b/.github/workflows/test_and_deploy.yml @@ -25,10 +25,10 @@ jobs: python-version: [3.9, 3.10, 3.11, 3.12] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} @@ -58,14 +58,14 @@ jobs: # this runs the platform-specific tests declared in tox.ini - name: Test with tox - uses: GabrielBB/xvfb-action@v1 + uses: coactions/setup-xvfb@v1 with: run: tox env: PLATFORM: ${{ matrix.platform }} - name: Coverage - uses: codecov/codecov-action@v2 + uses: codecov/codecov-action@v4 deploy: # this will run when you have tagged a commit, starting with "v*" @@ -75,9 +75,9 @@ jobs: runs-on: ubuntu-latest if: contains(github.ref, 'tags') steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: "3.x" - name: Install dependencies From 5874437e057285bf8188e98c6d34a45f1f2e2734 Mon Sep 17 00:00:00 2001 From: zacsimile Date: Wed, 31 Jul 2024 21:04:39 +0200 Subject: [PATCH 05/23] Fix versions --- .github/workflows/test_and_deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_and_deploy.yml b/.github/workflows/test_and_deploy.yml index c149301..6e194cc 100644 --- a/.github/workflows/test_and_deploy.yml +++ b/.github/workflows/test_and_deploy.yml @@ -22,7 +22,7 @@ jobs: strategy: matrix: platform: [ubuntu-latest, windows-latest, macos-latest] - python-version: [3.9, 3.10, 3.11, 3.12] + python-version: ["3.9", "3.10", "3.11", "3.12"] steps: - uses: actions/checkout@v4 From 19412ac1b5402b82963c5677fedb7c131669bf9a Mon Sep 17 00:00:00 2001 From: zacsimile Date: Wed, 31 Jul 2024 23:11:38 +0200 Subject: [PATCH 06/23] Switch to pytest --- .github/workflows/test_and_deploy.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test_and_deploy.yml b/.github/workflows/test_and_deploy.yml index 6e194cc..2c0f662 100644 --- a/.github/workflows/test_and_deploy.yml +++ b/.github/workflows/test_and_deploy.yml @@ -54,13 +54,13 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install setuptools tox tox-gh-actions + pip install setuptools pytest # this runs the platform-specific tests declared in tox.ini - - name: Test with tox + - name: Test with pytest uses: coactions/setup-xvfb@v1 with: - run: tox + run: pytest env: PLATFORM: ${{ matrix.platform }} From 8b0382ce5c03345eec0e0ac5cd2eeaa635a2b7c3 Mon Sep 17 00:00:00 2001 From: zacsimile Date: Wed, 31 Jul 2024 23:14:56 +0200 Subject: [PATCH 07/23] Drop linux/xvfb --- .github/workflows/test_and_deploy.yml | 27 ++------------------------- 1 file changed, 2 insertions(+), 25 deletions(-) diff --git a/.github/workflows/test_and_deploy.yml b/.github/workflows/test_and_deploy.yml index 2c0f662..4627970 100644 --- a/.github/workflows/test_and_deploy.yml +++ b/.github/workflows/test_and_deploy.yml @@ -31,26 +31,6 @@ jobs: uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - - # these libraries enable testing on Qt on linux - - name: Install Linux libraries - if: runner.os == 'Linux' - run: | - sudo apt-get install -y libdbus-1-3 libxkbcommon-x11-0 libxcb-icccm4 \ - libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 \ - libxcb-xinerama0 libxcb-xinput0 libxcb-xfixes0 - - # 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 - - # note: if you need dependencies from conda, considering using - # setup-miniconda: https://github.com/conda-incubator/setup-miniconda - # and - # tox-conda: https://github.com/tox-dev/tox-conda - name: Install dependencies run: | python -m pip install --upgrade pip @@ -58,11 +38,8 @@ jobs: # this runs the platform-specific tests declared in tox.ini - name: Test with pytest - uses: coactions/setup-xvfb@v1 - with: - run: pytest - env: - PLATFORM: ${{ matrix.platform }} + run: | + python3 -m pytest --cov=./ --cov-report=xml - name: Coverage uses: codecov/codecov-action@v4 From 40803fc69424df138782cc912ea3b0abb18b0376 Mon Sep 17 00:00:00 2001 From: zacsimile Date: Wed, 31 Jul 2024 23:16:18 +0200 Subject: [PATCH 08/23] Add pytest-cov --- .github/workflows/test_and_deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_and_deploy.yml b/.github/workflows/test_and_deploy.yml index 4627970..8192e91 100644 --- a/.github/workflows/test_and_deploy.yml +++ b/.github/workflows/test_and_deploy.yml @@ -34,7 +34,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install setuptools pytest + pip install setuptools pytest pytest-cov # this runs the platform-specific tests declared in tox.ini - name: Test with pytest From d69b151d480e7a21913132884f03c0b103bb7b24 Mon Sep 17 00:00:00 2001 From: zacsimile Date: Wed, 31 Jul 2024 23:17:52 +0200 Subject: [PATCH 09/23] Install dependencies --- .github/workflows/test_and_deploy.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test_and_deploy.yml b/.github/workflows/test_and_deploy.yml index 8192e91..837c84f 100644 --- a/.github/workflows/test_and_deploy.yml +++ b/.github/workflows/test_and_deploy.yml @@ -34,6 +34,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip + pip install -e . pip install setuptools pytest pytest-cov # this runs the platform-specific tests declared in tox.ini From ff06dcd8f0532c580aa030568c6f5163963b3d84 Mon Sep 17 00:00:00 2001 From: zacsimile Date: Wed, 31 Jul 2024 23:23:51 +0200 Subject: [PATCH 10/23] Don't cancel because of Mac --- .github/workflows/test_and_deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_and_deploy.yml b/.github/workflows/test_and_deploy.yml index 837c84f..19faf5b 100644 --- a/.github/workflows/test_and_deploy.yml +++ b/.github/workflows/test_and_deploy.yml @@ -21,7 +21,7 @@ jobs: runs-on: ${{ matrix.platform }} strategy: matrix: - platform: [ubuntu-latest, windows-latest, macos-latest] + platform: [ubuntu-latest, windows-latest] #, macos-latest] python-version: ["3.9", "3.10", "3.11", "3.12"] steps: From 48877aa88583b25d40c560d5166f0f6db9c7a6be Mon Sep 17 00:00:00 2001 From: zacsimile Date: Wed, 31 Jul 2024 23:26:46 +0200 Subject: [PATCH 11/23] Update requirements --- requirements.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index d067b15..70f7fae 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,5 @@ npe2 numpy pymeshlab --e . +pyqt5 +magicgui[pyqt5] From 8338d8beb144b79aab3da3ce756bdb35a0a222ee Mon Sep 17 00:00:00 2001 From: zacsimile Date: Wed, 31 Jul 2024 23:32:13 +0200 Subject: [PATCH 12/23] Update setup.cfg --- requirements.txt | 1 + setup.cfg | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/requirements.txt b/requirements.txt index 70f7fae..4b417e6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,3 +3,4 @@ numpy pymeshlab pyqt5 magicgui[pyqt5] +-e . diff --git a/setup.cfg b/setup.cfg index 19a2c3e..b371506 100644 --- a/setup.cfg +++ b/setup.cfg @@ -41,14 +41,16 @@ install_requires = npe2 numpy pymeshlab + pyqt5 + magicgui[pyqt5] [options.packages.find] where = src [options.package_data] -napari-pymeshlab = +napari-pymeshlab = napari.yaml -[options.entry_points] -napari.manifest = +[options.entry_points] +napari.manifest = napari-pymeshlab = napari_pymeshlab:napari.yaml From c089d7e326c47e629333d1694c1e692c54e4e017 Mon Sep 17 00:00:00 2001 From: zacsimile Date: Wed, 31 Jul 2024 23:34:41 +0200 Subject: [PATCH 13/23] Fix requirements --- requirements.txt | 3 +-- setup.cfg | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/requirements.txt b/requirements.txt index 4b417e6..2549d76 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,5 @@ +napari npe2 numpy pymeshlab -pyqt5 -magicgui[pyqt5] -e . diff --git a/setup.cfg b/setup.cfg index b371506..c1fda0e 100644 --- a/setup.cfg +++ b/setup.cfg @@ -38,11 +38,10 @@ package_dir = # add your package requirements here install_requires = + napari npe2 numpy pymeshlab - pyqt5 - magicgui[pyqt5] [options.packages.find] where = src From 58a615ecbd4bb1db29bd940075b07f049b12b183 Mon Sep 17 00:00:00 2001 From: zacsimile Date: Wed, 31 Jul 2024 23:37:47 +0200 Subject: [PATCH 14/23] Address deprecation --- src/napari_pymeshlab/_sample_data.py | 836 ++++++++++++++------------- 1 file changed, 426 insertions(+), 410 deletions(-) diff --git a/src/napari_pymeshlab/_sample_data.py b/src/napari_pymeshlab/_sample_data.py index 7d4d603..98218cb 100644 --- a/src/napari_pymeshlab/_sample_data.py +++ b/src/napari_pymeshlab/_sample_data.py @@ -1,425 +1,441 @@ -from __future__ import annotations -import numpy as np -import pymeshlab as ml - """ Stanford bunny point cloud taken from Point Cloud Library https://github.com/PointCloudLibrary/pcl/blob/master/test/bunny.pcd """ -BUNNY = np.array([ - [0.0054216,0.11349,0.040749], - [-0.0017447,0.11425,0.041273], - [-0.010661,0.11338,0.040916], - [0.026422,0.11499,0.032623], - [0.024545,0.12284,0.024255], - [0.034137,0.11316,0.02507], - [0.02886,0.11773,0.027037], - [0.02675,0.12234,0.017605], - [0.03575,0.1123,0.019109], - [0.015982,0.12307,0.031279], - [0.0079813,0.12438,0.032798], - [0.018101,0.11674,0.035493], - [0.0086687,0.11758,0.037538], - [0.01808,0.12536,0.026132], - [0.0080861,0.12866,0.02619], - [0.02275,0.12146,0.029671], - [-0.0018689,0.12456,0.033184], - [-0.011168,0.12376,0.032519], - [-0.0020063,0.11937,0.038104], - [-0.01232,0.11816,0.037427], - [-0.0016659,0.12879,0.026782], - [-0.011971,0.12723,0.026219], - [0.016484,0.12828,0.01928], - [0.0070921,0.13103,0.018415], - [0.0014615,0.13134,0.017095], - [-0.013821,0.12886,0.019265], - [-0.01725,0.11202,0.040077], - [-0.074556,0.13415,0.051046], - [-0.065971,0.14396,0.04109], - [-0.071925,0.14545,0.043266], - [-0.06551,0.13624,0.042195], - [-0.071112,0.13767,0.047518], - [-0.079528,0.13416,0.051194], - [-0.080421,0.14428,0.042793], - [-0.082672,0.1378,0.046806], - [-0.08813,0.13514,0.042222], - [-0.066325,0.12347,0.050729], - [-0.072399,0.12662,0.052364], - [-0.066091,0.11973,0.050881], - [-0.072012,0.11811,0.052295], - [-0.062433,0.12627,0.043831], - [-0.068326,0.12998,0.048875], - [-0.063094,0.11811,0.044399], - [-0.071301,0.11322,0.04841], - [-0.080515,0.12741,0.052034], - [-0.078179,0.1191,0.051116], - [-0.085216,0.12609,0.049001], - [-0.089538,0.12621,0.044589], - [-0.082659,0.11661,0.04797], - [-0.089536,0.11784,0.04457], - [-0.0565,0.15248,0.030132], - [-0.055517,0.15313,0.026915], - [-0.03625,0.17198,0.00017688], - [-0.03775,0.17198,0.00022189], - [-0.03625,0.16935,0.00051958], - [-0.033176,0.15711,0.0018682], - [-0.051913,0.1545,0.011273], - [-0.041707,0.16642,0.0030522], - [-0.049468,0.16414,0.0041988], - [-0.041892,0.15669,0.0054879], - [-0.051224,0.15878,0.0080283], - [-0.062417,0.15317,0.033161], - [-0.07167,0.15319,0.033701], - [-0.062543,0.15524,0.027405], - [-0.07211,0.1555,0.027645], - [-0.078663,0.15269,0.032268], - [-0.081569,0.15374,0.026085], - [-0.08725,0.1523,0.022135], - [-0.05725,0.15568,0.010325], - [-0.057888,0.1575,0.0073225], - [-0.0885,0.15223,0.019215], - [-0.056129,0.14616,0.03085], - [-0.054705,0.13555,0.032127], - [-0.054144,0.14714,0.026275], - [-0.046625,0.13234,0.021909], - [-0.05139,0.13694,0.025787], - [-0.018278,0.12238,0.030773], - [-0.021656,0.11643,0.035209], - [-0.031921,0.11566,0.032851], - [-0.021348,0.12421,0.024562], - [-0.03241,0.12349,0.023293], - [-0.024869,0.12094,0.028745], - [-0.031747,0.12039,0.028229], - [-0.052912,0.12686,0.034968], - [-0.041672,0.11564,0.032998], - [-0.052037,0.1168,0.034582], - [-0.042495,0.12488,0.024082], - [-0.047946,0.12736,0.028108], - [-0.042421,0.12035,0.028633], - [-0.047661,0.12024,0.028871], - [-0.035964,0.1513,0.0005395], - [-0.050598,0.1474,0.013881], - [-0.046375,0.13293,0.018289], - [-0.049125,0.13856,0.016269], - [-0.042976,0.14915,0.0054003], - [-0.047965,0.14659,0.0086783], - [-0.022926,0.1263,0.018077], - [-0.031583,0.1259,0.017804], - [-0.041733,0.12796,0.01665], - [-0.061482,0.14698,0.036168], - [-0.071729,0.15026,0.038328], - [-0.060526,0.1368,0.035999], - [-0.082619,0.14823,0.035955], - [-0.087824,0.14449,0.033779], - [-0.089,0.13828,0.037774], - [-0.085662,0.15095,0.028208], - [-0.089601,0.14725,0.025869], - [-0.090681,0.13748,0.02369], - [-0.058722,0.12924,0.038992], - [-0.060075,0.11512,0.037685], - [-0.091812,0.12767,0.038703], - [-0.091727,0.11657,0.039619], - [-0.093164,0.12721,0.025211], - [-0.093938,0.12067,0.024399], - [-0.091583,0.14522,0.01986], - [-0.090929,0.13667,0.019817], - [-0.093094,0.11635,0.018959], - [0.024948,0.10286,0.041418], - [0.0336,0.092627,0.040463], - [0.02742,0.096386,0.043312], - [0.03392,0.086911,0.041034], - [0.028156,0.086837,0.045084], - [0.03381,0.078604,0.040854], - [0.028125,0.076874,0.045059], - [0.0145,0.093279,0.05088], - [0.0074817,0.09473,0.052315], - [0.017407,0.10535,0.043139], - [0.0079536,0.10633,0.042968], - [0.018511,0.097194,0.047253], - [0.0086436,0.099323,0.048079], - [-0.0020197,0.095698,0.053906], - [-0.011446,0.095169,0.053862], - [-0.001875,0.10691,0.043455], - [-0.011875,0.10688,0.043019], - [-0.0017622,0.10071,0.046648], - [-0.012498,0.10008,0.045916], - [0.016381,0.085894,0.051642], - [0.0081167,0.08691,0.055228], - [0.017644,0.076955,0.052372], - [0.008125,0.076853,0.055536], - [0.020575,0.088169,0.049006], - [0.022445,0.075721,0.049563], - [-0.0017931,0.086849,0.056843], - [-0.011943,0.086771,0.057009], - [-0.0019567,0.076863,0.057803], - [-0.011875,0.076964,0.057022], - [0.03325,0.067541,0.040033], - [0.028149,0.066829,0.042953], - [0.026761,0.057829,0.042588], - [0.023571,0.04746,0.040428], - [0.015832,0.067418,0.051639], - [0.0080431,0.066902,0.055006], - [0.013984,0.058886,0.050416], - [0.0080973,0.056888,0.05295], - [0.020566,0.065958,0.0483], - [0.018594,0.056539,0.047879], - [0.012875,0.052652,0.049689], - [-0.0017852,0.066712,0.056503], - [-0.011785,0.066885,0.055015], - [-0.001875,0.056597,0.05441], - [-0.01184,0.057054,0.052714], - [-0.015688,0.052469,0.049615], - [0.0066154,0.04993,0.051259], - [0.018088,0.046655,0.043321], - [0.008841,0.045437,0.046623], - [0.017688,0.039719,0.043084], - [0.008125,0.039516,0.045374], - [-0.0016111,0.049844,0.05172], - [-0.01245,0.046773,0.050903], - [-0.013851,0.039778,0.051036], - [-0.0020294,0.044874,0.047587], - [-0.011653,0.04686,0.048661], - [-0.0018611,0.039606,0.047339], - [-0.0091545,0.03958,0.049415], - [0.043661,0.094028,0.02252], - [0.034642,0.10473,0.031831], - [0.028343,0.1072,0.036339], - [0.036339,0.096552,0.034843], - [0.031733,0.099372,0.038505], - [0.036998,0.10668,0.026781], - [0.032875,0.11108,0.02959], - [0.040938,0.097132,0.026663], - [0.044153,0.086466,0.024241], - [0.05375,0.072221,0.020429], - [0.04516,0.076574,0.023594], - [0.038036,0.086663,0.035459], - [0.037861,0.076625,0.035658], - [0.042216,0.087237,0.028254], - [0.042355,0.076747,0.02858], - [0.043875,0.096228,0.015269], - [0.044375,0.096797,0.0086445], - [0.039545,0.1061,0.017655], - [0.042313,0.10009,0.017237], - [0.045406,0.087417,0.015604], - [0.055118,0.072639,0.017944], - [0.048722,0.07376,0.017434], - [0.045917,0.086298,0.0094211], - [0.019433,0.1096,0.039063], - [0.01097,0.11058,0.039648], - [0.046657,0.057153,0.031337], - [0.056079,0.066335,0.024122], - [0.048168,0.06701,0.026298], - [0.056055,0.057253,0.024902], - [0.051163,0.056662,0.029137], - [0.036914,0.067032,0.036122], - [0.033,0.06472,0.039903], - [0.038004,0.056507,0.033119], - [0.030629,0.054915,0.038484], - [0.041875,0.066383,0.028357], - [0.041434,0.06088,0.029632], - [0.044921,0.049904,0.031243], - [0.054635,0.050167,0.022044], - [0.04828,0.04737,0.025845], - [0.037973,0.048347,0.031456], - [0.028053,0.047061,0.035991], - [0.025595,0.040346,0.03415], - [0.038455,0.043509,0.028278], - [0.032031,0.043278,0.029253], - [0.036581,0.040335,0.025144], - [0.03019,0.039321,0.026847], - [0.059333,0.067891,0.017361], - [0.0465,0.071452,0.01971], - [0.059562,0.057747,0.01834], - [0.055636,0.049199,0.019173], - [0.0505,0.045064,0.019181], - [0.023,0.047803,0.039776], - [0.022389,0.03886,0.038795], - [-0.019545,0.0939,0.052205], - [-0.021462,0.10618,0.042059], - [-0.031027,0.10395,0.041228], - [-0.022521,0.097723,0.045194], - [-0.031858,0.097026,0.043878], - [-0.043262,0.10412,0.040891], - [-0.052154,0.10404,0.040972], - [-0.041875,0.096944,0.042424], - [-0.051919,0.096967,0.043563], - [-0.021489,0.086672,0.054767], - [-0.027,0.083087,0.050284], - [-0.02107,0.077249,0.054365], - [-0.026011,0.089634,0.048981], - [-0.031893,0.087035,0.044169], - [-0.025625,0.074892,0.047102], - [-0.03197,0.0769,0.042177], - [-0.041824,0.086954,0.043295], - [-0.051825,0.086844,0.044933], - [-0.041918,0.076728,0.042564], - [-0.051849,0.076877,0.042992], - [-0.061339,0.10393,0.041164], - [-0.072672,0.10976,0.044294], - [-0.061784,0.096825,0.043327], - [-0.070058,0.096203,0.041397], - [-0.080439,0.11091,0.044343], - [-0.061927,0.086724,0.04452], - [-0.070344,0.087352,0.041908], - [-0.06141,0.077489,0.042178], - [-0.068579,0.080144,0.041024], - [-0.019045,0.067732,0.052388], - [-0.017742,0.058909,0.050809], - [-0.023548,0.066382,0.045226], - [-0.03399,0.067795,0.040929], - [-0.02169,0.056549,0.045164], - [-0.036111,0.060706,0.040407], - [-0.041231,0.066951,0.041392], - [-0.048588,0.070956,0.040357], - [-0.0403,0.059465,0.040446], - [-0.02192,0.044965,0.052258], - [-0.029187,0.043585,0.051088], - [-0.021919,0.039826,0.053521], - [-0.030331,0.039749,0.052133], - [-0.021998,0.049847,0.046725], - [-0.031911,0.046848,0.045187], - [-0.035276,0.039753,0.047529], - [-0.042016,0.044823,0.041594], - [-0.05194,0.044707,0.043498], - [-0.041928,0.039327,0.043582], - [-0.051857,0.039252,0.046212], - [-0.059453,0.04424,0.042862], - [-0.060765,0.039087,0.044363], - [-0.024273,0.11038,0.039129], - [-0.032379,0.10878,0.037952], - [-0.041152,0.10853,0.037969], - [-0.051698,0.10906,0.038258], - [-0.062091,0.10877,0.038274], - [-0.071655,0.10596,0.037516], - [-0.074634,0.097746,0.038347], - [-0.07912,0.10508,0.032308], - [-0.080203,0.096758,0.033592], - [-0.08378,0.10568,0.025985], - [-0.087292,0.10314,0.020825], - [-0.08521,0.097079,0.02781], - [-0.088082,0.096456,0.022985], - [-0.07516,0.08604,0.038816], - [-0.064577,0.073455,0.03897], - [-0.072279,0.076416,0.036413], - [-0.076375,0.072563,0.02873], - [-0.080031,0.087076,0.03429], - [-0.078919,0.079371,0.032477], - [-0.084834,0.086686,0.026974], - [-0.087891,0.089233,0.022611], - [-0.081048,0.077169,0.025829], - [-0.086393,0.10784,0.018635], - [-0.087672,0.10492,0.017264], - [-0.089333,0.098483,0.01761], - [-0.086375,0.083067,0.018607], - [-0.089179,0.089186,0.018947], - [-0.082879,0.076109,0.017794], - [-0.0825,0.074674,0.0071175], - [-0.026437,0.064141,0.039321], - [-0.030035,0.06613,0.038942], - [-0.026131,0.056531,0.038882], - [-0.031664,0.056657,0.037742], - [-0.045716,0.064541,0.039166], - [-0.051959,0.066869,0.036733], - [-0.042557,0.055545,0.039026], - [-0.049406,0.056892,0.034344], - [-0.0555,0.062391,0.029498], - [-0.05375,0.058574,0.026313], - [-0.03406,0.050137,0.038577], - [-0.041741,0.04959,0.03929], - [-0.050975,0.049435,0.036965], - [-0.053,0.051065,0.029209], - [-0.054145,0.054568,0.012257], - [-0.055848,0.05417,0.0083272], - [-0.054844,0.049295,0.011462], - [-0.05615,0.050619,0.0092929], - [-0.061451,0.068257,0.035376], - [-0.069725,0.069958,0.032788], - [-0.062823,0.063322,0.026886], - [-0.071037,0.066787,0.025228], - [-0.060857,0.060568,0.022643], - [-0.067,0.061558,0.020109], - [-0.0782,0.071279,0.021032], - [-0.062116,0.045145,0.037802], - [-0.065473,0.039513,0.037964], - [-0.06725,0.03742,0.033413], - [-0.072702,0.065008,0.018701], - [-0.06145,0.059165,0.018731], - [-0.0675,0.061479,0.019221], - [-0.057411,0.054114,0.0038257], - [-0.079222,0.070654,0.017735], - [-0.062473,0.04468,0.01111], - [-0.06725,0.042258,0.010414], - [-0.066389,0.040515,0.01316], - [-0.068359,0.038502,0.011958], - [-0.061381,0.04748,0.007607], - [-0.068559,0.043549,0.0081576], - [-0.070929,0.03983,0.0085888], - [-0.016625,0.18375,-0.019735], - [-0.015198,0.17471,-0.018868], - [-0.015944,0.16264,-0.0091037], - [-0.015977,0.1607,-0.0088072], - [-0.013251,0.16708,-0.015264], - [-0.014292,0.16098,-0.011252], - [-0.013986,0.184,-0.023739], - [-0.011633,0.17699,-0.023349], - [-0.0091029,0.16988,-0.021457], - [-0.025562,0.18273,-0.0096247], - [-0.02725,0.18254,-0.0094384], - [-0.025736,0.17948,-0.0089653], - [-0.031216,0.17589,-0.0051154], - [-0.020399,0.1845,-0.014943], - [-0.021339,0.17645,-0.014566], - [-0.027125,0.17234,-0.010156], - [-0.03939,0.1733,-0.0023575], - [-0.022876,0.16406,-0.0078103], - [-0.031597,0.16651,-0.0049292], - [-0.0226,0.15912,-0.003799], - [-0.030372,0.15767,-0.0012672], - [-0.021158,0.16849,-0.012383], - [-0.027,0.1712,-0.01022], - [-0.041719,0.16813,-0.00074958], - [-0.04825,0.16748,-0.00015191], - [-0.03725,0.16147,-7.2628e-05], - [-0.066429,0.15783,-0.0085673], - [-0.071284,0.15839,-0.005998], - [-0.065979,0.16288,-0.017792], - [-0.071623,0.16384,-0.01576], - [-0.066068,0.16051,-0.013567], - [-0.073307,0.16049,-0.011832], - [-0.077,0.16204,-0.019241], - [-0.077179,0.15851,-0.01495], - [-0.073691,0.17286,-0.037944], - [-0.07755,0.17221,-0.039175], - [-0.065921,0.16586,-0.025022], - [-0.072095,0.16784,-0.024725], - [-0.066,0.16808,-0.030916], - [-0.073448,0.17051,-0.032045], - [-0.07777,0.16434,-0.025938], - [-0.077893,0.16039,-0.021299], - [-0.078211,0.169,-0.034566], - [-0.034667,0.15131,-0.00071029], - [-0.066117,0.17353,-0.047453], - [-0.071986,0.17612,-0.045384], - [-0.06925,0.182,-0.055026], - [-0.064992,0.17802,-0.054645], - [-0.069935,0.17983,-0.051988], - [-0.07793,0.17516,-0.0444] -]) +from __future__ import annotations +import numpy as np +import pymeshlab as ml + +BUNNY = np.array( + [ + [0.0054216, 0.11349, 0.040749], + [-0.0017447, 0.11425, 0.041273], + [-0.010661, 0.11338, 0.040916], + [0.026422, 0.11499, 0.032623], + [0.024545, 0.12284, 0.024255], + [0.034137, 0.11316, 0.02507], + [0.02886, 0.11773, 0.027037], + [0.02675, 0.12234, 0.017605], + [0.03575, 0.1123, 0.019109], + [0.015982, 0.12307, 0.031279], + [0.0079813, 0.12438, 0.032798], + [0.018101, 0.11674, 0.035493], + [0.0086687, 0.11758, 0.037538], + [0.01808, 0.12536, 0.026132], + [0.0080861, 0.12866, 0.02619], + [0.02275, 0.12146, 0.029671], + [-0.0018689, 0.12456, 0.033184], + [-0.011168, 0.12376, 0.032519], + [-0.0020063, 0.11937, 0.038104], + [-0.01232, 0.11816, 0.037427], + [-0.0016659, 0.12879, 0.026782], + [-0.011971, 0.12723, 0.026219], + [0.016484, 0.12828, 0.01928], + [0.0070921, 0.13103, 0.018415], + [0.0014615, 0.13134, 0.017095], + [-0.013821, 0.12886, 0.019265], + [-0.01725, 0.11202, 0.040077], + [-0.074556, 0.13415, 0.051046], + [-0.065971, 0.14396, 0.04109], + [-0.071925, 0.14545, 0.043266], + [-0.06551, 0.13624, 0.042195], + [-0.071112, 0.13767, 0.047518], + [-0.079528, 0.13416, 0.051194], + [-0.080421, 0.14428, 0.042793], + [-0.082672, 0.1378, 0.046806], + [-0.08813, 0.13514, 0.042222], + [-0.066325, 0.12347, 0.050729], + [-0.072399, 0.12662, 0.052364], + [-0.066091, 0.11973, 0.050881], + [-0.072012, 0.11811, 0.052295], + [-0.062433, 0.12627, 0.043831], + [-0.068326, 0.12998, 0.048875], + [-0.063094, 0.11811, 0.044399], + [-0.071301, 0.11322, 0.04841], + [-0.080515, 0.12741, 0.052034], + [-0.078179, 0.1191, 0.051116], + [-0.085216, 0.12609, 0.049001], + [-0.089538, 0.12621, 0.044589], + [-0.082659, 0.11661, 0.04797], + [-0.089536, 0.11784, 0.04457], + [-0.0565, 0.15248, 0.030132], + [-0.055517, 0.15313, 0.026915], + [-0.03625, 0.17198, 0.00017688], + [-0.03775, 0.17198, 0.00022189], + [-0.03625, 0.16935, 0.00051958], + [-0.033176, 0.15711, 0.0018682], + [-0.051913, 0.1545, 0.011273], + [-0.041707, 0.16642, 0.0030522], + [-0.049468, 0.16414, 0.0041988], + [-0.041892, 0.15669, 0.0054879], + [-0.051224, 0.15878, 0.0080283], + [-0.062417, 0.15317, 0.033161], + [-0.07167, 0.15319, 0.033701], + [-0.062543, 0.15524, 0.027405], + [-0.07211, 0.1555, 0.027645], + [-0.078663, 0.15269, 0.032268], + [-0.081569, 0.15374, 0.026085], + [-0.08725, 0.1523, 0.022135], + [-0.05725, 0.15568, 0.010325], + [-0.057888, 0.1575, 0.0073225], + [-0.0885, 0.15223, 0.019215], + [-0.056129, 0.14616, 0.03085], + [-0.054705, 0.13555, 0.032127], + [-0.054144, 0.14714, 0.026275], + [-0.046625, 0.13234, 0.021909], + [-0.05139, 0.13694, 0.025787], + [-0.018278, 0.12238, 0.030773], + [-0.021656, 0.11643, 0.035209], + [-0.031921, 0.11566, 0.032851], + [-0.021348, 0.12421, 0.024562], + [-0.03241, 0.12349, 0.023293], + [-0.024869, 0.12094, 0.028745], + [-0.031747, 0.12039, 0.028229], + [-0.052912, 0.12686, 0.034968], + [-0.041672, 0.11564, 0.032998], + [-0.052037, 0.1168, 0.034582], + [-0.042495, 0.12488, 0.024082], + [-0.047946, 0.12736, 0.028108], + [-0.042421, 0.12035, 0.028633], + [-0.047661, 0.12024, 0.028871], + [-0.035964, 0.1513, 0.0005395], + [-0.050598, 0.1474, 0.013881], + [-0.046375, 0.13293, 0.018289], + [-0.049125, 0.13856, 0.016269], + [-0.042976, 0.14915, 0.0054003], + [-0.047965, 0.14659, 0.0086783], + [-0.022926, 0.1263, 0.018077], + [-0.031583, 0.1259, 0.017804], + [-0.041733, 0.12796, 0.01665], + [-0.061482, 0.14698, 0.036168], + [-0.071729, 0.15026, 0.038328], + [-0.060526, 0.1368, 0.035999], + [-0.082619, 0.14823, 0.035955], + [-0.087824, 0.14449, 0.033779], + [-0.089, 0.13828, 0.037774], + [-0.085662, 0.15095, 0.028208], + [-0.089601, 0.14725, 0.025869], + [-0.090681, 0.13748, 0.02369], + [-0.058722, 0.12924, 0.038992], + [-0.060075, 0.11512, 0.037685], + [-0.091812, 0.12767, 0.038703], + [-0.091727, 0.11657, 0.039619], + [-0.093164, 0.12721, 0.025211], + [-0.093938, 0.12067, 0.024399], + [-0.091583, 0.14522, 0.01986], + [-0.090929, 0.13667, 0.019817], + [-0.093094, 0.11635, 0.018959], + [0.024948, 0.10286, 0.041418], + [0.0336, 0.092627, 0.040463], + [0.02742, 0.096386, 0.043312], + [0.03392, 0.086911, 0.041034], + [0.028156, 0.086837, 0.045084], + [0.03381, 0.078604, 0.040854], + [0.028125, 0.076874, 0.045059], + [0.0145, 0.093279, 0.05088], + [0.0074817, 0.09473, 0.052315], + [0.017407, 0.10535, 0.043139], + [0.0079536, 0.10633, 0.042968], + [0.018511, 0.097194, 0.047253], + [0.0086436, 0.099323, 0.048079], + [-0.0020197, 0.095698, 0.053906], + [-0.011446, 0.095169, 0.053862], + [-0.001875, 0.10691, 0.043455], + [-0.011875, 0.10688, 0.043019], + [-0.0017622, 0.10071, 0.046648], + [-0.012498, 0.10008, 0.045916], + [0.016381, 0.085894, 0.051642], + [0.0081167, 0.08691, 0.055228], + [0.017644, 0.076955, 0.052372], + [0.008125, 0.076853, 0.055536], + [0.020575, 0.088169, 0.049006], + [0.022445, 0.075721, 0.049563], + [-0.0017931, 0.086849, 0.056843], + [-0.011943, 0.086771, 0.057009], + [-0.0019567, 0.076863, 0.057803], + [-0.011875, 0.076964, 0.057022], + [0.03325, 0.067541, 0.040033], + [0.028149, 0.066829, 0.042953], + [0.026761, 0.057829, 0.042588], + [0.023571, 0.04746, 0.040428], + [0.015832, 0.067418, 0.051639], + [0.0080431, 0.066902, 0.055006], + [0.013984, 0.058886, 0.050416], + [0.0080973, 0.056888, 0.05295], + [0.020566, 0.065958, 0.0483], + [0.018594, 0.056539, 0.047879], + [0.012875, 0.052652, 0.049689], + [-0.0017852, 0.066712, 0.056503], + [-0.011785, 0.066885, 0.055015], + [-0.001875, 0.056597, 0.05441], + [-0.01184, 0.057054, 0.052714], + [-0.015688, 0.052469, 0.049615], + [0.0066154, 0.04993, 0.051259], + [0.018088, 0.046655, 0.043321], + [0.008841, 0.045437, 0.046623], + [0.017688, 0.039719, 0.043084], + [0.008125, 0.039516, 0.045374], + [-0.0016111, 0.049844, 0.05172], + [-0.01245, 0.046773, 0.050903], + [-0.013851, 0.039778, 0.051036], + [-0.0020294, 0.044874, 0.047587], + [-0.011653, 0.04686, 0.048661], + [-0.0018611, 0.039606, 0.047339], + [-0.0091545, 0.03958, 0.049415], + [0.043661, 0.094028, 0.02252], + [0.034642, 0.10473, 0.031831], + [0.028343, 0.1072, 0.036339], + [0.036339, 0.096552, 0.034843], + [0.031733, 0.099372, 0.038505], + [0.036998, 0.10668, 0.026781], + [0.032875, 0.11108, 0.02959], + [0.040938, 0.097132, 0.026663], + [0.044153, 0.086466, 0.024241], + [0.05375, 0.072221, 0.020429], + [0.04516, 0.076574, 0.023594], + [0.038036, 0.086663, 0.035459], + [0.037861, 0.076625, 0.035658], + [0.042216, 0.087237, 0.028254], + [0.042355, 0.076747, 0.02858], + [0.043875, 0.096228, 0.015269], + [0.044375, 0.096797, 0.0086445], + [0.039545, 0.1061, 0.017655], + [0.042313, 0.10009, 0.017237], + [0.045406, 0.087417, 0.015604], + [0.055118, 0.072639, 0.017944], + [0.048722, 0.07376, 0.017434], + [0.045917, 0.086298, 0.0094211], + [0.019433, 0.1096, 0.039063], + [0.01097, 0.11058, 0.039648], + [0.046657, 0.057153, 0.031337], + [0.056079, 0.066335, 0.024122], + [0.048168, 0.06701, 0.026298], + [0.056055, 0.057253, 0.024902], + [0.051163, 0.056662, 0.029137], + [0.036914, 0.067032, 0.036122], + [0.033, 0.06472, 0.039903], + [0.038004, 0.056507, 0.033119], + [0.030629, 0.054915, 0.038484], + [0.041875, 0.066383, 0.028357], + [0.041434, 0.06088, 0.029632], + [0.044921, 0.049904, 0.031243], + [0.054635, 0.050167, 0.022044], + [0.04828, 0.04737, 0.025845], + [0.037973, 0.048347, 0.031456], + [0.028053, 0.047061, 0.035991], + [0.025595, 0.040346, 0.03415], + [0.038455, 0.043509, 0.028278], + [0.032031, 0.043278, 0.029253], + [0.036581, 0.040335, 0.025144], + [0.03019, 0.039321, 0.026847], + [0.059333, 0.067891, 0.017361], + [0.0465, 0.071452, 0.01971], + [0.059562, 0.057747, 0.01834], + [0.055636, 0.049199, 0.019173], + [0.0505, 0.045064, 0.019181], + [0.023, 0.047803, 0.039776], + [0.022389, 0.03886, 0.038795], + [-0.019545, 0.0939, 0.052205], + [-0.021462, 0.10618, 0.042059], + [-0.031027, 0.10395, 0.041228], + [-0.022521, 0.097723, 0.045194], + [-0.031858, 0.097026, 0.043878], + [-0.043262, 0.10412, 0.040891], + [-0.052154, 0.10404, 0.040972], + [-0.041875, 0.096944, 0.042424], + [-0.051919, 0.096967, 0.043563], + [-0.021489, 0.086672, 0.054767], + [-0.027, 0.083087, 0.050284], + [-0.02107, 0.077249, 0.054365], + [-0.026011, 0.089634, 0.048981], + [-0.031893, 0.087035, 0.044169], + [-0.025625, 0.074892, 0.047102], + [-0.03197, 0.0769, 0.042177], + [-0.041824, 0.086954, 0.043295], + [-0.051825, 0.086844, 0.044933], + [-0.041918, 0.076728, 0.042564], + [-0.051849, 0.076877, 0.042992], + [-0.061339, 0.10393, 0.041164], + [-0.072672, 0.10976, 0.044294], + [-0.061784, 0.096825, 0.043327], + [-0.070058, 0.096203, 0.041397], + [-0.080439, 0.11091, 0.044343], + [-0.061927, 0.086724, 0.04452], + [-0.070344, 0.087352, 0.041908], + [-0.06141, 0.077489, 0.042178], + [-0.068579, 0.080144, 0.041024], + [-0.019045, 0.067732, 0.052388], + [-0.017742, 0.058909, 0.050809], + [-0.023548, 0.066382, 0.045226], + [-0.03399, 0.067795, 0.040929], + [-0.02169, 0.056549, 0.045164], + [-0.036111, 0.060706, 0.040407], + [-0.041231, 0.066951, 0.041392], + [-0.048588, 0.070956, 0.040357], + [-0.0403, 0.059465, 0.040446], + [-0.02192, 0.044965, 0.052258], + [-0.029187, 0.043585, 0.051088], + [-0.021919, 0.039826, 0.053521], + [-0.030331, 0.039749, 0.052133], + [-0.021998, 0.049847, 0.046725], + [-0.031911, 0.046848, 0.045187], + [-0.035276, 0.039753, 0.047529], + [-0.042016, 0.044823, 0.041594], + [-0.05194, 0.044707, 0.043498], + [-0.041928, 0.039327, 0.043582], + [-0.051857, 0.039252, 0.046212], + [-0.059453, 0.04424, 0.042862], + [-0.060765, 0.039087, 0.044363], + [-0.024273, 0.11038, 0.039129], + [-0.032379, 0.10878, 0.037952], + [-0.041152, 0.10853, 0.037969], + [-0.051698, 0.10906, 0.038258], + [-0.062091, 0.10877, 0.038274], + [-0.071655, 0.10596, 0.037516], + [-0.074634, 0.097746, 0.038347], + [-0.07912, 0.10508, 0.032308], + [-0.080203, 0.096758, 0.033592], + [-0.08378, 0.10568, 0.025985], + [-0.087292, 0.10314, 0.020825], + [-0.08521, 0.097079, 0.02781], + [-0.088082, 0.096456, 0.022985], + [-0.07516, 0.08604, 0.038816], + [-0.064577, 0.073455, 0.03897], + [-0.072279, 0.076416, 0.036413], + [-0.076375, 0.072563, 0.02873], + [-0.080031, 0.087076, 0.03429], + [-0.078919, 0.079371, 0.032477], + [-0.084834, 0.086686, 0.026974], + [-0.087891, 0.089233, 0.022611], + [-0.081048, 0.077169, 0.025829], + [-0.086393, 0.10784, 0.018635], + [-0.087672, 0.10492, 0.017264], + [-0.089333, 0.098483, 0.01761], + [-0.086375, 0.083067, 0.018607], + [-0.089179, 0.089186, 0.018947], + [-0.082879, 0.076109, 0.017794], + [-0.0825, 0.074674, 0.0071175], + [-0.026437, 0.064141, 0.039321], + [-0.030035, 0.06613, 0.038942], + [-0.026131, 0.056531, 0.038882], + [-0.031664, 0.056657, 0.037742], + [-0.045716, 0.064541, 0.039166], + [-0.051959, 0.066869, 0.036733], + [-0.042557, 0.055545, 0.039026], + [-0.049406, 0.056892, 0.034344], + [-0.0555, 0.062391, 0.029498], + [-0.05375, 0.058574, 0.026313], + [-0.03406, 0.050137, 0.038577], + [-0.041741, 0.04959, 0.03929], + [-0.050975, 0.049435, 0.036965], + [-0.053, 0.051065, 0.029209], + [-0.054145, 0.054568, 0.012257], + [-0.055848, 0.05417, 0.0083272], + [-0.054844, 0.049295, 0.011462], + [-0.05615, 0.050619, 0.0092929], + [-0.061451, 0.068257, 0.035376], + [-0.069725, 0.069958, 0.032788], + [-0.062823, 0.063322, 0.026886], + [-0.071037, 0.066787, 0.025228], + [-0.060857, 0.060568, 0.022643], + [-0.067, 0.061558, 0.020109], + [-0.0782, 0.071279, 0.021032], + [-0.062116, 0.045145, 0.037802], + [-0.065473, 0.039513, 0.037964], + [-0.06725, 0.03742, 0.033413], + [-0.072702, 0.065008, 0.018701], + [-0.06145, 0.059165, 0.018731], + [-0.0675, 0.061479, 0.019221], + [-0.057411, 0.054114, 0.0038257], + [-0.079222, 0.070654, 0.017735], + [-0.062473, 0.04468, 0.01111], + [-0.06725, 0.042258, 0.010414], + [-0.066389, 0.040515, 0.01316], + [-0.068359, 0.038502, 0.011958], + [-0.061381, 0.04748, 0.007607], + [-0.068559, 0.043549, 0.0081576], + [-0.070929, 0.03983, 0.0085888], + [-0.016625, 0.18375, -0.019735], + [-0.015198, 0.17471, -0.018868], + [-0.015944, 0.16264, -0.0091037], + [-0.015977, 0.1607, -0.0088072], + [-0.013251, 0.16708, -0.015264], + [-0.014292, 0.16098, -0.011252], + [-0.013986, 0.184, -0.023739], + [-0.011633, 0.17699, -0.023349], + [-0.0091029, 0.16988, -0.021457], + [-0.025562, 0.18273, -0.0096247], + [-0.02725, 0.18254, -0.0094384], + [-0.025736, 0.17948, -0.0089653], + [-0.031216, 0.17589, -0.0051154], + [-0.020399, 0.1845, -0.014943], + [-0.021339, 0.17645, -0.014566], + [-0.027125, 0.17234, -0.010156], + [-0.03939, 0.1733, -0.0023575], + [-0.022876, 0.16406, -0.0078103], + [-0.031597, 0.16651, -0.0049292], + [-0.0226, 0.15912, -0.003799], + [-0.030372, 0.15767, -0.0012672], + [-0.021158, 0.16849, -0.012383], + [-0.027, 0.1712, -0.01022], + [-0.041719, 0.16813, -0.00074958], + [-0.04825, 0.16748, -0.00015191], + [-0.03725, 0.16147, -7.2628e-05], + [-0.066429, 0.15783, -0.0085673], + [-0.071284, 0.15839, -0.005998], + [-0.065979, 0.16288, -0.017792], + [-0.071623, 0.16384, -0.01576], + [-0.066068, 0.16051, -0.013567], + [-0.073307, 0.16049, -0.011832], + [-0.077, 0.16204, -0.019241], + [-0.077179, 0.15851, -0.01495], + [-0.073691, 0.17286, -0.037944], + [-0.07755, 0.17221, -0.039175], + [-0.065921, 0.16586, -0.025022], + [-0.072095, 0.16784, -0.024725], + [-0.066, 0.16808, -0.030916], + [-0.073448, 0.17051, -0.032045], + [-0.07777, 0.16434, -0.025938], + [-0.077893, 0.16039, -0.021299], + [-0.078211, 0.169, -0.034566], + [-0.034667, 0.15131, -0.00071029], + [-0.066117, 0.17353, -0.047453], + [-0.071986, 0.17612, -0.045384], + [-0.06925, 0.182, -0.055026], + [-0.064992, 0.17802, -0.054645], + [-0.069935, 0.17983, -0.051988], + [-0.07793, 0.17516, -0.0444], + ] +) + def make_sphere(): """Generates a sphere by icosahedral subdivision""" ms = ml.MeshSet() - ms.sphere(radius=100, subdiv=3) - return [((ms.current_mesh().vertex_matrix(), - ms.current_mesh().face_matrix(), - ms.current_mesh().vertex_color_matrix().T), {"name": "Sphere"}, "surface")] + try: + ms.sphere(radius=100, subdiv=3) + except AttributeError: + ms.create_sphere(radius=100, subdiv=3) + return [ + ( + ( + ms.current_mesh().vertex_matrix(), + ms.current_mesh().face_matrix(), + ms.current_mesh().vertex_color_matrix().T, + ), + {"name": "Sphere"}, + "surface", + ) + ] + def make_shell(): """Generate random points on a shell""" x, y, z = np.random.randn(3, 1000) - n = np.sqrt(x*x+y*y+z*z) - pts = 100*np.vstack([x,y,z]).T/n[:,None] + n = np.sqrt(x * x + y * y + z * z) + pts = 100 * np.vstack([x, y, z]).T / n[:, None] return [(pts, {"name": "Shell"}, "points")] + def make_bunny(): - return [(1000*BUNNY, {"name": "Bunny"}, "points")] + return [(1000 * BUNNY, {"name": "Bunny"}, "points")] From 860940625905a6e4d5be48b5a44b1f1eeb9ecb8f Mon Sep 17 00:00:00 2001 From: zacsimile Date: Wed, 31 Jul 2024 23:41:19 +0200 Subject: [PATCH 15/23] Attempt to address segfault --- .github/workflows/test_and_deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_and_deploy.yml b/.github/workflows/test_and_deploy.yml index 19faf5b..4031db5 100644 --- a/.github/workflows/test_and_deploy.yml +++ b/.github/workflows/test_and_deploy.yml @@ -35,7 +35,7 @@ jobs: run: | python -m pip install --upgrade pip pip install -e . - pip install setuptools pytest pytest-cov + pip install setuptools pytest pytest-cov pytest-xvfb # this runs the platform-specific tests declared in tox.ini - name: Test with pytest From 61325107cdf37d2f9d465e8ef70f3c8a92902ddd Mon Sep 17 00:00:00 2001 From: zacsimile Date: Wed, 31 Jul 2024 23:48:10 +0200 Subject: [PATCH 16/23] Restrict to 3.9 --- .github/workflows/test_and_deploy.yml | 6 +----- setup.cfg | 3 ++- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test_and_deploy.yml b/.github/workflows/test_and_deploy.yml index 4031db5..6ba80c3 100644 --- a/.github/workflows/test_and_deploy.yml +++ b/.github/workflows/test_and_deploy.yml @@ -4,15 +4,11 @@ name: tests on: push: - branches: - - main - - main tags: - "v*" # Push events to matching v*, i.e. v1.0, v20.15.10 pull_request: branches: - main - - main workflow_dispatch: jobs: @@ -22,7 +18,7 @@ jobs: strategy: matrix: platform: [ubuntu-latest, windows-latest] #, macos-latest] - python-version: ["3.9", "3.10", "3.11", "3.12"] + python-version: ["3.9"] steps: - uses: actions/checkout@v4 diff --git a/setup.cfg b/setup.cfg index c1fda0e..06741e9 100644 --- a/setup.cfg +++ b/setup.cfg @@ -22,9 +22,10 @@ classifiers = Topic :: Software Development :: Testing Programming Language :: Python Programming Language :: Python :: 3 - Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 + Programming Language :: Python :: 3.10 + Programming Language :: Python :: 3.11 Operating System :: OS Independent License :: OSI Approved :: GNU General Public License v3 (GPLv3) From 88fabfa008c07ebeedb34f0d752b4bd15f6cf1b1 Mon Sep 17 00:00:00 2001 From: zacsimile Date: Wed, 31 Jul 2024 23:50:37 +0200 Subject: [PATCH 17/23] Switch to pymeshlab supported ubuntu --- .github/workflows/test_and_deploy.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_and_deploy.yml b/.github/workflows/test_and_deploy.yml index 6ba80c3..8c0f057 100644 --- a/.github/workflows/test_and_deploy.yml +++ b/.github/workflows/test_and_deploy.yml @@ -17,8 +17,8 @@ jobs: runs-on: ${{ matrix.platform }} strategy: matrix: - platform: [ubuntu-latest, windows-latest] #, macos-latest] - python-version: ["3.9"] + platform: ['ubuntu-20.04', 'windows-latest'] #, macos-latest] + python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] steps: - uses: actions/checkout@v4 From 49d6a9b71b1dbd96b2dbd5e1c6b19a22267f9333 Mon Sep 17 00:00:00 2001 From: zacsimile Date: Wed, 31 Jul 2024 23:56:56 +0200 Subject: [PATCH 18/23] Skip convex_hull --- .github/workflows/test_and_deploy.yml | 20 +++++++++++++++++-- src/napari_pymeshlab/_tests/test_functions.py | 10 ++++++++-- 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test_and_deploy.yml b/.github/workflows/test_and_deploy.yml index 8c0f057..d133231 100644 --- a/.github/workflows/test_and_deploy.yml +++ b/.github/workflows/test_and_deploy.yml @@ -16,9 +16,15 @@ jobs: name: ${{ matrix.platform }} py${{ matrix.python-version }} runs-on: ${{ matrix.platform }} strategy: + fail-fast: false matrix: - platform: ['ubuntu-20.04', 'windows-latest'] #, macos-latest] + platform: ['ubuntu-latest', 'windows-latest', 'macos-latest'] python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] + exclude: + - os: macos-latest + pyversion: '3.8' + - os: macos-latest + pyversion: '3.9' steps: - uses: actions/checkout@v4 @@ -48,12 +54,22 @@ jobs: needs: [test] runs-on: ubuntu-latest if: contains(github.ref, 'tags') + strategy: + fail-fast: false + matrix: + platform: ['ubuntu-latest', 'windows-latest', 'macos-latest'] + python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] + exclude: + - os: macos-latest + pyversion: '3.8' + - os: macos-latest + pyversion: '3.9' steps: - uses: actions/checkout@v4 - name: Set up Python uses: actions/setup-python@v5 with: - python-version: "3.x" + python-version: ${{ matrix.python-version }} - name: Install dependencies run: | python -m pip install --upgrade pip diff --git a/src/napari_pymeshlab/_tests/test_functions.py b/src/napari_pymeshlab/_tests/test_functions.py index 5903db3..db1b4b0 100644 --- a/src/napari_pymeshlab/_tests/test_functions.py +++ b/src/napari_pymeshlab/_tests/test_functions.py @@ -1,5 +1,11 @@ def test_something(): - from napari_pymeshlab import convex_hull, laplacian_smooth, taubin_smooth, simplification_clustering_decimation, colorize_curvature_apss + from napari_pymeshlab import ( + # convex_hull, + laplacian_smooth, + taubin_smooth, + simplification_clustering_decimation, + colorize_curvature_apss, + ) from skimage.measure import regionprops from skimage.measure import marching_cubes from skimage.data import cells3d @@ -21,7 +27,7 @@ def test_something(): vertices, faces, normals, values = marching_cubes(binary, 0) surface = (vertices, faces, values) - convex_hull(surface) + # convex_hull(surface) laplacian_smooth(surface) taubin_smooth(surface) simplification_clustering_decimation(surface) From 7a33fb1f43f91b3553e26c3e33edfa20a23013e3 Mon Sep 17 00:00:00 2001 From: zacsimile Date: Wed, 31 Jul 2024 23:57:58 +0200 Subject: [PATCH 19/23] Restore push checks --- .github/workflows/test_and_deploy.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test_and_deploy.yml b/.github/workflows/test_and_deploy.yml index d133231..69921c9 100644 --- a/.github/workflows/test_and_deploy.yml +++ b/.github/workflows/test_and_deploy.yml @@ -4,6 +4,8 @@ name: tests on: push: + branches: + - main tags: - "v*" # Push events to matching v*, i.e. v1.0, v20.15.10 pull_request: From bdc18dcb0b3d2bfb73cfc41f67a2e042c9864d8c Mon Sep 17 00:00:00 2001 From: zacsimile Date: Thu, 1 Aug 2024 00:00:48 +0200 Subject: [PATCH 20/23] Fix --- .github/workflows/test_and_deploy.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test_and_deploy.yml b/.github/workflows/test_and_deploy.yml index 69921c9..a4879ed 100644 --- a/.github/workflows/test_and_deploy.yml +++ b/.github/workflows/test_and_deploy.yml @@ -23,10 +23,10 @@ jobs: platform: ['ubuntu-latest', 'windows-latest', 'macos-latest'] python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] exclude: - - os: macos-latest - pyversion: '3.8' - - os: macos-latest - pyversion: '3.9' + - platform: macos-latest + python-version: '3.8' + - platform: macos-latest + python-version: '3.9' steps: - uses: actions/checkout@v4 @@ -62,10 +62,10 @@ jobs: platform: ['ubuntu-latest', 'windows-latest', 'macos-latest'] python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] exclude: - - os: macos-latest - pyversion: '3.8' - - os: macos-latest - pyversion: '3.9' + - platform: macos-latest + python-version: '3.8' + - platform: macos-latest + python-version: '3.9' steps: - uses: actions/checkout@v4 - name: Set up Python From 04e8648f569a4ee1ec48930d2f8aee5565628fee Mon Sep 17 00:00:00 2001 From: zacsimile Date: Thu, 1 Aug 2024 00:01:58 +0200 Subject: [PATCH 21/23] Kill macos again --- .github/workflows/test_and_deploy.yml | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/.github/workflows/test_and_deploy.yml b/.github/workflows/test_and_deploy.yml index a4879ed..1481ca4 100644 --- a/.github/workflows/test_and_deploy.yml +++ b/.github/workflows/test_and_deploy.yml @@ -20,13 +20,8 @@ jobs: strategy: fail-fast: false matrix: - platform: ['ubuntu-latest', 'windows-latest', 'macos-latest'] + platform: ['ubuntu-latest', 'windows-latest'] #, 'macos-latest'] python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] - exclude: - - platform: macos-latest - python-version: '3.8' - - platform: macos-latest - python-version: '3.9' steps: - uses: actions/checkout@v4 @@ -59,13 +54,8 @@ jobs: strategy: fail-fast: false matrix: - platform: ['ubuntu-latest', 'windows-latest', 'macos-latest'] + platform: ['ubuntu-latest', 'windows-latest'] #, 'macos-latest'] python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] - exclude: - - platform: macos-latest - python-version: '3.8' - - platform: macos-latest - python-version: '3.9' steps: - uses: actions/checkout@v4 - name: Set up Python From 00b70f50949aa1e2081304cac2de314250d40b50 Mon Sep 17 00:00:00 2001 From: zacsimile Date: Thu, 1 Aug 2024 00:06:35 +0200 Subject: [PATCH 22/23] Only stable on 3.8/3.9 --- .github/workflows/test_and_deploy.yml | 4 ++-- src/napari_pymeshlab/_tests/test_functions.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test_and_deploy.yml b/.github/workflows/test_and_deploy.yml index 1481ca4..a46b0b9 100644 --- a/.github/workflows/test_and_deploy.yml +++ b/.github/workflows/test_and_deploy.yml @@ -21,7 +21,7 @@ jobs: fail-fast: false matrix: platform: ['ubuntu-latest', 'windows-latest'] #, 'macos-latest'] - python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] + python-version: ['3.8', '3.9'] steps: - uses: actions/checkout@v4 @@ -55,7 +55,7 @@ jobs: fail-fast: false matrix: platform: ['ubuntu-latest', 'windows-latest'] #, 'macos-latest'] - python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] + python-version: ['3.8', '3.9'] steps: - uses: actions/checkout@v4 - name: Set up Python diff --git a/src/napari_pymeshlab/_tests/test_functions.py b/src/napari_pymeshlab/_tests/test_functions.py index db1b4b0..44f743b 100644 --- a/src/napari_pymeshlab/_tests/test_functions.py +++ b/src/napari_pymeshlab/_tests/test_functions.py @@ -1,6 +1,6 @@ def test_something(): from napari_pymeshlab import ( - # convex_hull, + convex_hull, laplacian_smooth, taubin_smooth, simplification_clustering_decimation, @@ -27,7 +27,7 @@ def test_something(): vertices, faces, normals, values = marching_cubes(binary, 0) surface = (vertices, faces, values) - # convex_hull(surface) + convex_hull(surface) laplacian_smooth(surface) taubin_smooth(surface) simplification_clustering_decimation(surface) From 932194d0d53521e74cfafe432a0eb00b9cf3d47c Mon Sep 17 00:00:00 2001 From: zacsimile Date: Thu, 1 Aug 2024 00:11:14 +0200 Subject: [PATCH 23/23] Fix reqs --- .github/workflows/test_and_deploy.yml | 2 +- setup.cfg | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test_and_deploy.yml b/.github/workflows/test_and_deploy.yml index a46b0b9..c0cb467 100644 --- a/.github/workflows/test_and_deploy.yml +++ b/.github/workflows/test_and_deploy.yml @@ -49,7 +49,7 @@ jobs: # and requires that you have put your twine API key in your # github secrets (see readme for details) needs: [test] - runs-on: ubuntu-latest + runs-on: ${{ matrix.platform }} if: contains(github.ref, 'tags') strategy: fail-fast: false diff --git a/setup.cfg b/setup.cfg index 06741e9..84eb3cf 100644 --- a/setup.cfg +++ b/setup.cfg @@ -24,8 +24,6 @@ classifiers = Programming Language :: Python :: 3 Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 - Programming Language :: Python :: 3.10 - Programming Language :: Python :: 3.11 Operating System :: OS Independent License :: OSI Approved :: GNU General Public License v3 (GPLv3) @@ -33,7 +31,7 @@ classifiers = [options] packages = find: include_package_data = True -python_requires = >=3.7 +python_requires = >=3.8 package_dir = =src