Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#104)
Browse files Browse the repository at this point in the history
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/psf/black: 23.12.1 → 24.1.1](psf/black@23.12.1...24.1.1)
- [github.com/PyCQA/flake8: 6.1.0 → 7.0.0](PyCQA/flake8@6.1.0...7.0.0)
- [github.com/astral-sh/ruff-pre-commit: v0.1.9 → v0.1.14](astral-sh/ruff-pre-commit@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

napari/cookiecutter-napari-plugin#146 (comment)

* Update tox.ini

napari/cookiecutter-napari-plugin#146 (comment)

* Update tox.ini

napari/cookiecutter-napari-plugin#146 (comment)

* 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 <jaimergp@users.noreply.github.com>
  • Loading branch information
pre-commit-ci[bot] and jaimergp authored Feb 2, 2024
1 parent 06fdf26 commit 5106040
Show file tree
Hide file tree
Showing 13 changed files with 65 additions and 23 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/check_setup_cfg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand All @@ -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

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/make_bundle_conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
13 changes: 11 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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 }}

Expand Down
13 changes: 11 additions & 2 deletions .github/workflows/tests_ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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 }}

Expand Down
13 changes: 11 additions & 2 deletions .github/workflows/typing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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 }}

Expand Down
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions build_installers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion constructor-manager-cli/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ platform =
passenv =
CI
GITHUB_ACTIONS
DISPLAY XAUTHORITY
DISPLAY
XAUTHORITY
NUMPY_EXPERIMENTAL_ARRAY_FUNCTION
PYVISTA_OFF_SCREEN
extras =
Expand Down
1 change: 1 addition & 0 deletions constructor-manager-ui/src/constructor_manager_ui/data.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Mock data for the installation manager dialog UI."""

from typing import Dict, Optional, List, NamedTuple

# Types
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion constructor-manager-ui/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ platform =
passenv =
CI
GITHUB_ACTIONS
DISPLAY XAUTHORITY
DISPLAY
XAUTHORITY
NUMPY_EXPERIMENTAL_ARRAY_FUNCTION
PYVISTA_OFF_SCREEN
extras =
Expand Down
3 changes: 2 additions & 1 deletion constructor-manager/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ platform =
passenv =
CI
GITHUB_ACTIONS
DISPLAY XAUTHORITY
DISPLAY
XAUTHORITY
NUMPY_EXPERIMENTAL_ARRAY_FUNCTION
PYVISTA_OFF_SCREEN
extras =
Expand Down

0 comments on commit 5106040

Please sign in to comment.