From 24b5617e4e1d44caee00c9eba56e8cd28d1cb08a Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 29 Jan 2024 17:48:09 +0000 Subject: [PATCH 1/9] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/psf/black: 23.12.1 → 24.1.1](https://github.com/psf/black/compare/23.12.1...24.1.1) - [github.com/PyCQA/flake8: 6.1.0 → 7.0.0](https://github.com/PyCQA/flake8/compare/6.1.0...7.0.0) - [github.com/astral-sh/ruff-pre-commit: v0.1.9 → v0.1.14](https://github.com/astral-sh/ruff-pre-commit/compare/v0.1.9...v0.1.14) --- .pre-commit-config.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a1d96e0e..0c19e215 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -21,19 +21,19 @@ repos: args: ["--in-place", "--remove-all-unused-imports"] exclude: ^constructor-manager-ui/src/constructor_manager_ui/style/images.py - repo: https://github.com/psf/black - rev: 23.12.1 + rev: 24.1.1 hooks: - id: black exclude: ^constructor-manager-ui/src/constructor_manager_ui/style/images.py - repo: https://github.com/PyCQA/flake8 - rev: 6.1.0 + rev: 7.0.0 hooks: - id: flake8 additional_dependencies: [flake8-typing-imports>=1.9.0] args: ["-j8", "--ignore=TYP001,E501,W503"] exclude: ^constructor-manager-ui/src/constructor_manager_ui/style/images.py - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.1.9 + rev: v0.1.14 hooks: - id: ruff exclude: ^constructor-manager-ui/src/constructor_manager_ui/style/images.py From 667ee9a585e5ce56b2894bab2ceab89c2fd8e0cb Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 29 Jan 2024 17:48:51 +0000 Subject: [PATCH 2/9] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- build_installers.py | 1 + constructor-manager-ui/src/constructor_manager_ui/data.py | 1 + 2 files changed, 2 insertions(+) diff --git a/build_installers.py b/build_installers.py index 3b853867..eac5b50a 100644 --- a/build_installers.py +++ b/build_installers.py @@ -38,6 +38,7 @@ Password to unlock the PFX certificate. This is not used here but it might be needed by constructor. """ + import atexit import importlib.metadata import json diff --git a/constructor-manager-ui/src/constructor_manager_ui/data.py b/constructor-manager-ui/src/constructor_manager_ui/data.py index 153e3144..edf2eb88 100644 --- a/constructor-manager-ui/src/constructor_manager_ui/data.py +++ b/constructor-manager-ui/src/constructor_manager_ui/data.py @@ -1,4 +1,5 @@ """Mock data for the installation manager dialog UI.""" + from typing import Dict, Optional, List, NamedTuple # Types From 2dd8b92149fb91e272ffce54fb602b10e0c15151 Mon Sep 17 00:00:00 2001 From: jaimergp Date: Fri, 2 Feb 2024 10:02:01 +0100 Subject: [PATCH 3/9] Update tox.ini https://github.com/napari/cookiecutter-napari-plugin/issues/146#issuecomment-1383207737 --- constructor-manager/tox.ini | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/constructor-manager/tox.ini b/constructor-manager/tox.ini index b1f09aa6..f73994ab 100644 --- a/constructor-manager/tox.ini +++ b/constructor-manager/tox.ini @@ -23,7 +23,8 @@ platform = passenv = CI GITHUB_ACTIONS - DISPLAY XAUTHORITY + DISPLAY + XAUTHORITY NUMPY_EXPERIMENTAL_ARRAY_FUNCTION PYVISTA_OFF_SCREEN extras = From c06276ee83496754ac1a5b4a54a603ad883e88af Mon Sep 17 00:00:00 2001 From: jaimergp Date: Fri, 2 Feb 2024 10:03:06 +0100 Subject: [PATCH 4/9] Update tox.ini https://github.com/napari/cookiecutter-napari-plugin/issues/146#issuecomment-1383207737 --- constructor-manager-cli/tox.ini | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/constructor-manager-cli/tox.ini b/constructor-manager-cli/tox.ini index 4e5403da..1cb0f684 100644 --- a/constructor-manager-cli/tox.ini +++ b/constructor-manager-cli/tox.ini @@ -23,7 +23,8 @@ platform = passenv = CI GITHUB_ACTIONS - DISPLAY XAUTHORITY + DISPLAY + XAUTHORITY NUMPY_EXPERIMENTAL_ARRAY_FUNCTION PYVISTA_OFF_SCREEN extras = From 9a1753aa2c163183f0aed7345c0ef4ecbcc990e1 Mon Sep 17 00:00:00 2001 From: jaimergp Date: Fri, 2 Feb 2024 10:03:19 +0100 Subject: [PATCH 5/9] Update tox.ini https://github.com/napari/cookiecutter-napari-plugin/issues/146#issuecomment-1383207737 --- constructor-manager-ui/tox.ini | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/constructor-manager-ui/tox.ini b/constructor-manager-ui/tox.ini index 5d20d538..7165316d 100644 --- a/constructor-manager-ui/tox.ini +++ b/constructor-manager-ui/tox.ini @@ -25,7 +25,8 @@ platform = passenv = CI GITHUB_ACTIONS - DISPLAY XAUTHORITY + DISPLAY + XAUTHORITY NUMPY_EXPERIMENTAL_ARRAY_FUNCTION PYVISTA_OFF_SCREEN extras = From da70b2f53e12cc1b66a2b462f8a89ceb850d56b2 Mon Sep 17 00:00:00 2001 From: jaimergp Date: Fri, 2 Feb 2024 10:10:14 +0100 Subject: [PATCH 6/9] fix typing --- .../src/constructor_manager_ui/style/images.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/constructor-manager-ui/src/constructor_manager_ui/style/images.py b/constructor-manager-ui/src/constructor_manager_ui/style/images.py index 51883bd1..6c687ee3 100644 --- a/constructor-manager-ui/src/constructor_manager_ui/style/images.py +++ b/constructor-manager-ui/src/constructor_manager_ui/style/images.py @@ -23281,7 +23281,7 @@ \x00\x00\x01\x84\xbb\xb5\x66\x00\ " -qt_version = [int(v) for v in QtCore.qVersion().split('.')] +qt_version = QtCore.qVersion() or "6" # fallback value so we use rcc_version 2 if qt_version < [5, 8, 0]: rcc_version = 1 qt_resource_struct = qt_resource_struct_v1 From 46409925720a8ebfc521b546755fb53c083c8f9d Mon Sep 17 00:00:00 2001 From: jaimergp Date: Fri, 2 Feb 2024 10:12:49 +0100 Subject: [PATCH 7/9] refix --- .../src/constructor_manager_ui/style/images.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/constructor-manager-ui/src/constructor_manager_ui/style/images.py b/constructor-manager-ui/src/constructor_manager_ui/style/images.py index 6c687ee3..10d36e12 100644 --- a/constructor-manager-ui/src/constructor_manager_ui/style/images.py +++ b/constructor-manager-ui/src/constructor_manager_ui/style/images.py @@ -23281,7 +23281,8 @@ \x00\x00\x01\x84\xbb\xb5\x66\x00\ " -qt_version = QtCore.qVersion() or "6" # fallback value so we use rcc_version 2 +# "6" as a fallback value so we use rcc_version 2 +qt_version = [int(v) for v in (QtCore.qVersion() or "6").split('.')] if qt_version < [5, 8, 0]: rcc_version = 1 qt_resource_struct = qt_resource_struct_v1 From 84e18c89f695783d8e57dae07d2a42cf6d0f5e86 Mon Sep 17 00:00:00 2001 From: jaimergp Date: Fri, 2 Feb 2024 10:14:21 +0100 Subject: [PATCH 8/9] add concurrency checks --- .github/workflows/check_setup_cfg.yml | 9 +++++++++ .github/workflows/tests.yml | 9 +++++++++ .github/workflows/tests_ui.yml | 9 +++++++++ .github/workflows/typing.yml | 9 +++++++++ 4 files changed, 36 insertions(+) diff --git a/.github/workflows/check_setup_cfg.yml b/.github/workflows/check_setup_cfg.yml index d3385155..395052b1 100644 --- a/.github/workflows/check_setup_cfg.yml +++ b/.github/workflows/check_setup_cfg.yml @@ -7,6 +7,15 @@ on: # Allows you to run this workflow manually from the Actions tab workflow_dispatch: +concurrency: + # Concurrency group that uses the workflow name and PR number if available + # or commit SHA as a fallback. If a new build is triggered under that + # concurrency group while a previous build is running it will be canceled. + # Repeated pushes to a PR will cancel all previous builds, while multiple + # merges to main will not cancel. + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} + cancel-in-progress: true + jobs: check_setup_cfg: permissions: diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 466536a8..fbff85b0 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -12,6 +12,15 @@ on: - 'constructor-manager-cli/**' workflow_dispatch: +concurrency: + # Concurrency group that uses the workflow name and PR number if available + # or commit SHA as a fallback. If a new build is triggered under that + # concurrency group while a previous build is running it will be canceled. + # Repeated pushes to a PR will cancel all previous builds, while multiple + # merges to main will not cancel. + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} + cancel-in-progress: true + jobs: test: name: ${{ matrix.platform }} py${{ matrix.python-version }} diff --git a/.github/workflows/tests_ui.yml b/.github/workflows/tests_ui.yml index 11743e03..ad2c1415 100644 --- a/.github/workflows/tests_ui.yml +++ b/.github/workflows/tests_ui.yml @@ -11,6 +11,15 @@ on: - 'constructor-manager-ui/**' workflow_dispatch: +concurrency: + # Concurrency group that uses the workflow name and PR number if available + # or commit SHA as a fallback. If a new build is triggered under that + # concurrency group while a previous build is running it will be canceled. + # Repeated pushes to a PR will cancel all previous builds, while multiple + # merges to main will not cancel. + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} + cancel-in-progress: true + jobs: test: name: ${{ matrix.platform }} py${{ matrix.python-version }} diff --git a/.github/workflows/typing.yml b/.github/workflows/typing.yml index fe5f664c..381aa13a 100644 --- a/.github/workflows/typing.yml +++ b/.github/workflows/typing.yml @@ -13,6 +13,15 @@ on: - 'constructor-manager-ui/**' workflow_dispatch: +concurrency: + # Concurrency group that uses the workflow name and PR number if available + # or commit SHA as a fallback. If a new build is triggered under that + # concurrency group while a previous build is running it will be canceled. + # Repeated pushes to a PR will cancel all previous builds, while multiple + # merges to main will not cancel. + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} + cancel-in-progress: true + jobs: test: name: ${{ matrix.platform }} py${{ matrix.python-version }} From f9621b2fed753b46bbb6974267edfb7f2df8b96b Mon Sep 17 00:00:00 2001 From: jaimergp Date: Fri, 2 Feb 2024 10:19:14 +0100 Subject: [PATCH 9/9] update actions --- .github/workflows/check_setup_cfg.yml | 4 ++-- .github/workflows/deploy.yml | 4 ++-- .github/workflows/make_bundle_conda.yml | 12 ++++++------ .github/workflows/tests.yml | 4 ++-- .github/workflows/tests_ui.yml | 4 ++-- .github/workflows/typing.yml | 4 ++-- 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/check_setup_cfg.yml b/.github/workflows/check_setup_cfg.yml index 395052b1..f2082800 100644 --- a/.github/workflows/check_setup_cfg.yml +++ b/.github/workflows/check_setup_cfg.yml @@ -24,7 +24,7 @@ jobs: name: Report setup.cfg changes runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: repository: napari/napari fetch-depth: 0 @@ -42,7 +42,7 @@ jobs: - name: Checkout packaging code if: env.SETUP_CFG_CHANGES && github.event_name == 'schedule' - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: repository: napari/packaging diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index ff2f04d8..f93bab7b 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -20,9 +20,9 @@ jobs: if: ${{ github.repository == 'napari/packaging' && contains(github.ref, 'tags') }} runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "3.x" - name: Install dependencies diff --git a/.github/workflows/make_bundle_conda.yml b/.github/workflows/make_bundle_conda.yml index 29a31d59..18c1ada4 100644 --- a/.github/workflows/make_bundle_conda.yml +++ b/.github/workflows/make_bundle_conda.yml @@ -53,7 +53,7 @@ jobs: steps: - name: Checkout packaging code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 repository: napari/packaging @@ -64,7 +64,7 @@ jobs: # ref: some-ref - name: Checkout napari source - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 repository: napari/napari @@ -73,7 +73,7 @@ jobs: ref: ${{ github.event_name != 'workflow_dispatch' && '' || github.event.inputs.ref }} - name: Checkout conda-forge feedstock - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 repository: conda-forge/napari-feedstock @@ -173,7 +173,7 @@ jobs: outputs: matrix: ${{ steps.set-matrix.outputs.matrix }} steps: - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: "3.9" - name: Prepare matrix @@ -238,14 +238,14 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 repository: napari/packaging path: napari-packaging - name: Checkout napari/napari - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 repository: napari/napari diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index fbff85b0..f6d41a75 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -31,10 +31,10 @@ jobs: python-version: ['3.8', '3.9', '3.10'] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} diff --git a/.github/workflows/tests_ui.yml b/.github/workflows/tests_ui.yml index ad2c1415..3a55e3f9 100644 --- a/.github/workflows/tests_ui.yml +++ b/.github/workflows/tests_ui.yml @@ -31,10 +31,10 @@ jobs: env: DISPLAY: ':99.0' steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} diff --git a/.github/workflows/typing.yml b/.github/workflows/typing.yml index 381aa13a..4fdc15e4 100644 --- a/.github/workflows/typing.yml +++ b/.github/workflows/typing.yml @@ -32,10 +32,10 @@ jobs: python-version: ['3.10'] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }}