From 58426f0c525db667afd08e85df54514b491033f4 Mon Sep 17 00:00:00 2001 From: Cyril Achard Date: Wed, 4 Mar 2026 10:02:39 +0100 Subject: [PATCH 01/11] Minimal pyproject.toml migration: add project metadata and setuptools config Populate pyproject.toml with PEP 621 project metadata and setuptools configuration: set build-system requirements (setuptools>=64, wheel, setuptools_scm[toml]>=7), declare package name, description, python requirement, license, authors, classifiers, dependencies, project URLs and napari entry-point. Configure setuptools to use src layout, include package data (napari.yaml), mark version as dynamic (setuptools-scm), and add optional testing dependencies. Minor whitespace/qt_api line adjustments preserved. --- pyproject.toml | 84 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 83 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 594660f9..efd95704 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,89 @@ [build-system] -requires = ["setuptools", "wheel", "setuptools_scm"] +requires = [ + "setuptools>=64", + "wheel", + "setuptools_scm[toml]>=7" +] build-backend = "setuptools.build_meta" +[project] +name = "napari-deeplabcut" +description = "napari + DeepLabCut annotation tool" +readme = { file = "README.md", content-type = "text/markdown" } +requires-python = ">=3.10" +license = { text = "LGPL-3.0" } + +authors = [ + { name = "Team DeepLabCut, Lead by Jessy Lauer", email = "admin@deeplabcut.org" } +] + +classifiers = [ + "Development Status :: 2 - Pre-Alpha", + "Framework :: napari", + "Intended Audience :: Developers", + "Operating System :: OS Independent", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3 :: Only", + "Topic :: Scientific/Engineering :: Artificial Intelligence", + "Topic :: Scientific/Engineering :: Image Processing", + "Topic :: Scientific/Engineering :: Visualization", +] + +dependencies = [ + "dask-image", + "matplotlib>=3.3", + "napari==0.6.6", + "natsort", + "numpy>=1.18.5,<2.0.0", + "opencv-python-headless", + "pandas", + "pyside6>=6.4.2", + "pyyaml", + "qtpy>=2.4", + "scikit-image", + "scipy", + "tables", +] + +# You are using setuptools-scm -> version is derived from git tags +dynamic = ["version"] + +[project.urls] +"Bug Tracker" = "https://github.com/DeepLabCut/napari-deeplabcut/issues" +Documentation = "https://github.com/DeepLabCut/napari-deeplabcut#README.md" +"Source Code" = "https://github.com/DeepLabCut/napari-deeplabcut" +"User Support" = "https://github.com/DeepLabCut/napari-deeplabcut/issues" + +[project.entry-points."napari.manifest"] +napari-deeplabcut = "napari_deeplabcut:napari.yaml" + +[project.optional-dependencies] +testing = [ + "Pillow", + "pytest", + "pytest-cov", + "pytest-qt", + "tox", +] + +# ---------------------------- +# setuptools configuration +# ---------------------------- +[tool.setuptools] +include-package-data = true + +[tool.setuptools.package-dir] +"" = "src" + +[tool.setuptools.packages.find] +where = ["src"] + +[tool.setuptools.package-data] +napari_deeplabcut = ["napari.yaml"] + +# ---------------------------- +# existing tool configuration +# ---------------------------- [tool.ruff] lint.select = ["E", "F", "B", "I", "UP"] lint.ignore = ["E741"] From cb5cdb081774ef7771f09e3f76840beb5415470b Mon Sep 17 00:00:00 2001 From: Cyril Achard Date: Wed, 4 Mar 2026 10:04:42 +0100 Subject: [PATCH 02/11] Bump setuptools and normalize license metadata Update pyproject.toml: raise build-system requirement to setuptools>=77 and replace the license table with license = "LGPL-3.0-only" plus license-files = ["LICENSE"]. These changes align packaging metadata with newer setuptools/PEP expectations and ensure the license file is included. --- pyproject.toml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index efd95704..6e303024 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [build-system] requires = [ - "setuptools>=64", + "setuptools>=77", "wheel", "setuptools_scm[toml]>=7" ] @@ -11,7 +11,8 @@ name = "napari-deeplabcut" description = "napari + DeepLabCut annotation tool" readme = { file = "README.md", content-type = "text/markdown" } requires-python = ">=3.10" -license = { text = "LGPL-3.0" } +license = "LGPL-3.0-only" +license-files = ["LICENSE"] authors = [ { name = "Team DeepLabCut, Lead by Jessy Lauer", email = "admin@deeplabcut.org" } From 2c9b15330f811e10742f3d670d5953f23374fb1f Mon Sep 17 00:00:00 2001 From: Cyril Achard Date: Wed, 4 Mar 2026 10:08:07 +0100 Subject: [PATCH 03/11] Add LGPLv3 classifier and update comment Add GNU Lesser General Public License v3 (LGPLv3) to the project classifiers in pyproject.toml to explicitly declare the license. Also rephrase the setuptools-scm comment for clarity that the version is derived from git tags. --- pyproject.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 6e303024..6b77026f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,6 +28,7 @@ classifiers = [ "Topic :: Scientific/Engineering :: Artificial Intelligence", "Topic :: Scientific/Engineering :: Image Processing", "Topic :: Scientific/Engineering :: Visualization", + "License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)" ] dependencies = [ @@ -46,7 +47,7 @@ dependencies = [ "tables", ] -# You are using setuptools-scm -> version is derived from git tags +# Using setuptools-scm -> version is derived from git tags dynamic = ["version"] [project.urls] From 8e1dd77231e3bca4adccf531bc56b7de9f9b6eb4 Mon Sep 17 00:00:00 2001 From: Cyril Achard Date: Wed, 4 Mar 2026 10:10:30 +0100 Subject: [PATCH 04/11] Add pyproject-fmt & validate hooks; configure fmt Add pyproject-fmt and validate-pyproject to pre-commit to enforce and validate pyproject.toml formatting. Add [tool.pyproject-fmt] settings in pyproject.toml to set max_supported_python to 3.12, enable generation of Python version classifiers, and keep tables in long format to preserve readability. --- .pre-commit-config.yaml | 8 +++++ pyproject.toml | 79 +++++++++++++++++++---------------------- 2 files changed, 45 insertions(+), 42 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 77f27c91..3d40485f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -17,6 +17,14 @@ repos: # Run the linter. - id: ruff-check args: [--fix,--unsafe-fixes] + - repo: https://github.com/tox-dev/pyproject-fmt + rev: v2.15.2 + hooks: + - id: pyproject-fmt + - repo: https://github.com/abravalheri/validate-pyproject + rev: v0.25 + hooks: + - id: validate-pyproject - repo: https://github.com/tlambert03/napari-plugin-checks rev: v0.3.0 hooks: diff --git a/pyproject.toml b/pyproject.toml index 6b77026f..4e93006f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,42 +1,36 @@ [build-system] -requires = [ - "setuptools>=77", - "wheel", - "setuptools_scm[toml]>=7" -] build-backend = "setuptools.build_meta" +requires = [ "setuptools>=77", "setuptools-scm[toml]>=7", "wheel" ] [project] name = "napari-deeplabcut" description = "napari + DeepLabCut annotation tool" readme = { file = "README.md", content-type = "text/markdown" } -requires-python = ">=3.10" license = "LGPL-3.0-only" -license-files = ["LICENSE"] - -authors = [ - { name = "Team DeepLabCut, Lead by Jessy Lauer", email = "admin@deeplabcut.org" } -] - +license-files = [ "LICENSE" ] +requires-python = ">=3.10" classifiers = [ "Development Status :: 2 - Pre-Alpha", "Framework :: napari", "Intended Audience :: Developers", + "License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)", "Operating System :: OS Independent", - "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Topic :: Scientific/Engineering :: Artificial Intelligence", "Topic :: Scientific/Engineering :: Image Processing", "Topic :: Scientific/Engineering :: Visualization", - "License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)" ] - +# Using setuptools-scm -> version is derived from git tags +dynamic = [ "version" ] dependencies = [ "dask-image", "matplotlib>=3.3", "napari==0.6.6", "natsort", - "numpy>=1.18.5,<2.0.0", + "numpy>=1.18.5,<2", "opencv-python-headless", "pandas", "pyside6>=6.4.2", @@ -46,58 +40,59 @@ dependencies = [ "scipy", "tables", ] - -# Using setuptools-scm -> version is derived from git tags -dynamic = ["version"] - -[project.urls] -"Bug Tracker" = "https://github.com/DeepLabCut/napari-deeplabcut/issues" -Documentation = "https://github.com/DeepLabCut/napari-deeplabcut#README.md" -"Source Code" = "https://github.com/DeepLabCut/napari-deeplabcut" -"User Support" = "https://github.com/DeepLabCut/napari-deeplabcut/issues" - +[[project.authors]] +name = "Team DeepLabCut, Lead by Jessy Lauer" +email = "admin@deeplabcut.org" [project.entry-points."napari.manifest"] napari-deeplabcut = "napari_deeplabcut:napari.yaml" - [project.optional-dependencies] testing = [ - "Pillow", + "pillow", "pytest", "pytest-cov", "pytest-qt", "tox", ] +[project.urls] +"Bug Tracker" = "https://github.com/DeepLabCut/napari-deeplabcut/issues" +Documentation = "https://github.com/DeepLabCut/napari-deeplabcut#README.md" +"Source Code" = "https://github.com/DeepLabCut/napari-deeplabcut" +"User Support" = "https://github.com/DeepLabCut/napari-deeplabcut/issues" # ---------------------------- # setuptools configuration # ---------------------------- [tool.setuptools] include-package-data = true - +[tool.setuptools.package-data] +napari_deeplabcut = [ "napari.yaml" ] [tool.setuptools.package-dir] "" = "src" - [tool.setuptools.packages.find] -where = ["src"] +where = [ "src" ] -[tool.setuptools.package-data] -napari_deeplabcut = ["napari.yaml"] +[tool.setuptools_scm] +write_to = "src/napari_deeplabcut/_version.py" + +[tool.uv] +package = true # ---------------------------- # existing tool configuration # ---------------------------- [tool.ruff] -lint.select = ["E", "F", "B", "I", "UP"] -lint.ignore = ["E741"] target-version = "py310" -fix = true line-length = 120 - -[tool.uv] -package = true - -[tool.setuptools_scm] -write_to = "src/napari_deeplabcut/_version.py" +fix = true +[tool.ruff.lint] +select = [ "E", "F", "B", "I", "UP" ] +ignore = [ "E741" ] + +[tool.pyproject-fmt] +max_supported_python = "3.12" +generate_python_version_classifiers = true +# Avoid collapsing tables to field.key = value format (less readable) +table_format = "long" [tool.pytest.ini_options] qt_api = "pyside6" From ca984b94bfb3188b061b22cdddf079135798ee10 Mon Sep 17 00:00:00 2001 From: Cyril Achard Date: Wed, 4 Mar 2026 10:16:49 +0100 Subject: [PATCH 05/11] Delete setup.cfg --- setup.cfg | 67 ------------------------------------------------------- 1 file changed, 67 deletions(-) delete mode 100644 setup.cfg diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index fe16cb09..00000000 --- a/setup.cfg +++ /dev/null @@ -1,67 +0,0 @@ -[metadata] -name = napari-deeplabcut -description = napari + DeepLabCut annotation tool -long_description = file: README.md -long_description_content_type = text/markdown -url = https://github.com/DeepLabCut/napari-deeplabcut -author = Team DeepLabCut, Lead by Jessy Lauer -author_email = admin@deeplabcut.org -license = LGPL-3.0 -license_files = LICENSE -classifiers = - Development Status :: 2 - Pre-Alpha - Framework :: napari - Intended Audience :: Developers - Operating System :: OS Independent - Programming Language :: Python :: 3 - Programming Language :: Python :: 3 :: Only - Topic :: Scientific/Engineering :: Artificial Intelligence - Topic :: Scientific/Engineering :: Image Processing - Topic :: Scientific/Engineering :: Visualization -project_urls = - Bug Tracker = https://github.com/DeepLabCut/napari-deeplabcut/issues - Documentation = https://github.com/DeepLabCut/napari-deeplabcut#README.md - Source Code = https://github.com/DeepLabCut/napari-deeplabcut - User Support = https://github.com/DeepLabCut/napari-deeplabcut/issues - -[options] -packages = find: -install_requires = - dask-image - matplotlib>=3.3 - napari==0.6.6 - natsort - numpy>=1.18.5,<2.0.0 - opencv-python-headless - pandas - pyside6>=6.4.2 - pyyaml - qtpy>=2.4 - scikit-image - scipy - tables -python_requires = >=3.10 -include_package_data = True -package_dir = - =src -setup_requires = - setuptools-scm - -[options.packages.find] -where = src - -[options.entry_points] -napari.manifest = - napari-deeplabcut = napari_deeplabcut:napari.yaml - -[options.extras_require] -testing = - Pillow - pytest - pytest-cov - pytest-qt - tox - -[options.package_data] -napari_deeplabcut = - napari.yaml From 87d39c946839ae952b574f8931c0f60ed1f6b1a6 Mon Sep 17 00:00:00 2001 From: Cyril Achard Date: Wed, 4 Mar 2026 10:18:13 +0100 Subject: [PATCH 06/11] Remove LGPLv3 license classifier Delete the GNU Lesser General Public License v3 trove classifier from pyproject.toml to correct package metadata, following PEP 639 --- pyproject.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 4e93006f..19ddbb69 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -13,7 +13,6 @@ classifiers = [ "Development Status :: 2 - Pre-Alpha", "Framework :: napari", "Intended Audience :: Developers", - "License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)", "Operating System :: OS Independent", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.10", From ea64aabccb1bb9c75be1a26cd8eb3874edf4bb29 Mon Sep 17 00:00:00 2001 From: Cyril Achard Date: Wed, 4 Mar 2026 10:44:29 +0100 Subject: [PATCH 07/11] Remove setup-cfg-fmt hook and fix author casing Remove the setup-cfg-fmt hook from .pre-commit-config.yaml. Correct a grammar/casing issue in pyproject.toml by changing the author line from "Lead by Jessy Lauer" to "led by Jessy Lauer". --- .pre-commit-config.yaml | 4 ---- pyproject.toml | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3d40485f..ea9d503c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,10 +5,6 @@ repos: - id: check-docstring-first - id: end-of-file-fixer - id: trailing-whitespace - - repo: https://github.com/asottile/setup-cfg-fmt - rev: v3.2.0 - hooks: - - id: setup-cfg-fmt - repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.14.10 hooks: diff --git a/pyproject.toml b/pyproject.toml index 19ddbb69..afc982af 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -40,7 +40,7 @@ dependencies = [ "tables", ] [[project.authors]] -name = "Team DeepLabCut, Lead by Jessy Lauer" +name = "Team DeepLabCut, led by Jessy Lauer" email = "admin@deeplabcut.org" [project.entry-points."napari.manifest"] napari-deeplabcut = "napari_deeplabcut:napari.yaml" From 1dae79e446f1905e21b8db3edf1bcfea6f95fa46 Mon Sep 17 00:00:00 2001 From: Cyril Achard Date: Wed, 4 Mar 2026 10:24:05 +0100 Subject: [PATCH 08/11] Update pre-commit hooks versions --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ea9d503c..e17244c0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -6,7 +6,7 @@ repos: - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.14.10 + rev: v0.15.4 hooks: # Run the formatter. - id: ruff-format @@ -14,7 +14,7 @@ repos: - id: ruff-check args: [--fix,--unsafe-fixes] - repo: https://github.com/tox-dev/pyproject-fmt - rev: v2.15.2 + rev: v2.16.2 hooks: - id: pyproject-fmt - repo: https://github.com/abravalheri/validate-pyproject From ab7bc1a06d279cf4582516e0e80e60b9d0102bfc Mon Sep 17 00:00:00 2001 From: Cyril Achard Date: Wed, 4 Mar 2026 10:26:54 +0100 Subject: [PATCH 09/11] Add pre-commit hooks and pydocstyle convention Add several pre-commit hooks (check-added-large-files, check-yaml, check-toml, name-tests-test, check-merge-conflict) alongside existing EOF and trailing-whitespace fixes to improve repo hygiene and catch common issues early. Also configure ruff's pydocstyle convention to "google" in pyproject.toml to enforce Google-style docstrings. --- .pre-commit-config.yaml | 5 ++++- pyproject.toml | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e17244c0..533cb137 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,8 +2,11 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v6.0.0 hooks: - - id: check-docstring-first + - id: check-added-large-files + - id: check-yaml + - id: check-toml - id: end-of-file-fixer + - id: name-tests-test - id: trailing-whitespace - repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.15.4 diff --git a/pyproject.toml b/pyproject.toml index afc982af..9f3a7f13 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -86,6 +86,8 @@ fix = true [tool.ruff.lint] select = [ "E", "F", "B", "I", "UP" ] ignore = [ "E741" ] +[tool.ruff.lint.pydocstyle] +convention = "google" [tool.pyproject-fmt] max_supported_python = "3.12" From d350d3ed19552592785936204d29e03f0bbc472e Mon Sep 17 00:00:00 2001 From: Cyril Achard Date: Wed, 4 Mar 2026 10:28:19 +0100 Subject: [PATCH 10/11] Add pre-commit PR workflow for changed files Add a GitHub Actions workflow that runs pre-commit checks only on files changed in a pull request. The workflow triggers on PR opened/synchronize/reopened, fetches full git history to detect changed files against the base branch, and exposes that list as an output. A conditional precommit job runs only when changes exist: it checks out the PR branch, sets up Python 3.12, installs pre-commit, and executes pre-commit in CI check-only mode on the changed files (--hook-stage manual --show-diff-on-failure). --- .github/workflows/format.yml | 61 ++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 .github/workflows/format.yml diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml new file mode 100644 index 00000000..95450e58 --- /dev/null +++ b/.github/workflows/format.yml @@ -0,0 +1,61 @@ +name: pre-commit (PR only on changed files) + +on: + pull_request: + types: [opened, synchronize, reopened] + +jobs: + detect_changes: + runs-on: ubuntu-latest + outputs: + changed: ${{ steps.changed_files.outputs.changed }} + + steps: + - name: Checkout full history + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Detect changed files + id: changed_files + run: | + git fetch origin ${{ github.base_ref }} + CHANGED_FILES=$(git diff --name-only origin/${{ github.base_ref }}...HEAD) + + { + echo "changed<> "$GITHUB_OUTPUT" + + - name: Show changed files + run: | + echo "Changed files:" + echo "${{ steps.changed_files.outputs.changed }}" + + precommit: + needs: detect_changes + runs-on: ubuntu-latest + if: ${{ needs.detect_changes.outputs.changed != '' }} + + steps: + - name: Checkout PR branch + uses: actions/checkout@v4 + with: + fetch-depth: 0 + ref: ${{ github.head_ref }} + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.12" + + - name: Install pre-commit + run: pip install pre-commit + + - name: Run pre-commit (CI check-only stage) on changed files + env: + CHANGED_FILES: ${{ needs.detect_changes.outputs.changed }} + run: | + mapfile -t files <<< "$CHANGED_FILES" + pre-commit run --hook-stage manual --files "${files[@]}" --show-diff-on-failure From 5f0fa328c6e8eaea8ec01121950a03b00932f897 Mon Sep 17 00:00:00 2001 From: Cyril Achard Date: Wed, 4 Mar 2026 10:29:45 +0100 Subject: [PATCH 11/11] Run pre-commit on all --- src/napari_deeplabcut/__init__.py | 4 +++- src/napari_deeplabcut/_tests/test_reader.py | 2 +- src/napari_deeplabcut/assets/napari_shortcuts.svg | 2 +- src/napari_deeplabcut/assets/superanimal_quadruped.json | 2 +- src/napari_deeplabcut/assets/superanimal_topviewmouse.json | 2 +- src/napari_deeplabcut/styles/dark.mplstyle | 2 +- src/napari_deeplabcut/styles/light.mplstyle | 2 +- 7 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/napari_deeplabcut/__init__.py b/src/napari_deeplabcut/__init__.py index 6f92c484..0c5dbf49 100644 --- a/src/napari_deeplabcut/__init__.py +++ b/src/napari_deeplabcut/__init__.py @@ -40,7 +40,8 @@ # FIXME: Circumvent the need to access window.qt_viewer warnings.filterwarnings("ignore", category=FutureWarning) -import re +import re # noqa: E402 + # Suppress RuntimeWarnings caused by NaN values in dataframe # (encountered during model-predicted labels refinement stage) warnings.filterwarnings( @@ -49,6 +50,7 @@ message=re.escape("invalid value encountered in cast"), ) + class VispyWarningFilter(logging.Filter): def filter(self, record: logging.LogRecord) -> bool: ignore_messages = ( diff --git a/src/napari_deeplabcut/_tests/test_reader.py b/src/napari_deeplabcut/_tests/test_reader.py index c21a87be..1efc73ad 100644 --- a/src/napari_deeplabcut/_tests/test_reader.py +++ b/src/napari_deeplabcut/_tests/test_reader.py @@ -374,7 +374,7 @@ def test_lazy_imread_grayscale_and_rgba(tmp_path): gray = (np.random.rand(10, 10) * 255).astype(np.uint8) rgba = (np.random.rand(10, 10, 4) * 255).astype(np.uint8) p1, p2 = tmp_path / "g.png", tmp_path / "r.png" - cv2.imwrite(str(p1), gray) # cv2 writes grayscale as-is; color images are written as BGR + cv2.imwrite(str(p1), gray) # cv2 writes grayscale as-is; color images are written as BGR cv2.imwrite(str(p2), cv2.cvtColor(rgba, cv2.COLOR_RGBA2BGRA)) res = _reader._lazy_imread([p1, p2], use_dask=False, stack=False) assert all(img.shape[-1] == 3 for img in res) diff --git a/src/napari_deeplabcut/assets/napari_shortcuts.svg b/src/napari_deeplabcut/assets/napari_shortcuts.svg index da59f60e..89922286 100644 --- a/src/napari_deeplabcut/assets/napari_shortcuts.svg +++ b/src/napari_deeplabcut/assets/napari_shortcuts.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/src/napari_deeplabcut/assets/superanimal_quadruped.json b/src/napari_deeplabcut/assets/superanimal_quadruped.json index 2c6a4689..21e3cdfb 100644 --- a/src/napari_deeplabcut/assets/superanimal_quadruped.json +++ b/src/napari_deeplabcut/assets/superanimal_quadruped.json @@ -155,4 +155,4 @@ 707.5655627887081, 375.0788206592507 ] -} \ No newline at end of file +} diff --git a/src/napari_deeplabcut/assets/superanimal_topviewmouse.json b/src/napari_deeplabcut/assets/superanimal_topviewmouse.json index 0d8f69c6..42495e5a 100644 --- a/src/napari_deeplabcut/assets/superanimal_topviewmouse.json +++ b/src/napari_deeplabcut/assets/superanimal_topviewmouse.json @@ -107,4 +107,4 @@ 117.41024099594408, 252.35239163633167 ] -} \ No newline at end of file +} diff --git a/src/napari_deeplabcut/styles/dark.mplstyle b/src/napari_deeplabcut/styles/dark.mplstyle index 11a8ce6c..1658f9b4 100644 --- a/src/napari_deeplabcut/styles/dark.mplstyle +++ b/src/napari_deeplabcut/styles/dark.mplstyle @@ -9,4 +9,4 @@ axes.labelcolor : f0f1f2 axes.facecolor : none axes.edgecolor : 414851 xtick.color : f0f1f2 -ytick.color : f0f1f2 \ No newline at end of file +ytick.color : f0f1f2 diff --git a/src/napari_deeplabcut/styles/light.mplstyle b/src/napari_deeplabcut/styles/light.mplstyle index 0484b228..3b8d7d1d 100644 --- a/src/napari_deeplabcut/styles/light.mplstyle +++ b/src/napari_deeplabcut/styles/light.mplstyle @@ -9,4 +9,4 @@ axes.labelcolor : 3b3a39 axes.facecolor : none axes.edgecolor : d6d0ce xtick.color : 3b3a39 -ytick.color : 3b3a39 \ No newline at end of file +ytick.color : 3b3a39