Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Metadata of parameters cell not copied ({'slideshow': {'slide_type': 'skip'}) #731

Open
JulianWgs opened this issue Sep 18, 2023 · 0 comments

Comments

@JulianWgs
Copy link

馃悰 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:

newcell = nbformat.v4.new_code_cell(source=param_content)
)

There are two approaches I could think of fixing this:

  1. Copy the metadata and omitting 'tags': ['parameters'] from the parameter cell.
  2. 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant