-
-
Notifications
You must be signed in to change notification settings - Fork 563
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
Add nbqa
support support for example notebooks
#3110
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
Codecov ReportPatch and project coverage have no change.
Additional details and impacted files@@ Coverage Diff @@
## develop #3110 +/- ##
========================================
Coverage 99.71% 99.71%
========================================
Files 248 248
Lines 18761 18761
========================================
Hits 18707 18707
Misses 54 54
☔ View full report in Codecov by Sentry. |
8ff3fed
to
2431bfb
Compare
@brosaplanella in 6-a-simple-SEI-model.ipynb is giving |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes should be structured like this -
- first commit - adding the new pre-commit, ignoring lines, fixing
x_in_metres
error - second commit - the changes introduced by the new pre-commit
- third commit - update the .git-blame-ignore-revs with the commit hash of the second commit (and a comment explaining why we are ignoring the commit)
41af60a
to
78f1896
Compare
6ea35ef
to
65d3944
Compare
c5eb8db
to
61bf61d
Compare
0805562
to
a63e49e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @arjxn-py! Looks great! Feel free to add more commits to this PR, won't mess with git blame!
@@ -576,7 +580,7 @@ | |||
" ax1.set_ylabel(r'SEI thickness [$\\mu$m]')\n", | |||
" ax1.set_xlabel(r't [$\\mu$s]') \n", | |||
" \n", | |||
" plot_c, = ax2.plot(x * 1e6 * L_out(t_in_seconds), c_out(t_in_seconds, x_in_metres))\n", | |||
" plot_c, = ax2.plot(x * 1e6 * L_out(t_in_seconds), c_out(t_in_seconds, x_in_metres)) # noqa: F821\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an actual error and should not be ignored. It looks like x_in_metres
is not defined in the notebook anywhere and ruff
caught that. @brosaplanella might be able to help with this better 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Co-authored-by: Saransh Chopra <[email protected]>
The failing notebook should now be fixed, so if you merge develop it should work now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, thanks @arjxn-py!
Description
Adding nbqa as pre-commit hook for jupyter notebooks.
Fixes #2813
Type of change
Please add a line in the relevant section of CHANGELOG.md to document the change (include PR #) - note reverse order of PR #s. If necessary, also add to the list of breaking changes.
Key checklist:
$ pre-commit run
(see CONTRIBUTING.md for how to set this up to run automatically when committing locally, in just two lines of code)$ python run-tests.py --all
$ python run-tests.py --doctest
You can run unit and doctests together at once, using
$ python run-tests.py --quick
.Further checks: