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

[FEAT] Enable Ruff #2121

Merged
merged 12 commits into from
Apr 15, 2024
Merged

[FEAT] Enable Ruff #2121

merged 12 commits into from
Apr 15, 2024

Conversation

samster25
Copy link
Member

@samster25 samster25 commented Apr 15, 2024

  • Enable ruff to speed up linting and increase the number of rules we're using

@github-actions github-actions bot added the enhancement New feature or request label Apr 15, 2024
Copy link

codecov bot commented Apr 15, 2024

Codecov Report

Attention: Patch coverage is 56.52174% with 10 lines in your changes are missing coverage. Please review.

Project coverage is 85.09%. Comparing base (e2c6fec) to head (04915bb).
Report is 5 commits behind head on main.

❗ Current head 04915bb differs from pull request most recent head 649d736. Consider uploading reports for the commit 649d736 to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2121      +/-   ##
==========================================
+ Coverage   85.05%   85.09%   +0.04%     
==========================================
  Files          68       68              
  Lines        7332     7326       -6     
==========================================
- Hits         6236     6234       -2     
+ Misses       1096     1092       -4     
Files Coverage Δ
daft/__init__.py 24.24% <ø> (ø)
daft/delta_lake/delta_lake_scan.py 86.66% <100.00%> (ø)
daft/execution/execution_step.py 93.39% <100.00%> (-0.02%) ⬇️
daft/execution/physical_plan.py 94.86% <100.00%> (ø)
daft/execution/rust_physical_plan_shim.py 95.83% <100.00%> (ø)
daft/filesystem.py 60.89% <ø> (ø)
daft/hudi/hudi_scan.py 82.35% <ø> (ø)
daft/hudi/pyhudi/table.py 97.61% <ø> (ø)
daft/io/_delta_lake.py 89.36% <ø> (ø)
daft/logical/builder.py 91.52% <100.00%> (-0.08%) ⬇️
... and 11 more

@MeepoWin
Copy link
Contributor

Amazing! I'm looking forward to how much this will reduce pre-commit wait times. :)

@samster25
Copy link
Member Author

Amazing! I'm looking forward to how much this will reduce pre-commit wait times. :)

@MeepoWin me too! There's also so many Ruff rules to avoid footguns :)

Copy link
Contributor

@clarkzinzow clarkzinzow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to exclude vendored files, like the cloudpickle code? We'd ideally like to keep vendored files as close to their source as possible, in case we want to pull in upstream changes.

@@ -0,0 +1,33 @@
fix = true
indent-width = 4
line-length = 120
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know this isn't the time to litigate this, but at some point I'd like to discuss dropping this to 80 or Black's default of 88, since 120 often isn't great for reviewing PRs or editing horizontal code panes on a 14-16" laptop.

A discussion for the future! 😉

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah happy to discuss offline! Not super attached to this

@samster25
Copy link
Member Author

Do we want to exclude vendored files, like the cloudpickle code? We'd ideally like to keep vendored files as close to their source as possible, in case we want to pull in upstream changes.

Done! now ignore the cloud pickle files.

@samster25 samster25 enabled auto-merge (squash) April 15, 2024 20:05
@samster25 samster25 merged commit 670654b into main Apr 15, 2024
29 checks passed
@samster25 samster25 deleted the sammy/enable-ruff-linter branch April 15, 2024 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants