kynan / nbstripout

strip output from Jupyter and IPython notebooks
Other
1.19k stars 95 forks source link

Version 0.3.4 no longer executable as a module #94

Closed SimonBiggs closed 5 years ago

SimonBiggs commented 5 years ago

Hi @kynan,

Thank you so much for your great tool :).

I wanted to bring something to your attention with version 0.3.4. In my CI I have a task that checks to see if any notebooks have been committed with output. After the 0.3.4 release I noted that the following error is now risen by the following command:

find . -iname \*.ipynb | xargs -d "\n" python -m nbstripout && git add -A && git diff HEAD --name-only --exit-code -- "*ipynb"
========================== Starting Command Output ===========================
[command]/bin/bash --noprofile --norc /home/vsts/work/_temp/fdd732e9-0a6c-4132-8741-65ba6510303f.sh
/usr/bin/python: No module named nbstripout.__main__; 'nbstripout' is a package and cannot be directly executed
##[error]Bash exited with code '123'.
##[section]Finishing: Check that notebooks have no included output

Whereas previously this command did the following:

Script contents:
find . -iname \*.ipynb | xargs -d "\n" python -m nbstripout && git add -A && git diff HEAD --name-only --exit-code -- "*ipynb"
========================== Starting Command Output ===========================
[command]/bin/bash --noprofile --norc /home/vsts/work/_temp/18a83b26-ff5e-4daf-8560-26a800c7f026.sh
##[section]Finishing: Check that notebooks have no included output

See version 0.3.3, compared to 0.3.4 in the following:

Personally I'm just going to currently tell tox to use version <= 0.3.3 so no big issue on my end, but just wanted to let you know.

kynan commented 5 years ago

Thanks for reporting! This is an unintended side effect from #92. I'll push a fix and tag a new release.

SimonBiggs commented 5 years ago

You're welcome :) thanks for the great tool, and thanks for the fix :)

kynan commented 5 years ago

0.3.5 is released!