From ba757f880b8613c6f046c16be0c878c4a0c28392 Mon Sep 17 00:00:00 2001 From: Marc Wouts Date: Fri, 19 Oct 2018 00:00:44 +0200 Subject: [PATCH] Filter ExecuteTime metadata #106 --- jupytext/cell_metadata.py | 2 +- tests/notebooks/mirror/ipynb_to_Rmd/frozen_cell.Rmd | 2 +- tests/notebooks/mirror/ipynb_to_percent/frozen_cell.py | 2 +- tests/notebooks/mirror/ipynb_to_script/frozen_cell.py | 1 - 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/jupytext/cell_metadata.py b/jupytext/cell_metadata.py index 77381a0f1..ce19d4dac 100644 --- a/jupytext/cell_metadata.py +++ b/jupytext/cell_metadata.py @@ -29,7 +29,7 @@ _IGNORE_METADATA = [ # Frequent cell metadata that should not enter the text representation # (these metadata are preserved in the paired Jupyter notebook). - 'autoscroll', 'collapsed', 'scrolled', 'trusted', + 'autoscroll', 'collapsed', 'scrolled', 'trusted', 'ExecuteTime', # Pre-jupytext metadata 'skipline', 'noskipline', # Jupytext metadata diff --git a/tests/notebooks/mirror/ipynb_to_Rmd/frozen_cell.Rmd b/tests/notebooks/mirror/ipynb_to_Rmd/frozen_cell.Rmd index aa4360b74..a36ce65ab 100644 --- a/tests/notebooks/mirror/ipynb_to_Rmd/frozen_cell.Rmd +++ b/tests/notebooks/mirror/ipynb_to_Rmd/frozen_cell.Rmd @@ -16,7 +16,7 @@ jupyter: version: 3.7.0 --- -```{python ExecuteTime={'end_time': '2018-10-17T10:31:56.160823Z', 'start_time': '2018-10-17T10:31:56.157308Z'}} +```{python} # This is an unfrozen cell. Works as usual. print("I'm a regular cell so I run and print!") ``` diff --git a/tests/notebooks/mirror/ipynb_to_percent/frozen_cell.py b/tests/notebooks/mirror/ipynb_to_percent/frozen_cell.py index b5cf0024d..2d4a2786c 100644 --- a/tests/notebooks/mirror/ipynb_to_percent/frozen_cell.py +++ b/tests/notebooks/mirror/ipynb_to_percent/frozen_cell.py @@ -16,7 +16,7 @@ # version: 3.7.0 # --- -# %% {"ExecuteTime": {"end_time": "2018-10-17T10:31:56.160823Z", "start_time": "2018-10-17T10:31:56.157308Z"}} +# %% # This is an unfrozen cell. Works as usual. print("I'm a regular cell so I run and print!") diff --git a/tests/notebooks/mirror/ipynb_to_script/frozen_cell.py b/tests/notebooks/mirror/ipynb_to_script/frozen_cell.py index bb513e57c..4e64efdb3 100644 --- a/tests/notebooks/mirror/ipynb_to_script/frozen_cell.py +++ b/tests/notebooks/mirror/ipynb_to_script/frozen_cell.py @@ -16,7 +16,6 @@ # version: 3.7.0 # --- -# + {"ExecuteTime": {"end_time": "2018-10-17T10:31:56.160823Z", "start_time": "2018-10-17T10:31:56.157308Z"}} # This is an unfrozen cell. Works as usual. print("I'm a regular cell so I run and print!")