From 9fd9759d9d2d7cbc57c7dadfda3fe09c5c26fe4b Mon Sep 17 00:00:00 2001 From: Adrian Price-Whelan Date: Thu, 13 Jan 2022 16:04:15 -0500 Subject: [PATCH 1/2] add extractoutput preprocessor flag --- Makefile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 000291c8..d70b7209 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,8 @@ default: build TUTORIALS_MAIN_BRANCH ?= main MODIFIED := $(shell python .github/get_modified_tutorials.py --main-branch $(TUTORIALS_MAIN_BRANCH)) +FLAGS = --flatten --build-path=. --preprocessors=nbconvert.preprocessors.ExtractOutputPreprocessor -v + build: envcheck execute convert buildall: envcheck executeall convertall @@ -10,16 +12,16 @@ envcheck: python -c "import pkg_resources; pkg_resources.require(open('requirements.txt', mode='r')); print('Your environment is all set!')" execute: - nbcollection execute --timeout=600 --flatten --build-path=. -v ${MODIFIED} + nbcollection execute --timeout=600 ${FLAGS} ${MODIFIED} convert: - nbcollection convert --flatten --build-path=. -v --make-index --index-template=templates/index.tpl ${MODIFIED} + nbcollection convert --make-index --index-template=templates/index.tpl ${FLAGS} ${MODIFIED} executeall: - nbcollection execute --timeout=600 --flatten --build-path=. -v tutorials + nbcollection execute --timeout=600 ${FLAGS} tutorials convertall: - nbcollection convert --flatten --build-path=. -v --make-index --index-template=templates/index.tpl tutorials + nbcollection convert --make-index --index-template=templates/index.tpl ${FLAGS} tutorials clean: rm -rf _build From 9ef3955370a790982cb67dde2659f91b7bf074e2 Mon Sep 17 00:00:00 2001 From: Adrian Price-Whelan Date: Thu, 13 Jan 2022 16:11:05 -0500 Subject: [PATCH 2/2] only call for convert --- Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index d70b7209..6ab7cb2e 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,8 @@ default: build TUTORIALS_MAIN_BRANCH ?= main MODIFIED := $(shell python .github/get_modified_tutorials.py --main-branch $(TUTORIALS_MAIN_BRANCH)) -FLAGS = --flatten --build-path=. --preprocessors=nbconvert.preprocessors.ExtractOutputPreprocessor -v +FLAGS = --flatten --build-path=. -v +CONVERTFLAGS = --make-index --preprocessors=nbconvert.preprocessors.ExtractOutputPreprocessor --index-template=templates/index.tpl build: envcheck execute convert buildall: envcheck executeall convertall @@ -15,13 +16,13 @@ execute: nbcollection execute --timeout=600 ${FLAGS} ${MODIFIED} convert: - nbcollection convert --make-index --index-template=templates/index.tpl ${FLAGS} ${MODIFIED} + nbcollection convert ${CONVERTFLAGS} ${FLAGS} ${MODIFIED} executeall: nbcollection execute --timeout=600 ${FLAGS} tutorials convertall: - nbcollection convert --make-index --index-template=templates/index.tpl ${FLAGS} tutorials + nbcollection convert ${CONVERTFLAGS} ${FLAGS} tutorials clean: rm -rf _build