From f2486fa49498d44ccfa768ddf6510bffd5e05a49 Mon Sep 17 00:00:00 2001 From: MARCHAND MANON Date: Tue, 28 Jan 2025 10:38:29 +0100 Subject: [PATCH] ci: add strip metadata pre-commit phase --- .pre-commit-config.yaml | 10 ++++- ...liar_galaxies__first_steps_with_MOCs.ipynb | 45 +++---------------- 2 files changed, 16 insertions(+), 39 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1d6889f..603e078 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -28,4 +28,12 @@ repos: rev: v0.1.6 hooks: - id: ruff - fail_fast: true \ No newline at end of file + fail_fast: true +- repo: local + hooks: + - id: nbconvert + name: nbconvert + entry: python3 -m jupyter nbconvert --ClearMetadataPreprocessor.enabled=True --inplace + language: system + files: \.ipynb$ + require_serial: true \ No newline at end of file diff --git a/Notebooks/2_Peculiar_galaxies__first_steps_with_MOCs.ipynb b/Notebooks/2_Peculiar_galaxies__first_steps_with_MOCs.ipynb index 7ec88bb..b37cbf1 100644 --- a/Notebooks/2_Peculiar_galaxies__first_steps_with_MOCs.ipynb +++ b/Notebooks/2_Peculiar_galaxies__first_steps_with_MOCs.ipynb @@ -60,10 +60,7 @@ { "cell_type": "code", "execution_count": 2, - "metadata": { - "scrolled": true, - "tags": [] - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -216,12 +213,7 @@ { "cell_type": "code", "execution_count": 5, - "metadata": { - "scrolled": true, - "tags": [ - "output_scroll" - ] - }, + "metadata": {}, "outputs": [ { "data": { @@ -303,13 +295,8 @@ }, { "cell_type": "code", - "execution_count": 6, - "metadata": { - "scrolled": true, - "tags": [ - "output_scroll" - ] - }, + "execution_count": null, + "metadata": {}, "outputs": [ { "data": { @@ -451,9 +438,7 @@ { "cell_type": "code", "execution_count": 9, - "metadata": { - "scrolled": true - }, + "metadata": {}, "outputs": [ { "data": { @@ -585,9 +570,7 @@ { "cell_type": "code", "execution_count": 12, - "metadata": { - "scrolled": true - }, + "metadata": {}, "outputs": [ { "name": "stdout", @@ -690,22 +673,8 @@ } ], "metadata": { - "kernelspec": { - "display_name": "cds-tutos-dev", - "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" + "name": "python" } }, "nbformat": 4,