From 5106040b7b49494c65e8cc42585c49e3de3dbf04 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 2 Feb 2024 10:22:19 +0100 Subject: [PATCH] [pre-commit.ci] pre-commit autoupdate (#104) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [pre-commit.ci] pre-commit autoupdate 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.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update tox.ini https://github.com/napari/cookiecutter-napari-plugin/issues/146#issuecomment-1383207737 * Update tox.ini https://github.com/napari/cookiecutter-napari-plugin/issues/146#issuecomment-1383207737 * Update tox.ini https://github.com/napari/cookiecutter-napari-plugin/issues/146#issuecomment-1383207737 * fix typing * refix * add concurrency checks * update actions --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: jaimergp --- .github/workflows/check_setup_cfg.yml | 13 +++++++++++-- .github/workflows/deploy.yml | 4 ++-- .github/workflows/make_bundle_conda.yml | 12 ++++++------ .github/workflows/tests.yml | 13 +++++++++++-- .github/workflows/tests_ui.yml | 13 +++++++++++-- .github/workflows/typing.yml | 13 +++++++++++-- .pre-commit-config.yaml | 6 +++--- build_installers.py | 1 + constructor-manager-cli/tox.ini | 3 ++- .../src/constructor_manager_ui/data.py | 1 + .../src/constructor_manager_ui/style/images.py | 3 ++- constructor-manager-ui/tox.ini | 3 ++- constructor-manager/tox.ini | 3 ++- 13 files changed, 65 insertions(+), 23 deletions(-) diff --git a/.github/workflows/check_setup_cfg.yml b/.github/workflows/check_setup_cfg.yml index d3385155..f2082800 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: @@ -15,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 @@ -33,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 466536a8..f6d41a75 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 }} @@ -22,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 11743e03..3a55e3f9 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 }} @@ -22,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 fe5f664c..4fdc15e4 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 }} @@ -23,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 }} 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 diff --git a/build_installers.py b/build_installers.py index b9029f95..75b2d67e 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-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 = 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 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..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 = [int(v) for v in QtCore.qVersion().split('.')] +# "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 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 = 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 =