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

Update and pin pre commit and ruff to recent version. #1358

Merged
merged 3 commits into from
Jan 13, 2025
Merged

Conversation

janfb
Copy link
Contributor

@janfb janfb commented Jan 10, 2025

There have been bigger releases in ruff recently and it makes sense to establish them here before the big events this year. Any objections?

Running this revealed that we have lots of issues in the tutorial notebooks: unsorted and unused imports etc. This is fixed now. For long line error E501 I added an exception for notebooks.

Copy link

codecov bot commented Jan 10, 2025

Codecov Report

Attention: Patch coverage is 77.27273% with 15 lines in your changes missing coverage. Please review.

Project coverage is 78.42%. Comparing base (d3f22b5) to head (3480e0b).
Report is 11 commits behind head on main.

Files with missing lines Patch % Lines
sbi/inference/abc/smcabc.py 0.00% 4 Missing ⚠️
sbi/analysis/sensitivity_analysis.py 0.00% 2 Missing ⚠️
sbi/utils/metrics.py 0.00% 2 Missing ⚠️
sbi/inference/abc/mcabc.py 0.00% 1 Missing ⚠️
sbi/inference/posteriors/base_posterior.py 0.00% 1 Missing ⚠️
...inference/potentials/likelihood_based_potential.py 75.00% 1 Missing ⚠️
sbi/inference/trainers/npe/npe_a.py 0.00% 1 Missing ⚠️
sbi/samplers/score/correctors.py 0.00% 1 Missing ⚠️
sbi/utils/restriction_estimator.py 0.00% 1 Missing ⚠️
sbi/utils/user_input_checks.py 75.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #1358       +/-   ##
===========================================
- Coverage   89.40%   78.42%   -10.99%     
===========================================
  Files         118      118               
  Lines        8715     8749       +34     
===========================================
- Hits         7792     6861      -931     
- Misses        923     1888      +965     
Flag Coverage Δ
unittests 78.42% <77.27%> (-10.99%) ⬇️

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

Files with missing lines Coverage Δ
sbi/analysis/plot.py 68.46% <100.00%> (-16.39%) ⬇️
sbi/diagnostics/lc2st.py 95.97% <100.00%> (+0.02%) ⬆️
sbi/diagnostics/sbc.py 95.71% <100.00%> (ø)
sbi/diagnostics/tarp.py 82.92% <100.00%> (-14.64%) ⬇️
sbi/inference/posteriors/ensemble_posterior.py 62.96% <100.00%> (-27.78%) ⬇️
sbi/inference/posteriors/mcmc_posterior.py 86.14% <100.00%> (-0.75%) ⬇️
.../inference/potentials/posterior_based_potential.py 95.34% <100.00%> (ø)
sbi/inference/potentials/ratio_based_potential.py 100.00% <100.00%> (ø)
sbi/inference/potentials/score_based_potential.py 97.01% <100.00%> (ø)
sbi/inference/trainers/nle/nle_base.py 93.93% <100.00%> (-1.02%) ⬇️
... and 20 more

... and 18 files with indirect coverage changes

Copy link
Contributor

@manuelgloeckler manuelgloeckler left a comment

Choose a reason for hiding this comment

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

Besides the tutorial notebook changes, to only difference seems to be how asserts are formated in the new version. Happy to upgrade.

@janfb janfb merged commit e1305b9 into main Jan 13, 2025
6 checks passed
@janfb janfb deleted the update-pre-commit branch January 13, 2025 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants