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

chore: Add ruff dependency and configuration #36

Merged
merged 8 commits into from
Jun 5, 2024

Conversation

ecalifornica
Copy link
Member

@ecalifornica ecalifornica commented Oct 16, 2023

edited description by @jsstevenson:

close #3

  • Add Ruff formatting and linting. Remove flake8, isort, black, pylint, bandit -- Ruff can cover these bases pretty well.
  • Update pre-commit hooks to perform checks for both Ruff linting and formatting
  • Update cqa makefile target to do the same (just check), and reformat target to actually format.

Specific rule groupings selected (note that many specific rules also include auto-fixability -- so while they're nitpicky, they're also self-executing):

@ecalifornica ecalifornica requested a review from reece as a code owner October 16, 2023 02:18
@codecov
Copy link

codecov bot commented Oct 16, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (9aa8d98) to head (5078419).
Report is 31 commits behind head on main.

Current head 5078419 differs from pull request most recent head cd9e9e6

Please upload reports for the commit cd9e9e6 to get more accurate results.

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #36   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            2         2           
  Lines           18        18           
=========================================
  Hits            18        18           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the stale Issue is stale and subject to automatic closing label Nov 16, 2023
Copy link

This PR was closed because it has been stalled for 7 days with no activity.

@github-actions github-actions bot closed this Nov 24, 2023
@reece reece reopened this Feb 19, 2024
@reece reece requested a review from a team as a code owner February 19, 2024 03:53
@reece reece removed the stale Issue is stale and subject to automatic closing label Feb 19, 2024
@reece
Copy link
Member

reece commented Feb 19, 2024

This issue was closed by stalebot. It has been reopened to give more time for community review. See biocommons coding guidelines for stale issue and pull request policies. This resurrection is expected to be a onos.environ["GITHUB_TOKEN"]e-time event.

Copy link

This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added stale Issue is stale and subject to automatic closing and removed stale Issue is stale and subject to automatic closing labels Mar 21, 2024
@jsstevenson
Copy link
Contributor

I'd add one thought here, in addition to my comment in #3 : Ruff development moves very quickly, and new rules are opted-in by default, which can cause headaches in CI (eg an aesthetic change like touching up the docs can fail because new code checks have been introduced). For this reason, we pin an exact Ruff version and have a policy of revisiting it about every 6 months.

@jsstevenson jsstevenson mentioned this pull request Mar 26, 2024
Copy link

This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the stale Issue is stale and subject to automatic closing label Apr 26, 2024
Copy link

github-actions bot commented May 3, 2024

This PR was closed because it has been stalled for 7 days with no activity.

@jsstevenson
Copy link
Contributor

There's some room for discussion about particular Ruff rules/configs. Experimentally, I think PTH (here) will take the most work to implement, although I think it's worth it in the long run.

Note: I'm not totally sure how to handle testing of the boilerplate code contained here -- I noqa'd it for now?

@github-actions github-actions bot removed the stale Issue is stale and subject to automatic closing label May 21, 2024
pyproject.toml Outdated Show resolved Hide resolved
pyproject.toml Show resolved Hide resolved
pyproject.toml Show resolved Hide resolved
@jsstevenson
Copy link
Contributor

Other notes: I've left off two linting groups, flake8-annotations and flake8-pydocstyle because I think they'd be a big lift to achieve compliance with. Worth eventually implementing IMO.

@jsstevenson jsstevenson requested a review from korikuzma May 21, 2024 18:09
@korikuzma
Copy link
Contributor

@biocommons/maintainers did anyone else want to review this before it gets merged in?

@jsstevenson jsstevenson merged commit 9a7060f into biocommons:main Jun 5, 2024
6 checks passed
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

Successfully merging this pull request may close these issues.

add ruff support
5 participants