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

Allow per-format options #144

Closed
mwouts opened this issue Dec 21, 2018 · 2 comments
Closed

Allow per-format options #144

mwouts opened this issue Dec 21, 2018 · 2 comments

Comments

@mwouts
Copy link
Owner

mwouts commented Dec 21, 2018

Jupytext allows multiple text representations for a single file, but the options are global on the notebook, while ideally they would apply to a given representation.

The purpose of this issue is to

@mwouts
Copy link
Owner Author

mwouts commented Dec 21, 2018

I am considering adding a new entry in the metadata, formats_options. A sample metadata may look like this:

jupytext:
  formats: ipynb,py:percent,md1,md2
  formats_options:
    md1:
      extension: .md
      format_name: markdown
      metadata_filter_cells: -all
      prefix: ../markdown/
    md2:
      extension: .md
      format_name: markdown
      metadata_filter_notebook: -all
      prefix: ../markdown_split_at_heading/
      split_at_heading: true
    py:percent:
      comment_magics: false
      extension: .pct.py
      prefix: ../python/
  text_representation:
    format: md2
    format_name: markdown
    format_version: '1.0'
    jupytext_version: 0.9.0

@mwouts
Copy link
Owner Author

mwouts commented Jan 15, 2019

In version 1.0, the main jupytext functions (read, write...) use a fmt argument that is either the usual format string (e.g. py:percent), or a dictionnary that can receive format options. However, options in jupytext metadata remain global and shared among all text representations.

@mwouts mwouts closed this as completed Jan 15, 2019
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

No branches or pull requests

1 participant