Skip to content

Conversation

@MarcoGorelli
Copy link
Contributor

@MarcoGorelli MarcoGorelli commented Oct 13, 2020

closes #4095

~ 5 notebooks per commit

it's somewhat a matter of choice when/where to turn fmt: off and fmt: on, but I've tried to make sensible choices


a note on the fixup in docs/source/notebooks/SMC2_gaussians.ipynb: that notebook originally had

az.plot_ess(az_trace, coords={"X_dim_0": slice(0, 5)}); # only the first 6 dimensions

Because there's a comment after the trailing semi-colon, both nbqa black and black_nbconvert would transform it to

az.plot_ess(az_trace, coords={"X_dim_0": slice(0, 5)})
# only the first 6 dimensions

Normally, nbqa is able to preserve these trailing semicolons, but here the extra comment gets in our way. We'd like to address this eventually (nbQA-dev/nbQA#282) but it's not-so-straightfoward to do correctly, so for now we're treating it as a known limitation which can be avoided by putting the comment on a separate line.

Apart from this and the occasional fmt: off and fmt: on I've added, the rest is just the output from having applied nbqa black

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@codecov
Copy link

codecov bot commented Oct 13, 2020

Codecov Report

Merging #4168 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #4168   +/-   ##
=======================================
  Coverage   88.76%   88.76%           
=======================================
  Files          89       89           
  Lines       14083    14083           
=======================================
  Hits        12501    12501           
  Misses       1582     1582           

Copy link
Contributor

@AlexAndorra AlexAndorra left a comment

Choose a reason for hiding this comment

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

All good, thanks @MarcoGorelli ! And all done in one PR 🎉

@AlexAndorra AlexAndorra merged commit 1d89609 into pymc-devs:master Oct 14, 2020
@MarcoGorelli MarcoGorelli deleted the nbqa-black branch October 14, 2020 13:37
@MarcoGorelli
Copy link
Contributor Author

Thank you, sorry for the tediousness of reviewing this kind of change! On the plus side, it's done now 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CLN, CI: check notebooks follow black formatting

2 participants