Metadata of parameters cell not copied (`{'slideshow': {'slide_type': 'skip'}`)
#731 建立於 2023年9月18日
倉庫指標
- Star
- (5,381 star)
- PR 合併指標
- (30 天內沒有已合併 PR)
描述
🐛 Bug
I want to export a executed notebook to a slideshow via nbconvert. I use the metadata {'slideshow': {'slide_type': 'skip'} on the parameter cell (hide the cell in the slideshow). The inserted cell does not copy this metadata and is visible in the slideshow export. The original parameter cell is hidden.
Looking at the code this is expected, because a fresh cell is inserted: https://github.com/nteract/papermill/blob/3ad2dacbf539967cfed46bfa8516afbb8a120849/papermill/parameterize.py#L95)
There are two approaches I could think of fixing this:
- Copy the metadata and omitting
'tags': ['parameters']from the parameter cell. - Letting the user set the metadata of the inserted parameters cell.
I am in favor of 1. since in my opinion this is the expected behavior and does not need any additional user code.
Workaround
Input the metadata via a post execution script into the correct location
After we decide on an approach I create a PR for this if necessary.
Thanks! Julian