Skip to content

add ruff formatting and pre-commit hooks into CI - #955

Closed
janfb wants to merge 14 commits into
mainfrom
replace-isort-black-with-ruff
Closed

janfb wants to merge 14 commits into
mainfrom
replace-isort-black-with-ruff

Conversation

@janfb

@janfb janfb commented Feb 22, 2024 •

Copy link
Copy Markdown
Contributor
  • ruff replaces black, isort and all kinds of PEP checks that were performed via flake8
  • move pyright options from separate file into pyproject.toml
  • update pre-commit hooks to new version and standard settings
  • include pre-commit hooks including ruff checks into CI GitHub actions

Lots of files changed:

  • create lots of changes in all files because ruff formatting is applied, and ruff lint applied automatic fixes
  • turns off ruff lint for now, because there are too many errors to be fixed, see fix ruff linting errors 🏅  #959

Code coverage: decrease because lots of files changed and then checked by cov.

fixes #934

@janfb janfb added the enhancement Improvement planned or wanted by the maintainers label Feb 22, 2024
@janfb janfb self-assigned this Feb 22, 2024
@janfb
janfb force-pushed the replace-isort-black-with-ruff branch 3 times, most recently from a0fe1de to 7d96f4e Compare February 23, 2024 09:31
@codecov

codecov Bot commented Feb 23, 2024 •

Copy link
Copy Markdown

Codecov Report

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

Project coverage is 76.08%. Comparing base (9d6d13c) to head (03ac867).
Report is 1 commits behind head on main.

Files Patch % Lines
sbi/inference/abc/smcabc.py 0.00% 3 Missing ⚠️
sbi/samplers/vi/vi_utils.py 33.33% 2 Missing ⚠️
sbi/utils/posterior_ensemble.py 0.00% 2 Missing ⚠️
sbi/analysis/plot.py 83.33% 1 Missing ⚠️
sbi/inference/posteriors/base_posterior.py 0.00% 1 Missing ⚠️
sbi/inference/snpe/snpe_base.py 0.00% 1 Missing ⚠️
sbi/utils/sbiutils.py 75.00% 1 Missing ⚠️
sbi/utils/user_input_checks.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #955      +/-   ##
==========================================
- Coverage   76.08%   76.08%   -0.01%     
==========================================
  Files          83       83              
  Lines        6361     6351      -10     
==========================================
- Hits         4840     4832       -8     
+ Misses       1521     1519       -2     
Flag Coverage Δ
unittests 76.08% <70.00%> (-0.01%) ⬇️

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

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

@janfb
janfb force-pushed the replace-isort-black-with-ruff branch from 7d96f4e to 6a6e6ed Compare February 28, 2024 08:55
@janfb
janfb force-pushed the replace-isort-black-with-ruff branch from 6a6e6ed to d72505c Compare February 28, 2024 09:14
@janfb janfb changed the title Replace isort black with ruff Introduce ruff for formatting and linting Feb 28, 2024
@janfb janfb changed the title Introduce ruff for formatting and linting add ruff formatting and pre-commit hooks into CI Feb 28, 2024
@janfb janfb added this to the Pre Hackathon 2024 milestone Feb 28, 2024
Comment thread .github/workflows/tests.yml Resolved
@janfb

janfb commented Mar 6, 2024

Copy link
Copy Markdown
Contributor Author

closed in favor of #978

@janfb janfb closed this Mar 6, 2024
@janfb
janfb deleted the replace-isort-black-with-ruff branch May 7, 2024 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Improvement planned or wanted by the maintainers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Switch to ruff for linting and formatting

2 participants