Papermill: Using papermill to test notebooks

Created on 26 Jul 2019  路  3Comments  路  Source: nteract/papermill

Hi,

I am using papermill to check that some notebooks run without problems. I don't need to output any notebook. Is there a way to run a notebook without output?

question

Most helpful comment

On unix systems papermill papermill/tests/notebooks/simple_execute.ipynb /dev/null works.

All 3 comments

On unix systems papermill papermill/tests/notebooks/simple_execute.ipynb /dev/null works.

@MSeal thanks, I get that this would work, I'm curious as to whether this is still the suggested approach though? I'm just writing something along these lines at the moment (want to run some notebooks - don't care about the output notebook).

From a CLI perspective tossing the output to null or tmp is still the recommendation if you don't want it. You can also point the output to the input path to overwrite the original file, though that's not a highly recommended approach.

Papermill has the opinion as a tool to always capture what you execute so it can be referenced and reviewed if you need to. The underlying nbclient library can be used to execute the notebook cells without exporting but it's lower level and doesn't contain a CLI.

Was this page helpful?
0 / 5 - 0 ratings