Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider Utilizing Ruff #62

Open
4 tasks
cam-barts opened this issue Oct 18, 2023 · 0 comments
Open
4 tasks

Consider Utilizing Ruff #62

cam-barts opened this issue Oct 18, 2023 · 0 comments

Comments

@cam-barts
Copy link
Contributor

As requested in #61, this issue is to track potentially moving to Ruff.

An extremely fast Python linter, written in Rust.

Ruff boasts being a drop in replacement for flake8 as long as certain conditions are met (this project meets those conditions).

On the direction of @priv-kweihmann, I'm happy to generate a PR that does most of the conversion:

  • Run an initial fix on the repo (about 3000 changes, mostly single quotes to double quotes and adding type hints)
  • Update github actions to use ruff or adding ruffs own action
  • Add pre-commit hooks for ruff to help new contributors make good changes
    • pre-commit can be controversial, as some feel it slows down development time. I've found as a code base grows, having a flake8 pre-commit hook can feel sluggish, but switching to ruff I've never found it take even a noticeable amount of time unless of course there are changes to be made. Let me know your thoughts here.
  • Adding a sensible pyproject.toml based configuration for this project
    • setting pydocstyle convention to numpy
    • setting the line length to match blacks (88)
    • adding per file ignores for things like asserts in pytest modules
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant