From 08e187d6f972181f952a33f2831f93c5490e2cac Mon Sep 17 00:00:00 2001 From: Marc Wouts Date: Sun, 4 Jun 2023 16:54:49 +0100 Subject: [PATCH] Skip two more notebooks in quarto tests Quarto moves the first header to a field 'title' in the notebook metadata --- .../ipynb_to_quarto/Notebook_with_R_magic.qmd | 32 ------------------- .../mirror/ipynb_to_quarto/jupyter.qmd | 25 --------------- tests/test_contentsmanager.py | 2 +- tests/test_mirror.py | 2 +- 4 files changed, 2 insertions(+), 59 deletions(-) delete mode 100644 tests/notebooks/mirror/ipynb_to_quarto/Notebook_with_R_magic.qmd delete mode 100644 tests/notebooks/mirror/ipynb_to_quarto/jupyter.qmd diff --git a/tests/notebooks/mirror/ipynb_to_quarto/Notebook_with_R_magic.qmd b/tests/notebooks/mirror/ipynb_to_quarto/Notebook_with_R_magic.qmd deleted file mode 100644 index 38839a6ee..000000000 --- a/tests/notebooks/mirror/ipynb_to_quarto/Notebook_with_R_magic.qmd +++ /dev/null @@ -1,32 +0,0 @@ ---- -jupyter: - kernelspec: - display_name: Python 2 - language: python - name: python2 ---- - -# A notebook with R cells - -This notebook shows the use of R cells to generate plots - -```{python} -%load_ext rpy2.ipython -``` - -```{python} -%%R -suppressMessages(require(tidyverse)) -``` - -```{python} -%%R -ggplot(iris, aes(x = Sepal.Length, y = Petal.Length, color=Species)) + geom_point() -``` - -The default plot dimensions are not good for us, so we use the -w and -h parameters in %%R magic to set the plot size - -```{python} -%%R -w 400 -h 240 -ggplot(iris, aes(x = Sepal.Length, y = Petal.Length, color=Species)) + geom_point() -``` diff --git a/tests/notebooks/mirror/ipynb_to_quarto/jupyter.qmd b/tests/notebooks/mirror/ipynb_to_quarto/jupyter.qmd deleted file mode 100644 index 90568b156..000000000 --- a/tests/notebooks/mirror/ipynb_to_quarto/jupyter.qmd +++ /dev/null @@ -1,25 +0,0 @@ ---- -jupyter: python3 ---- - -# Jupyter notebook - -This notebook is a simple jupyter notebook. It only has markdown and code cells. And it does not contain consecutive markdown cells. We start with an addition: - -```{python} -a = 1 -b = 2 -a + b -``` - -Now we return a few tuples - -```{python} -a, b -``` - -```{python} -a, b, a+b -``` - -And this is already the end of the notebook diff --git a/tests/test_contentsmanager.py b/tests/test_contentsmanager.py index 0a789799c..fb45fbbe4 100644 --- a/tests/test_contentsmanager.py +++ b/tests/test_contentsmanager.py @@ -206,7 +206,7 @@ def test_save_load_paired_md_pandoc_notebook(nb_file, tmpdir): list_notebooks( "ipynb", skip="(World|functional|Notebook with|plotly_graphs|flavors|complex_metadata|" - "update83|raw_cell|_66|nteract|LaTeX|invalid|305|text_outputs|ir_notebook)", + "update83|raw_cell|_66|nteract|LaTeX|invalid|305|text_outputs|ir_notebook|jupyter|with_R_magic)", ), ) def test_save_load_paired_qmd_notebook(nb_file, tmpdir): diff --git a/tests/test_mirror.py b/tests/test_mirror.py index eb7f59f8c..64434be57 100644 --- a/tests/test_mirror.py +++ b/tests/test_mirror.py @@ -144,7 +144,7 @@ def test_ipynb_to_pandoc(nb_file, no_jupytext_version_number): list_notebooks( "ipynb", skip="(World|functional|Notebook with|plotly_graphs|flavors|complex_metadata|" - "update83|raw_cell|_66|nteract|LaTeX|invalid|305|text_outputs|ir_notebook)", + "update83|raw_cell|_66|nteract|LaTeX|invalid|305|text_outputs|ir_notebook|jupyter|with_R_magic)", ), ) def test_ipynb_to_quarto(