Skip to content

Conversation

@MarcoGorelli
Copy link
Contributor

@MarcoGorelli MarcoGorelli commented Sep 3, 2020

Same story as #4073

To get these changes I did the following:

setup.cfg:

[isort] lines_between_types=1 no_sections=1 

.nbqa.ini

[isort] config = setup.cfg mutate = 1 

and then ran nbqa isort docs/source/notebooks/ --treat-comment-as-code '# %%'


EDIT for docs/source/notebooks/GP-MeansAndCovs.ipynb I manually put the magic line at the bottom of the cell and then ran nbqa isort again


UPDATE

Current configs:

setup.cfg:

[isort] lines_between_types=1

.nbqa.ini

[isort] config = setup.cfg mutate = 1 addopts = --treat-comment-as-code '# %%%%'

command to run:

nbqa isort docs/source/notebooks/
@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

Review Jupyter notebook visual diffs & provide feedback on notebooks.


Powered by ReviewNB

@MarcoGorelli MarcoGorelli changed the title another 10 notebooks Sort imports in another 10 notebooks Sep 3, 2020
@codecov
Copy link

codecov bot commented Sep 3, 2020

Codecov Report

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

Impacted file tree graph

@@ Coverage Diff @@ ## master #4074 +/- ## ======================================= Coverage 88.47% 88.47% ======================================= Files 88 88 Lines 13860 13860 ======================================= Hits 12263 12263 Misses 1597 1597 
@MarcoGorelli MarcoGorelli changed the title Sort imports in another 10 notebooks Sort imports in another 9 notebooks Sep 4, 2020
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, and well done on nbqa @MarcoGorelli ! Will be super useful in CI 😉

@AlexAndorra AlexAndorra merged commit 875efa0 into pymc-devs:master Sep 4, 2020
@MarcoGorelli MarcoGorelli deleted the sort-another-10-notebooks branch September 4, 2020 12:38
@MarcoGorelli
Copy link
Contributor Author

MarcoGorelli commented Sep 5, 2020

All good, and well done on nbqa @MarcoGorelli ! Will be super useful in CI wink

Thanks! I'm very glad you're open to trying it out, I was looking for a good use-case for it and this has already helped me iron-out some bugs.

Of course, if you change your mind or decide you no longer want to support this, please do let me know - after ~1 year of closely following the pandas issues/PRs trackers, I'm fully aware of how draining it can be to have to review simple PRs 🤣

@AlexAndorra
Copy link
Contributor

Definitely, super use-case! And if this helps you improve nbqa at the same time, that's a win-win 😉

@MarcoGorelli
Copy link
Contributor Author

All good, and well done on nbqa @MarcoGorelli ! Will be super useful in CI wink

Hey @AlexAndorra - is it OK if I include this quote of yours in my README, along with a link to your podcast?

@AlexAndorra
Copy link
Contributor

Sure @MarcoGorelli, go ahead!

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

Labels

None yet

2 participants