From d4ab9e67a13d2eb914587e3efb7e1df8cf1c1580 Mon Sep 17 00:00:00 2001 From: Jonas Eschle Date: Tue, 10 Dec 2024 19:32:51 -0500 Subject: [PATCH] clean: metadata in notebooks --- .pre-commit-config.yaml | 5 ++++- advanced-python/10Basics.ipynb | 4 +--- advanced-python/11AdvancedPython.ipynb | 4 +--- advanced-python/12AdvancedClasses.ipynb | 4 +--- advanced-python/20DataAndPlotting.ipynb | 4 +--- advanced-python/30Classification.ipynb | 4 +--- advanced-python/31ClassificationExtension.ipynb | 4 +--- advanced-python/32BoostingToUniformity.ipynb | 4 +--- advanced-python/40Histograms.ipynb | 4 +--- advanced-python/45DemoReweighting.ipynb | 4 +--- advanced-python/50LikelihoodInference.ipynb | 4 +--- advanced-python/60sPlot.ipynb | 4 +--- advanced-python/70ScikitHEPUniverse.ipynb | 4 +--- environment.yml | 1 + python/01basics.ipynb | 4 +--- python/classes.ipynb | 4 +--- python/conditions.ipynb | 4 +--- python/dictionaries.ipynb | 4 +--- python/lists.ipynb | 4 +--- python/methods.ipynb | 4 +--- python/modules.ipynb | 4 +--- python/numbers.ipynb | 4 +--- python/strings.ipynb | 4 +--- 23 files changed, 26 insertions(+), 64 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 462941b5..1f8ad679 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,7 +3,7 @@ repos: rev: v5.0.0 hooks: - id: check-added-large-files - args: ['--maxkb=1000'] + args: [ '--maxkb=1000' ] - id: check-merge-conflict - id: check-case-conflict - id: check-symlinks @@ -27,6 +27,8 @@ repos: rev: 0.8.1 hooks: - id: nbstripout + args: [ --extra-keys="metadata.kernelspec metadata.language_info.codemirror_mode.version metadata.language_info.pygments_lexer metadata.language_info.version" ] + # needs rust, only activate if needed @@ -34,4 +36,5 @@ repos: # rev: v9.1.2 # hooks: # - id: oxipng +# args: [ --best --strip all --quiet ] diff --git a/advanced-python/10Basics.ipynb b/advanced-python/10Basics.ipynb index fbf6ed4c..0e31b8af 100644 --- a/advanced-python/10Basics.ipynb +++ b/advanced-python/10Basics.ipynb @@ -513,14 +513,12 @@ }, "language_info": { "codemirror_mode": { - "name": "ipython", - "version": 3 + "name": "ipython" }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", "version": "3.9.7" }, "nbsphinx": { diff --git a/advanced-python/11AdvancedPython.ipynb b/advanced-python/11AdvancedPython.ipynb index f6c90890..ccb99490 100644 --- a/advanced-python/11AdvancedPython.ipynb +++ b/advanced-python/11AdvancedPython.ipynb @@ -972,14 +972,12 @@ }, "language_info": { "codemirror_mode": { - "name": "ipython", - "version": 3 + "name": "ipython" }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", "version": "3.12.4" } }, diff --git a/advanced-python/12AdvancedClasses.ipynb b/advanced-python/12AdvancedClasses.ipynb index 6d7e2167..f319481c 100644 --- a/advanced-python/12AdvancedClasses.ipynb +++ b/advanced-python/12AdvancedClasses.ipynb @@ -510,14 +510,12 @@ }, "language_info": { "codemirror_mode": { - "name": "ipython", - "version": 3 + "name": "ipython" }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", "version": "3.12.4" } }, diff --git a/advanced-python/20DataAndPlotting.ipynb b/advanced-python/20DataAndPlotting.ipynb index adbff74e..d0be9aea 100644 --- a/advanced-python/20DataAndPlotting.ipynb +++ b/advanced-python/20DataAndPlotting.ipynb @@ -665,14 +665,12 @@ }, "language_info": { "codemirror_mode": { - "name": "ipython", - "version": 3 + "name": "ipython" }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", "version": "3.12.7" } }, diff --git a/advanced-python/30Classification.ipynb b/advanced-python/30Classification.ipynb index a1db7a72..debadc10 100644 --- a/advanced-python/30Classification.ipynb +++ b/advanced-python/30Classification.ipynb @@ -665,14 +665,12 @@ }, "language_info": { "codemirror_mode": { - "name": "ipython", - "version": 3 + "name": "ipython" }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", "version": "3.12.7" } }, diff --git a/advanced-python/31ClassificationExtension.ipynb b/advanced-python/31ClassificationExtension.ipynb index 3213818e..137d387c 100644 --- a/advanced-python/31ClassificationExtension.ipynb +++ b/advanced-python/31ClassificationExtension.ipynb @@ -343,14 +343,12 @@ }, "language_info": { "codemirror_mode": { - "name": "ipython", - "version": 3 + "name": "ipython" }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", "version": "3.9.7" } }, diff --git a/advanced-python/32BoostingToUniformity.ipynb b/advanced-python/32BoostingToUniformity.ipynb index ae62b845..8ff77619 100644 --- a/advanced-python/32BoostingToUniformity.ipynb +++ b/advanced-python/32BoostingToUniformity.ipynb @@ -244,14 +244,12 @@ }, "language_info": { "codemirror_mode": { - "name": "ipython", - "version": 3 + "name": "ipython" }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", "version": "3.9.7" }, "nbsphinx": { diff --git a/advanced-python/40Histograms.ipynb b/advanced-python/40Histograms.ipynb index 2827a6a9..980deacd 100644 --- a/advanced-python/40Histograms.ipynb +++ b/advanced-python/40Histograms.ipynb @@ -554,14 +554,12 @@ }, "language_info": { "codemirror_mode": { - "name": "ipython", - "version": 3 + "name": "ipython" }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", "version": "3.9.7" } }, diff --git a/advanced-python/45DemoReweighting.ipynb b/advanced-python/45DemoReweighting.ipynb index 03afd6e3..e919fcfa 100644 --- a/advanced-python/45DemoReweighting.ipynb +++ b/advanced-python/45DemoReweighting.ipynb @@ -492,14 +492,12 @@ }, "language_info": { "codemirror_mode": { - "name": "ipython", - "version": 3 + "name": "ipython" }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", "version": "3.9.7" } }, diff --git a/advanced-python/50LikelihoodInference.ipynb b/advanced-python/50LikelihoodInference.ipynb index 8114c4b4..6ba11fa6 100644 --- a/advanced-python/50LikelihoodInference.ipynb +++ b/advanced-python/50LikelihoodInference.ipynb @@ -389,14 +389,12 @@ }, "language_info": { "codemirror_mode": { - "name": "ipython", - "version": 3 + "name": "ipython" }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", "version": "3.12.7" } }, diff --git a/advanced-python/60sPlot.ipynb b/advanced-python/60sPlot.ipynb index cfac4125..22a3de93 100644 --- a/advanced-python/60sPlot.ipynb +++ b/advanced-python/60sPlot.ipynb @@ -887,14 +887,12 @@ }, "language_info": { "codemirror_mode": { - "name": "ipython", - "version": 3 + "name": "ipython" }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", "version": "3.9.7" } }, diff --git a/advanced-python/70ScikitHEPUniverse.ipynb b/advanced-python/70ScikitHEPUniverse.ipynb index 98710b73..28475374 100644 --- a/advanced-python/70ScikitHEPUniverse.ipynb +++ b/advanced-python/70ScikitHEPUniverse.ipynb @@ -279,14 +279,12 @@ }, "language_info": { "codemirror_mode": { - "name": "ipython", - "version": 3 + "name": "ipython" }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", "version": "3.9.7" } }, diff --git a/environment.yml b/environment.yml index 263b3595..3ed6c4f8 100644 --- a/environment.yml +++ b/environment.yml @@ -1,6 +1,7 @@ name: analysis-essentials channels: - conda-forge + - nodefaults dependencies: - python ~=3.11.0 - boost-histogram diff --git a/python/01basics.ipynb b/python/01basics.ipynb index 0db58235..a4739493 100644 --- a/python/01basics.ipynb +++ b/python/01basics.ipynb @@ -1401,14 +1401,12 @@ }, "language_info": { "codemirror_mode": { - "name": "ipython", - "version": 3 + "name": "ipython" }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", "version": "3.11.9" }, "nbsphinx": { diff --git a/python/classes.ipynb b/python/classes.ipynb index 4fe59ea0..58b4e1fd 100644 --- a/python/classes.ipynb +++ b/python/classes.ipynb @@ -491,14 +491,12 @@ }, "language_info": { "codemirror_mode": { - "name": "ipython", - "version": 3 + "name": "ipython" }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", "version": "3.8.10" } }, diff --git a/python/conditions.ipynb b/python/conditions.ipynb index e4c4854e..15ea82e3 100644 --- a/python/conditions.ipynb +++ b/python/conditions.ipynb @@ -958,14 +958,12 @@ }, "language_info": { "codemirror_mode": { - "name": "ipython", - "version": 3 + "name": "ipython" }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", "version": "3.11.9" } }, diff --git a/python/dictionaries.ipynb b/python/dictionaries.ipynb index 1fd748c7..920d92f6 100644 --- a/python/dictionaries.ipynb +++ b/python/dictionaries.ipynb @@ -598,14 +598,12 @@ }, "language_info": { "codemirror_mode": { - "name": "ipython", - "version": 3 + "name": "ipython" }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", "version": "3.11.9" } }, diff --git a/python/lists.ipynb b/python/lists.ipynb index 7c5545fb..2321e1ec 100644 --- a/python/lists.ipynb +++ b/python/lists.ipynb @@ -1765,14 +1765,12 @@ }, "language_info": { "codemirror_mode": { - "name": "ipython", - "version": 3 + "name": "ipython" }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", "version": "3.11.9" } }, diff --git a/python/methods.ipynb b/python/methods.ipynb index bc32d594..2a29e65b 100644 --- a/python/methods.ipynb +++ b/python/methods.ipynb @@ -1667,14 +1667,12 @@ }, "language_info": { "codemirror_mode": { - "name": "ipython", - "version": 3 + "name": "ipython" }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", "version": "3.11.9" } }, diff --git a/python/modules.ipynb b/python/modules.ipynb index 1dbe25a8..9112d721 100644 --- a/python/modules.ipynb +++ b/python/modules.ipynb @@ -886,14 +886,12 @@ }, "language_info": { "codemirror_mode": { - "name": "ipython", - "version": 3 + "name": "ipython" }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", "version": "3.11.9" } }, diff --git a/python/numbers.ipynb b/python/numbers.ipynb index 153dba53..3e3cb202 100644 --- a/python/numbers.ipynb +++ b/python/numbers.ipynb @@ -285,14 +285,12 @@ }, "language_info": { "codemirror_mode": { - "name": "ipython", - "version": 3 + "name": "ipython" }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", "version": "3.11.9" } }, diff --git a/python/strings.ipynb b/python/strings.ipynb index f9da5dca..4775a483 100644 --- a/python/strings.ipynb +++ b/python/strings.ipynb @@ -681,14 +681,12 @@ }, "language_info": { "codemirror_mode": { - "name": "ipython", - "version": 3 + "name": "ipython" }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", "version": "3.11.9" } },