From 5cd575b8a8311ac7051d038bc4d5854e85d6eb06 Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Mon, 8 Mar 2021 23:54:13 +0000 Subject: [PATCH] add nbstripout pre-commit --- .pre-commit-config.yaml | 6 ++++++ DEMO.ipynb | 7 ++----- environment.yml | 1 + 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index aead6873..3bcea840 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -52,3 +52,9 @@ repos: rev: 5.7.0 hooks: - id: isort +repos: +- repo: https://github.com/kynan/nbstripout + rev: master + hooks: + - id: nbstripout + args: ['--keep-count', '--keep-output'] diff --git a/DEMO.ipynb b/DEMO.ipynb index feaab938..82670daf 100644 --- a/DEMO.ipynb +++ b/DEMO.ipynb @@ -1714,15 +1714,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.7.8" + "nbconvert_exporter": "python" } }, "nbformat": 4, diff --git a/environment.yml b/environment.yml index 21e0d8a9..9b199cf2 100644 --- a/environment.yml +++ b/environment.yml @@ -29,6 +29,7 @@ dependencies: # extras - dask # dask - matplotlib # gui +- nbstripout # notebook editing - numpy # pandas, keras, contrib.tenumerate - pandas - tensorflow # keras