drivendataorg / cookiecutter-data-science

A logical, reasonably standardized, but flexible project structure for doing and sharing data science work.
https://cookiecutter-data-science.drivendata.org/
MIT License
8.23k stars 2.45k forks source link

Add ruff as default linting + formatting option #387

Open chrisjkuch opened 3 months ago

chrisjkuch commented 3 months ago

Closes #374 Closes #388

This PR adds ruff as the default linting and formatting option for new ccds projects.

Implementation notes

Discussion

As mentioned, this PR makes ruff the default option. I think there's good arguments for this that mostly boil down to "it's simpler + faster":

However, ruff is still (relatively) new, whereas flake8/black/isort is more mature, and most projects won't notice the speed difference until they get quite large. I could be persuaded that we should introduce ruff without making it the default option.

jayqi commented 3 months ago

I'm in favor of having the default to be Ruff. It's clear that Ruff is the emerging standard, and they describe themselves as production-ready.

There are major projects that are fully using Ruff for linting and formatting.

Lots of other major projects (e.g., pip, matplotlib, PyTorch) are using Ruff for linting over flake8, though are still using black for now.