Skip to content

Update and run all pre commit hooks#121

Open
C-Achard wants to merge 4 commits into
mainfrom
cy/update-pre-commit-hooks
Open

Update and run all pre commit hooks#121
C-Achard wants to merge 4 commits into
mainfrom
cy/update-pre-commit-hooks

Conversation

@C-Achard
Copy link
Copy Markdown
Collaborator

@C-Achard C-Achard commented May 19, 2026

  • Switched to a more modern config, and added pyproject/markdown checks.
  • Fixed all remaining pre-commit errors in all files
  • Disabled some redundant/annoying rules that do not bring anything currently

C-Achard added 4 commits May 19, 2026 14:25
Remove legacy packaging and test config files (setup.cfg, requirements.txt, .isort.cfg, napari_cellseg3d/_tests/pytest.ini, and its conftest). Migrate and update metadata in pyproject.toml: bump supported Python classifiers to 3.10–3.12, add napari manifest entry-point, include napari.yaml in package data, simplify dynamic fields, adjust optional dependencies (add PyQt6, pyside6, move pydensecrf2 to crf extra) and streamline dev dependencies (remove black/isort as direct dev deps). Update tooling rules (ruff token change) and remove redundant tool configs. Update tox.ini to target py310/311/312 across linux/windows/macos, expose platform mappings for GH Actions, and switch to using extras for test/crf/pyqt6 while keeping usedevelop and running pytest as the test command.
Skip a test that causes GitHub Actions to freeze by importing pytest and marking it skipped (needs to be fixed or removed). In worker_inference, replace np.reshape(...) with the ndarray.reshape(...) call and remove an obsolete commented reshape for clarity. In dev_scripts/correct_labels, initialize a napari.Viewer and add the image via viewer.add_image instead of calling napari.view_image(), ensuring the image layer is properly created.
Bump and extend pre-commit configuration and migrate pyproject to a PEP 621 style layout. .pre-commit-config.yaml: update pre-commit-hooks rev, replace/update ruff hook to astral-sh/ruff-pre-commit with auto-fix and unsafe-fixes, add ruff-format, mdformat (with mdformat-myst), pyproject-fmt and validate-pyproject hooks; keep napari-plugin-checks. pyproject.toml: add [build-system], normalize project metadata (name, license, requires-python, classifiers), move authors to [[project.authors]], declare dynamic version, reorganize and deduplicate dependencies and optional-dependencies, add project.urls and napari entry-point, add [tool.setuptools] packaging settings, move and refine ruff configuration under [tool.ruff.lint], and add [tool.pyproject-fmt] settings. Overall this modernizes packaging and enables enhanced linting/formatting via pre-commit hooks.
@C-Achard C-Achard self-assigned this May 19, 2026
@C-Achard C-Achard added the enhancement New feature or request label May 19, 2026
@C-Achard C-Achard marked this pull request as ready for review May 19, 2026 13:12
@C-Achard C-Achard added this to the Python 3.10-3.12 support milestone May 19, 2026
@C-Achard C-Achard changed the base branch from cy/py-312-support to main May 19, 2026 16:33
@C-Achard
Copy link
Copy Markdown
Collaborator Author

Requires rebasing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant