From 1db28600a19ce2a2dfb5ab8be3dd0164357b2076 Mon Sep 17 00:00:00 2001 From: Lukas Burgholzer Date: Fri, 23 Feb 2024 10:11:38 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=B8=20allow=20using=20raw=20RST=20cell?= =?UTF-8?q?s=20in=20jupyter=20notebooks=20(#558)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Description This PR updates the jupyter notebook cleaning pre-commit check to preserve MIME metadata. This allows to use raw RST cells within jupyter notebooks, which can be very helpful for using Sphinx references as part of the documentation. ## Checklist: - [x] The pull request only contains commits that are related to it. - [x] I have added appropriate tests and documentation. - [x] I have made sure that all CI jobs on GitHub pass. - [x] The pull request introduces no new warnings and follows the project's style guidelines. --------- Signed-off-by: burgholzer Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 5 +++++ docs/quickstart.ipynb | 8 -------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b6be0a135..9c6a63bb0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -35,6 +35,11 @@ repos: rev: 3.2.0 hooks: - id: nb-clean + args: + - --remove-empty-cells + - --preserve-cell-metadata + - raw_mimetype + - -- # Handling unwanted unicode characters - repo: https://github.com/sirosen/texthooks diff --git a/docs/quickstart.ipynb b/docs/quickstart.ipynb index e222c55eb..40234bdf3 100644 --- a/docs/quickstart.ipynb +++ b/docs/quickstart.ipynb @@ -393,14 +393,6 @@ "mqt_qc = qiskit_to_mqt(qiskit_qc)\n", "print(mqt_qc)" ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "d62ae1fde42917", - "metadata": {}, - "outputs": [], - "source": [] } ], "metadata": {