supabase-py icon indicating copy to clipboard operation
supabase-py copied to clipboard

Feat/update pre commit

Open alon710 opened this issue 1 year ago • 2 comments

What kind of change does this PR introduce?

This PR introduces enhancements to our development tooling and CI/CD pipeline.

What is the current behavior?

Before this PR, our pre-commit hooks were using various tools. The continuous integration (CI) setup also lacked mechanisms to enforce these standards universally across all commits.

What is the new behavior?

With this PR, we have implemented the following changes:

  1. Pre-commit Hook with Ruff: I have applied ruff via the pre-commit hook to clean up existing files. This was a one-time operation to ensure our codebase meets the linting standards we strive for.
  2. CI Job for Running Pre-commit on All Files: I have added a new job to our GitHub Actions workflow that runs pre-commit on all files as part of our CI process. This ensures that every commit, regardless of origin, adheres to our coding standards before it can be merged into the main branch.

These adjustments are designed to solidify our code quality assurance practices and automate coding standards enforcement during the CI/CD process.

Additional context

The introduction of ruff and the automatic running of pre-commit on all files during CI builds aim to standardize our code quality checks and prevent deviations from our accepted coding practices. This setup minimizes manual interventions and makes the contribution process more efficient.

For more details on the integration and benefits of these tools, please refer to:

alon710 avatar Apr 17 '24 09:04 alon710

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 64.76%. Comparing base (819ba63) to head (b8afa1f). Report is 38 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main     #771       +/-   ##
===========================================
+ Coverage   43.97%   64.76%   +20.78%     
===========================================
  Files          13       13               
  Lines         332      315       -17     
===========================================
+ Hits          146      204       +58     
+ Misses        186      111       -75     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Apr 17 '24 09:04 codecov[bot]

We're going to hold off on merging this as ruff is still relatively new to the Python ecosystem and shouldn't be replacing existing well tested tools as yet. I personally use ruff and like it but as this is a project used by many who are already using the existing tools it wouldn't be good to make this change at this point in time.

silentworks avatar Apr 23 '24 13:04 silentworks