Skip to content

Add option to Ignore certain cells metadata #106

Closed
@erdnaavlis

Description

I like to use NBExtensions Execute Time extension.

When using jupytext, a cell will be converted to .py as:

# + {"ExecuteTime": {"start_time": "2018-10-17T10:31:56.157308Z", "end_time": "2018-10-17T10:31:56.160823Z"}}
print("I'm a cell!")

It can be seen that it has a ExecuteTime metadata.

Would it be possible for the jupytext user to specify which metadata to keep track of and which to ignore?
In my case I don't need this info in the .py and, in fact, I don't want it because it adds noise to git diff...
But maybe other users would like to keep it in the scripts.

Please let me know your thoughts.

@mwouts comment from the discussion started on #101 :

As for your comment on metadata, I like very much the idea of filtering cell metadata. As a start we could skip the 'ExecuteTime' cell metadata for everyone (there are already a few cell metadata that jupytext does not include, cf. https://github.com/mwouts/jupytext/blob/master/jupytext/cell_metadata.py#L32). Unless you think it is important that for every notebook, one can tell which cell metadata to include/exclude? Please let me know your preference.

Regarding your comment @mwouts , I don't see a need to specify which metadata to ignore on a per notebook basis.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions