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

Replace black and flake8 by ruff #95

Merged
merged 11 commits into from
Apr 26, 2024
Merged

Conversation

mscheltienne
Copy link
Collaborator

@mscheltienne mscheltienne commented Apr 25, 2024

ruff is amazing 😉 + edit codecov configuration to reflect package coverage.

Change Type

  • bugfix (+0.0.1)
  • minor (+0.1.0)
  • major (+1.0.0)
  • refactoring (no version update)
  • test (no version update)
  • infrastructure (no version update)
  • documentation (no version update)
  • other

@github-actions github-actions bot added Testing This is for testing features, writing tests or producing testing code Internal Changes affect the internal API. It doesn't increase the version, but produces a changelog labels Apr 25, 2024
Copy link

codecov bot commented Apr 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.50%. Comparing base (3a8bd18) to head (9c924fd).
Report is 1 commits behind head on master.

❗ Current head 9c924fd differs from pull request most recent head 27d86f5. Consider uploading reports for the commit 27d86f5 to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #95      +/-   ##
==========================================
- Coverage   90.83%   90.50%   -0.33%     
==========================================
  Files          15       15              
  Lines        1287     1285       -2     
  Branches        0      310     +310     
==========================================
- Hits         1169     1163       -6     
- Misses        118      122       +4     
Flag Coverage Δ
unittests 82.97% <92.30%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
nigsp/blocks.py 85.18% <100.00%> (-9.37%) ⬇️
nigsp/cli/run.py 96.96% <ø> (-0.09%) ⬇️
nigsp/conftest.py 91.30% <100.00%> (ø)
nigsp/objects.py 100.00% <100.00%> (ø)
nigsp/operations/laplacian.py 95.78% <ø> (ø)
nigsp/operations/metrics.py 100.00% <100.00%> (ø)
nigsp/operations/nifti.py 96.55% <100.00%> (ø)
nigsp/operations/timeseries.py 95.53% <100.00%> (+0.89%) ⬆️
nigsp/utils.py 95.12% <100.00%> (ø)
nigsp/workflow.py 74.55% <100.00%> (ø)

@smoia
Copy link
Collaborator

smoia commented Apr 25, 2024

If the end-goal is the same, then why not!

@mscheltienne
Copy link
Collaborator Author

The end-goal is the same, but ruff is incorporating more and more rule sets. Here I configured it for flake8,black and pyupgrade, but it can already replace pydocstyle, isort, and others.. It has been fast growing (I think it's 2 years old?) and is designed for performance. At the beginning, it was designed as a fast replacement for black (or blue, it actually supports both) and was adopted by major project because it was cutting the formatter execution time from several seconds to milliseconds.

@mscheltienne mscheltienne merged commit 689f2e6 into MIPLabCH:master Apr 26, 2024
11 checks passed
@mscheltienne mscheltienne deleted the ruff branch April 26, 2024 06:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Internal Changes affect the internal API. It doesn't increase the version, but produces a changelog Testing This is for testing features, writing tests or producing testing code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants