bioio-devs / bioio

Image reading, metadata management, and image writing for Microscopy images in Python
https://bioio-devs.github.io/bioio/OVERVIEW.html
BSD 3-Clause "New" or "Revised" License
39 stars 4 forks source link

Admin: update pre-commit to `ruff` #50

Open evamaxfield opened 3 months ago

evamaxfield commented 3 months ago

From: https://github.com/bioio-devs/bioio/pull/48#discussion_r1667011062

Just as a general note, this is all fine but ruff does all of these in one except for black. My pre-commit configs are now: black, ruff, mypy

In short, ruff is a new-ish tool for linting, formating, isorting, etc. It pull in all of the standards from existing systems into a single tool and is much faster at processing a whole repo's worth of changes.

See here for an example of my current pre-commit config: https://github.com/evamaxfield/rs-graph/blob/main/.pre-commit-config.yaml

Ignoring the notebooks section and the mypy extended types installs I generally think this is the minimum that pre-commit needs to be set up with now that Ruff does so much of the work.

psobolewskiPhD commented 2 months ago

In napari land we've started using the ruff formater instead of black too: https://docs.astral.sh/ruff/formatter/