From 48e8080cf55866e564a5b3fa7437024778b14c36 Mon Sep 17 00:00:00 2001 From: lrlunin Date: Thu, 14 Nov 2024 22:45:35 +0100 Subject: [PATCH] clean kernel related information from the cells --- .pre-commit-config.yaml | 2 ++ examples/direct_reconstruction.ipynb | 5 ----- examples/iterative_sense_reconstruction.ipynb | 5 ----- examples/pulseq_2d_radial_golden_angle.ipynb | 5 ----- examples/qmri_sg_challenge_2024_t1.ipynb | 5 ----- examples/qmri_sg_challenge_2024_t2_star.ipynb | 5 ----- ...gularized_iterative_sense_reconstruction.ipynb | 15 +++++++++++---- examples/t1_mapping_with_grad_acq.ipynb | 5 ----- 8 files changed, 13 insertions(+), 34 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9f3812e1..7470e2e6 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -56,7 +56,9 @@ repos: rev: 0.8.0 hooks: # cleans the .ipynbs (removes outputs, resets all cell-ids to 0..N, cleans steps) + # also clean any kernel information left after execution - id: nbstripout + args: [--extra-keys, metadata.kernelspec] files: examples\/.*\.ipynb - repo: https://github.com/mwouts/jupytext diff --git a/examples/direct_reconstruction.ipynb b/examples/direct_reconstruction.ipynb index beb54824..629370e2 100644 --- a/examples/direct_reconstruction.ipynb +++ b/examples/direct_reconstruction.ipynb @@ -207,11 +207,6 @@ "metadata": { "jupytext": { "cell_metadata_filter": "-all" - }, - "kernelspec": { - "display_name": "Python 3 (ipykernel)", - "language": "python", - "name": "python3" } }, "nbformat": 4, diff --git a/examples/iterative_sense_reconstruction.ipynb b/examples/iterative_sense_reconstruction.ipynb index 2e7ffc11..78fa0de7 100644 --- a/examples/iterative_sense_reconstruction.ipynb +++ b/examples/iterative_sense_reconstruction.ipynb @@ -307,11 +307,6 @@ "metadata": { "jupytext": { "cell_metadata_filter": "-all" - }, - "kernelspec": { - "display_name": "Python 3 (ipykernel)", - "language": "python", - "name": "python3" } }, "nbformat": 4, diff --git a/examples/pulseq_2d_radial_golden_angle.ipynb b/examples/pulseq_2d_radial_golden_angle.ipynb index b1069fff..b19b6fd1 100644 --- a/examples/pulseq_2d_radial_golden_angle.ipynb +++ b/examples/pulseq_2d_radial_golden_angle.ipynb @@ -181,11 +181,6 @@ "metadata": { "jupytext": { "cell_metadata_filter": "-all" - }, - "kernelspec": { - "display_name": "Python 3 (ipykernel)", - "language": "python", - "name": "python3" } }, "nbformat": 4, diff --git a/examples/qmri_sg_challenge_2024_t1.ipynb b/examples/qmri_sg_challenge_2024_t1.ipynb index 63271951..3a2c6f08 100644 --- a/examples/qmri_sg_challenge_2024_t1.ipynb +++ b/examples/qmri_sg_challenge_2024_t1.ipynb @@ -329,11 +329,6 @@ "metadata": { "jupytext": { "cell_metadata_filter": "-all" - }, - "kernelspec": { - "display_name": "Python 3 (ipykernel)", - "language": "python", - "name": "python3" } }, "nbformat": 4, diff --git a/examples/qmri_sg_challenge_2024_t2_star.ipynb b/examples/qmri_sg_challenge_2024_t2_star.ipynb index 95bf3971..699632b9 100644 --- a/examples/qmri_sg_challenge_2024_t2_star.ipynb +++ b/examples/qmri_sg_challenge_2024_t2_star.ipynb @@ -286,11 +286,6 @@ "metadata": { "jupytext": { "cell_metadata_filter": "-all" - }, - "kernelspec": { - "display_name": "Python 3 (ipykernel)", - "language": "python", - "name": "python3" } }, "nbformat": 4, diff --git a/examples/regularized_iterative_sense_reconstruction.ipynb b/examples/regularized_iterative_sense_reconstruction.ipynb index 3599b8a5..d0e2edd4 100644 --- a/examples/regularized_iterative_sense_reconstruction.ipynb +++ b/examples/regularized_iterative_sense_reconstruction.ipynb @@ -378,10 +378,17 @@ "jupytext": { "cell_metadata_filter": "-all" }, - "kernelspec": { - "display_name": "Python 3 (ipykernel)", - "language": "python", - "name": "python3" + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.12.7" } }, "nbformat": 4, diff --git a/examples/t1_mapping_with_grad_acq.ipynb b/examples/t1_mapping_with_grad_acq.ipynb index 6b5603d5..9b8e07b5 100644 --- a/examples/t1_mapping_with_grad_acq.ipynb +++ b/examples/t1_mapping_with_grad_acq.ipynb @@ -501,11 +501,6 @@ "metadata": { "jupytext": { "cell_metadata_filter": "-all" - }, - "kernelspec": { - "display_name": "Python 3 (ipykernel)", - "language": "python", - "name": "python3" } }, "nbformat": 4,