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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MAINT: Remove cell_metadata_filter: -all from template #1910

Merged
merged 1 commit into from
Feb 7, 2023

Conversation

maxbane
Copy link
Contributor

@maxbane maxbane commented Jan 18, 2023

Before this merge, jupyter-book create mynewbook/ generates an example MyST notebook with following preamble:

---
jupytext:
  cell_metadata_filter: -all
  formats: md:myst
  text_representation:
    extension: .md
    format_name: myst
    format_version: 0.13
    jupytext_version: 1.11.5
kernelspec:
  display_name: Python 3
  language: python
  name: python3
---

This PR removes the line cell_metadata_filter: -all.

It seems extraneous, and causes unexpected behavior, especially for new users of jupyter-book, who are likely to use this file as the copy-and-paste basis for all of their MyST markdown notebooks. If they do so, they will find that when they use jupytext to sync between MyST and other representations of the notebook (e.g. ipynb for WYSIWYG editing), all cell metadata, including tags, are dropped when syncing. See for example the confusion here: mwouts/jupytext#1024

@welcome
Copy link

welcome bot commented Jan 18, 2023

Thanks for submitting your first pull request! You are awesome! 🤗

If you haven't done so already, check out EBP's Code of Conduct and our Contributing Guide, as this will greatly help the review process.

Welcome to the EBP community! 🎉

@davidvandebunte
Copy link

It looks like @choldgraf added the file, so perhaps he recalls the motivation for the line?

According to Metadata filtering — Jupytext documentation even without cell_metadata_filter we get some sane filtering now. Perhaps that wasn't the case in the past.

Copy link
Collaborator

@choldgraf choldgraf left a comment

Choose a reason for hiding this comment

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

This makes sense to me - not sure why it was there in the first place, I bet it was boilerplate of some kind. Thanks for the fix!

@choldgraf choldgraf changed the title Remove cell_metadata_filter: -all from MyST notebook template MAINT: Remove cell_metadata_filter: -all from template Feb 7, 2023
@choldgraf choldgraf merged commit dc8a813 into jupyter-book:master Feb 7, 2023
@welcome
Copy link

welcome bot commented Feb 7, 2023

Congrats on your first merged pull request in this project! 🎉
congrats

Thank you for contributing, we are very proud of you! ❤️

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.

3 participants