Cells hidden with Papermill are not hidden
derek-pyne opened this issue · comments
I am using Papermill to render notebooks in which I would like to have the input hidden. Papermill has a report_mode
which I am using to do this.
This seems to add the source_hidden
metadata to each cell as below:
{
"jupyter": {
"source_hidden": true
},
"papermill": {
"duration": 0.014058,
"end_time": "2019-09-18T19:54:49.695565",
"exception": false,
"start_time": "2019-09-18T19:54:49.681507",
"status": "completed"
},
"tags": []
}
When I open these notebooks in JupyterLab the cells are correctly hidden but when I view them in Commuter no cells are hidden. Should this work or is there another supported way to hide input?
commuter is currently using the @nteract/notebook-preview component. Tangent: this component has been deprecated and we need upgrade to use the components out of @nteract/presentational-components.
The component currently only interprets input_hidden
and inputHidden
as metadata for hiding the source. nbformat doesn't have a this as part of the spec yet, AFAIK.
IMO, report_mode should set the inputHidden
property in addition to source_hidden
. Thoughts on this, @MSeal?
@captainsafia Yes we should probably change it. I would prefer we used camel cased fields input_hidden
to match the casing for all the other standard fields, but I think a PR would be a good idea to papermill for that change.