From f87b38cfbac852b81d7b8a732e02adb39c11ea35 Mon Sep 17 00:00:00 2001 From: Jordao Bragantini Date: Fri, 28 Apr 2023 22:32:39 -0700 Subject: [PATCH 1/8] updating dependencies and python version --- .github/workflows/test_and_deploy.yml | 2 +- grabber/grabberwidget.py | 2 +- setup.cfg | 9 +++++---- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test_and_deploy.yml b/.github/workflows/test_and_deploy.yml index ffc047b..be564f1 100644 --- a/.github/workflows/test_and_deploy.yml +++ b/.github/workflows/test_and_deploy.yml @@ -23,7 +23,7 @@ jobs: strategy: matrix: platform: [ubuntu-latest, windows-latest, macos-latest] - python-version: [3.7, 3.8, 3.9] + python-version: ["3.8", "3.9", "3.10", "3.11"] steps: - uses: actions/checkout@v2 diff --git a/grabber/grabberwidget.py b/grabber/grabberwidget.py index c2e8439..33146aa 100644 --- a/grabber/grabberwidget.py +++ b/grabber/grabberwidget.py @@ -105,7 +105,7 @@ def _mouse_drag(self, anchors: Anchors, event) -> None: yield # mouse move while event.type == 'mouse_move' and len(anchors.selected_data) == 1: - coords = round(anchors.position[-2]), round(anchors.position[-1]) + coords = round(event.position[-2]), round(event.position[-1]) if anchors.is_valid(coords) and not anchors.is_on_contour(coords): self._grabber.drag(coords) self._contour_layer.data = self._grabber.contour diff --git a/setup.cfg b/setup.cfg index 813a776..b368d6d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -9,27 +9,28 @@ description = A tool for contour-based segmentation correction (2D only). long_description = file: README.md long_description_content_type = text/markdown classifiers = - Development Status :: 2 - Pre-Alpha + Development Status :: 4 - Beta Intended Audience :: Developers Framework :: napari 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 :: MIT License [options] packages = find: -python_requires = >=3.7 +python_requires = >=3.8 setup_requires = setuptools_scm # add your package requirements here install_requires = napari-plugin-engine>=0.1.4 - pyift>=0.0.4 + pyift>=0.1.0 opencv-python-headless>=4.4.0 scipy>=1.7.2 From 9f9d92c51861f6ce9baa690ee69bb5f2142bad40 Mon Sep 17 00:00:00 2001 From: Jordao Bragantini Date: Fri, 28 Apr 2023 22:35:12 -0700 Subject: [PATCH 2/8] tox fix --- tox.ini | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index db5d0f1..55e2c86 100644 --- a/tox.ini +++ b/tox.ini @@ -22,7 +22,8 @@ platform = passenv = CI GITHUB_ACTIONS - DISPLAY XAUTHORITY + DISPLAY + XAUTHORITY NUMPY_EXPERIMENTAL_ARRAY_FUNCTION PYVISTA_OFF_SCREEN deps = From 7e6f1f5f1e07dec8b5f36b5d28f480b30211e13c Mon Sep 17 00:00:00 2001 From: Jordao Bragantini Date: Fri, 28 Apr 2023 22:37:18 -0700 Subject: [PATCH 3/8] tox fix python versions --- tox.ini | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 55e2c86..f4ec435 100644 --- a/tox.ini +++ b/tox.ini @@ -4,9 +4,10 @@ envlist = py{37,38,39}-{linux,macos,windows} [gh-actions] python = - 3.7: py37 3.8: py38 3.9: py39 + 3.10: py310 + 3.11: py311 [gh-actions:env] PLATFORM = From 90798248abeea8fe24126137ae720f6dfdd3393c Mon Sep 17 00:00:00 2001 From: Jordao Bragantini Date: Fri, 28 Apr 2023 22:37:50 -0700 Subject: [PATCH 4/8] tox fix python versions again --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index f4ec435..64506a3 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ # For more information about tox, see https://tox.readthedocs.io/en/latest/ [tox] -envlist = py{37,38,39}-{linux,macos,windows} +envlist = py{38,39,310,311}-{linux,macos,windows} [gh-actions] python = From 9210126ff6b8e76cd6538736f45ea59d8289b8c9 Mon Sep 17 00:00:00 2001 From: Jordao Bragantini Date: Fri, 28 Apr 2023 22:41:25 -0700 Subject: [PATCH 5/8] update github action --- .github/workflows/test_and_deploy.yml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/test_and_deploy.yml b/.github/workflows/test_and_deploy.yml index be564f1..32cb711 100644 --- a/.github/workflows/test_and_deploy.yml +++ b/.github/workflows/test_and_deploy.yml @@ -26,28 +26,28 @@ jobs: python-version: ["3.8", "3.9", "3.10", "3.11"] steps: - - uses: actions/checkout@v2 + - name: Cancel Previous Runs + uses: styfle/cancel-workflow-action@0.11.0 + with: + access_token: ${{ github.token }} - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + - uses: actions/checkout@v3 + + - name: Set up Python ${{ matrix.python }} + uses: actions/setup-python@v4 with: - python-version: ${{ matrix.python-version }} + python-version: ${{ matrix.python }} + - uses: actions/checkout@v3 - # these libraries, along with pytest-xvfb (added in the `deps` in tox.ini), - # 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 + - uses: tlambert03/setup-qt-libs@v1 # strategy borrowed from vispy for installing opengl libs on windows - name: Install Windows OpenGL if: runner.os == 'Windows' run: | - git clone --depth 1 git://github.com/pyvista/gl-ci-helpers.git + git clone --depth 1 https://github.com/pyvista/gl-ci-helpers.git powershell gl-ci-helpers/appveyor/install_opengl.ps1 + if (Test-Path -Path "C:\Windows\system32\opengl32.dll" -PathType Leaf) {Exit 0} else {Exit 1} # note: if you need dependencies from conda, considering using # setup-miniconda: https://github.com/conda-incubator/setup-miniconda From c162e5905af1b749e1772917334e5ef3c479d200 Mon Sep 17 00:00:00 2001 From: Jordao Bragantini Date: Fri, 28 Apr 2023 22:46:44 -0700 Subject: [PATCH 6/8] update workflow tox run --- .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 32cb711..cd458fe 100644 --- a/.github/workflows/test_and_deploy.yml +++ b/.github/workflows/test_and_deploy.yml @@ -60,7 +60,7 @@ jobs: # this runs the platform-specific tests declared in tox.ini - name: Test with tox - run: tox + run: python -m tox env: PLATFORM: ${{ matrix.platform }} From 2416243efc58ae4dbcba5ac6d19101dd1d33d35a Mon Sep 17 00:00:00 2001 From: Jordao Bragantini Date: Fri, 28 Apr 2023 22:51:09 -0700 Subject: [PATCH 7/8] update workflow tox run --- .github/workflows/test_and_deploy.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_and_deploy.yml b/.github/workflows/test_and_deploy.yml index cd458fe..fe30150 100644 --- a/.github/workflows/test_and_deploy.yml +++ b/.github/workflows/test_and_deploy.yml @@ -58,11 +58,14 @@ jobs: python -m pip install --upgrade pip pip install setuptools tox tox-gh-actions - # this runs the platform-specific tests declared in tox.ini - name: Test with tox - run: python -m tox + uses: GabrielBB/xvfb-action@v1 + with: + run: python -m tox env: PLATFORM: ${{ matrix.platform }} + BACKEND: ${{ matrix.backend }} + TOXENV: ${{ matrix.toxenv }} - name: Coverage uses: codecov/codecov-action@v1 From e39fcad9b0a40cea2c5c166d1ee11447aa8fd2b4 Mon Sep 17 00:00:00 2001 From: Jordao Bragantini Date: Fri, 28 Apr 2023 22:59:41 -0700 Subject: [PATCH 8/8] update workflow tox run --- .github/workflows/test_and_deploy.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test_and_deploy.yml b/.github/workflows/test_and_deploy.yml index fe30150..610f051 100644 --- a/.github/workflows/test_and_deploy.yml +++ b/.github/workflows/test_and_deploy.yml @@ -18,12 +18,12 @@ on: jobs: test: - name: ${{ matrix.platform }} py${{ matrix.python-version }} + name: ${{ matrix.platform }} ${{ matrix.python }} runs-on: ${{ matrix.platform }} strategy: matrix: platform: [ubuntu-latest, windows-latest, macos-latest] - python-version: ["3.8", "3.9", "3.10", "3.11"] + python: ["3.8", "3.9", "3.10", "3.11"] steps: - name: Cancel Previous Runs @@ -78,9 +78,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@v4 with: python-version: "3.x" - name: Install dependencies