papermill
papermill copied to clipboard
Render parameter code cells with linting rules
Large parameters print on a single line, which can be nasty to read. We should format the outputs so they're presented as someone would write the code in reality. Let's figure out how to pretty print the language contents, at least for python if not for all languages.
papermill Untitled.ipynb Untitled-out.ipynb -y '{"nested": [1,2,3,4,5,6,7,8,1.2,4,1,5,6,1,2,3,5,6,12,[6,5,5,2,232,121,4,5,6,1,1,1,5,5],16,231,32,5,6,1,1]}'
One solution for python might be to use autopep8 as a module. https://github.com/hhatto/autopep8/blob/master/README.rst#use-as-a-module
Now this is very specific to python. Idk how it work for other kernels, subprocess call maybe? Assuming the programs even allow string input from stdin
For python3 we're now using black to format for python dependencies via #455 in the next release. For other languages we don't have a standard solution as of yet. A kernel protocol addition could solve it but that might be hard to make standard.