Update and run all pre commit hooks#121
Open
C-Achard wants to merge 4 commits into
Open
Conversation
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.
5 tasks
Collaborator
Author
|
Requires rebasing |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.