From 9d7e61ab2a107b65f8787d9a74c19d20522c080a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tun=C3=A7=20Ba=C5=9Far=20K=C3=B6se?= Date: Thu, 1 Jun 2023 12:04:18 +0300 Subject: [PATCH 1/4] bump pandoc max version --- .github/workflows/tests.yml | 2 +- nbconvert/utils/pandoc.py | 2 +- share/templates/latex/base.tex.j2 | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index dfe812a10..aa20cbc8f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -42,7 +42,7 @@ jobs: sudo apt-get install xvfb x11-utils libxkbcommon-x11-0 libxcb-xinerama0 python3-pyqt5 # pandoc is not up to date in the ubuntu repos, so we install directly - wget https://github.com/jgm/pandoc/releases/download/2.14.2/pandoc-2.14.2-1-amd64.deb && sudo dpkg -i pandoc-2.14.2-1-amd64.deb + wget https://github.com/jgm/pandoc/releases/download/3.1.2/pandoc-3.1.2-1-amd64.deb && sudo dpkg -i pandoc-3.1.2-1-amd64.deb - name: Run tests on Linux if: ${{ startsWith(runner.os, 'linux') }} diff --git a/nbconvert/utils/pandoc.py b/nbconvert/utils/pandoc.py index a59c532d3..7492f9a76 100644 --- a/nbconvert/utils/pandoc.py +++ b/nbconvert/utils/pandoc.py @@ -14,7 +14,7 @@ from .exceptions import ConversionException _minimal_version = "1.12.1" -_maximal_version = "3.0.0" +_maximal_version = "4.0.0" def pandoc(source, fmt, to, extra_args=None, encoding="utf-8"): diff --git a/share/templates/latex/base.tex.j2 b/share/templates/latex/base.tex.j2 index 2225e9d74..d88152d01 100644 --- a/share/templates/latex/base.tex.j2 +++ b/share/templates/latex/base.tex.j2 @@ -89,6 +89,7 @@ override this.-=)) \usepackage[inline]{enumitem} % IRkernel/repr support (it uses the enumerate* environment) \usepackage[normalem]{ulem} % ulem is needed to support strikethroughs (\sout) % normalem makes italics be italics, not underlines + \usepackage{soul} % strikethrough (\st) support for pandoc >= 3.0.0 \usepackage{mathrsfs} ((* endblock packages *)) From 17b4e88b5ec5f9fe81fd65f9e0f007e43adef4e5 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Thu, 8 Jun 2023 10:00:56 -0500 Subject: [PATCH 2/4] test with older pandoc --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index aa20cbc8f..4352220fe 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -42,7 +42,7 @@ jobs: sudo apt-get install xvfb x11-utils libxkbcommon-x11-0 libxcb-xinerama0 python3-pyqt5 # pandoc is not up to date in the ubuntu repos, so we install directly - wget https://github.com/jgm/pandoc/releases/download/3.1.2/pandoc-3.1.2-1-amd64.deb && sudo dpkg -i pandoc-3.1.2-1-amd64.deb + wget https://github.com/jgm/pandoc/releases/download/2.14.2/pandoc-2.14.2-1-amd64.deb && sudo dpkg -i pandoc-3.1.2-1-amd64.deb - name: Run tests on Linux if: ${{ startsWith(runner.os, 'linux') }} From 2d86fa5b9f50042b68488fa6c2e13ae31f036983 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Thu, 8 Jun 2023 10:19:04 -0500 Subject: [PATCH 3/4] fix install --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 4352220fe..dfe812a10 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -42,7 +42,7 @@ jobs: sudo apt-get install xvfb x11-utils libxkbcommon-x11-0 libxcb-xinerama0 python3-pyqt5 # pandoc is not up to date in the ubuntu repos, so we install directly - wget https://github.com/jgm/pandoc/releases/download/2.14.2/pandoc-2.14.2-1-amd64.deb && sudo dpkg -i pandoc-3.1.2-1-amd64.deb + wget https://github.com/jgm/pandoc/releases/download/2.14.2/pandoc-2.14.2-1-amd64.deb && sudo dpkg -i pandoc-2.14.2-1-amd64.deb - name: Run tests on Linux if: ${{ startsWith(runner.os, 'linux') }} From 83cc34a039b97c4021a56bc545d12d6e9060a08c Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Thu, 8 Jun 2023 10:41:09 -0500 Subject: [PATCH 4/4] test against min supported pandoc version --- .github/workflows/tests.yml | 16 ++++++++++++---- nbconvert/utils/pandoc.py | 2 +- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index dfe812a10..fe09c6d48 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -42,7 +42,7 @@ jobs: sudo apt-get install xvfb x11-utils libxkbcommon-x11-0 libxcb-xinerama0 python3-pyqt5 # pandoc is not up to date in the ubuntu repos, so we install directly - wget https://github.com/jgm/pandoc/releases/download/2.14.2/pandoc-2.14.2-1-amd64.deb && sudo dpkg -i pandoc-2.14.2-1-amd64.deb + wget https://github.com/jgm/pandoc/releases/download/3.1.2/pandoc-3.1.2-1-amd64.deb && sudo dpkg -i pandoc-3.1.2-1-amd64.deb - name: Run tests on Linux if: ${{ startsWith(runner.os, 'linux') }} @@ -110,10 +110,18 @@ jobs: with: dependency_type: minimum only_create_file: 1 - - name: Run the unit tests + - name: Install dependencies run: | - export NBFORMAT_VALIDATOR=jsonschema - hatch run test:nowarn || hatch run test:nowarn --lf + sudo apt-get update + sudo apt-get install texlive-plain-generic inkscape texlive-xetex latexmk + sudo apt-get install xvfb x11-utils libxkbcommon-x11-0 libxcb-xinerama0 python3-pyqt5 + + # pandoc is not up to date in the ubuntu repos, so we install directly + wget https://github.com/jgm/pandoc/releases/download/2.14.2/pandoc-2.14.2-1-amd64.deb && sudo dpkg -i pandoc-2.14.2-1-amd64.deb + + - name: Run tests + run: | + xvfb-run --auto-servernum hatch run test:nowarn || xvfb-run --auto-servernum hatch run test:nowarn --lf test_prereleases: name: Test Prereleases diff --git a/nbconvert/utils/pandoc.py b/nbconvert/utils/pandoc.py index 7492f9a76..8430b7450 100644 --- a/nbconvert/utils/pandoc.py +++ b/nbconvert/utils/pandoc.py @@ -13,7 +13,7 @@ from .exceptions import ConversionException -_minimal_version = "1.12.1" +_minimal_version = "2.14.2" _maximal_version = "4.0.0"