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(dev): replace current flake8-based and other linting tools with ruff #5057

Merged
merged 1 commit into from
Dec 21, 2022

Conversation

cpcloud
Copy link
Member

@cpcloud cpcloud commented Dec 20, 2022

This PR replaces all of our flake8 checks and tools with ruff, which is Python linter implemented in Rust designed to be fast, lightweight and combine the most commonly used flake8 plugins into a single tool. While I do not care too much about the performance for ibis developement (though I do for my LSP configuration!) I do care about tool consolidation, which is the main purpose of this PR.

@cpcloud cpcloud added this to the 4.0.0 milestone Dec 20, 2022
@cpcloud cpcloud added developer-tools Tools related to ibis development dependencies Issues or PRs related to dependencies labels Dec 20, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Dec 20, 2022

Test Results

       43 files         43 suites   1h 35m 23s ⏱️
12 645 tests   9 504 ✔️   3 141 💤 0
44 004 runs  33 092 ✔️ 10 912 💤 0

Results for commit 4a1188f.

♻️ This comment has been updated with latest results.

@cpcloud cpcloud force-pushed the ruff branch 2 times, most recently from 8e657e4 to 14128df Compare December 20, 2022 21:04
@codecov
Copy link

codecov bot commented Dec 20, 2022

Codecov Report

Merging #5057 (33de3bf) into master (1a07725) will decrease coverage by 3.76%.
The diff coverage is 86.39%.

❗ Current head 33de3bf differs from pull request most recent head 4a1188f. Consider uploading reports for the commit 4a1188f to get more accurate results

@@            Coverage Diff             @@
##           master    #5057      +/-   ##
==========================================
- Coverage   95.06%   91.29%   -3.77%     
==========================================
  Files         394      388       -6     
  Lines       44018    43416     -602     
  Branches     4319     4293      -26     
==========================================
- Hits        41846    39638    -2208     
- Misses       1668     3290    +1622     
+ Partials      504      488      -16     
Impacted Files Coverage Δ
ibis/backends/base/sql/__init__.py 92.50% <0.00%> (-0.78%) ⬇️
ibis/backends/base/sql/registry/string.py 96.22% <0.00%> (-1.86%) ⬇️
ibis/backends/bigquery/udf/core.py 0.00% <ø> (-89.19%) ⬇️
ibis/backends/clickhouse/__init__.py 94.92% <ø> (ø)
ibis/backends/clickhouse/tests/test_client.py 100.00% <ø> (ø)
ibis/backends/conftest.py 92.88% <0.00%> (-0.32%) ⬇️
ibis/backends/dask/execution/util.py 88.69% <ø> (ø)
ibis/backends/duckdb/tests/conftest.py 100.00% <ø> (ø)
ibis/backends/impala/metadata.py 82.05% <0.00%> (ø)
ibis/backends/impala/udf.py 82.75% <0.00%> (ø)
... and 99 more

@kszucs
Copy link
Member

kszucs commented Dec 21, 2022

@cpcloud can you add a more descriptive name to the PR? :)

@cpcloud cpcloud changed the title ruff chore(dev): replace current linting tools with ruff Dec 21, 2022
@cpcloud cpcloud changed the title chore(dev): replace current linting tools with ruff chore(dev): replace current flake8-based and other linting tools with ruff Dec 21, 2022
@cpcloud
Copy link
Member Author

cpcloud commented Dec 21, 2022

@cpcloud can you add a more descriptive name to the PR? :)

Done!

Copy link
Member

@kszucs kszucs left a comment

Choose a reason for hiding this comment

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

After including the breaking change note it looks good to me!

@cpcloud
Copy link
Member Author

cpcloud commented Dec 21, 2022

I'll squash into a single commit.

Replace flake8 and friends with `ruff`.

BREAKING CHANGE: Expression types have been removed from `ibis.expr.api`. Use `import ibis.expr.types as ir` to access these types.
@kszucs kszucs merged commit 9c1b282 into ibis-project:master Dec 21, 2022
@cpcloud cpcloud deleted the ruff branch December 21, 2022 15:16
@jcrist
Copy link
Member

jcrist commented Dec 21, 2022

I have flake8 configured with my editor in a way that I don't really want to change right now. I would like to keep using flake8 for editor help, while still using ruff in the precommit. If anyone else is in this situation, you can:

  • readd the deleted setup.cfg to your local dev repo
  • append setup.cfg to .git/info/exclude to avoid ever committing that file to the repo, without having to modify your local or global .gitignore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Issues or PRs related to dependencies developer-tools Tools related to ibis development
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants