Skip to content

Copy parameter cell metadata to injected parameters cell#892

Open
paranoa233 wants to merge 1 commit into
nteract:mainfrom
paranoa233:fix-copy-parameter-cell-metadata
Open

Copy parameter cell metadata to injected parameters cell#892
paranoa233 wants to merge 1 commit into
nteract:mainfrom
paranoa233:fix-copy-parameter-cell-metadata

Conversation

@paranoa233

Copy link
Copy Markdown

Summary

  • copy metadata from the original parameters cell to the injected parameters cell
  • filter the original parameters tag while preserving other metadata/tags
  • keep report mode source hiding compatible with copied jupyter metadata

Fixes #731.

Tests

  • python -m pytest papermill/tests/test_parameterize.py -q
  • python -m pytest papermill/tests/test_parameterize.py papermill/tests/test_inspect.py papermill/tests/test_utils.py -q

Note: python -m pytest papermill/tests/test_execute.py -q passes 25/26 locally; the remaining failure is TestBrokenNotebook2.test, where this minimal environment produces an error output instead of the expected display_data output for the fixture notebook. The failure is unrelated to parameter metadata handling.

@ayushnandi718-dev ayushnandi718-dev left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good change. Preserving cell metadata (like slideshow type) from the original parameters cell is important for presentations. Verified the logic handles the edge case where no parameters cell exists. LGTM!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

2 participants