Skip to content

Commit

Permalink
feat: Update FES2022 documentation and binder configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
fbriol committed Jul 1, 2024
1 parent 63c3d16 commit 630b3b1
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions binder/postBuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
set -e

TMP_CONTENT_DIR=/tmp/pyfes
mkdir -p $TMP_CONTENT_DIR
cp -r examples binder $TMP_CONTENT_DIR
for item in $(find . -name "*.nc")
do
dirname=$(dirname $item)
mkdir -p $TMP_CONTENT_DIR/$dirname
cp $item $TMP_CONTENT_DIR/$item
done

find . -delete

GENERATED_NOTEBOOKS_DIR=.generated-notebooks
cp -r $TMP_CONTENT_DIR/examples $GENERATED_NOTEBOOKS_DIR

find $GENERATED_NOTEBOOKS_DIR -name '*.py' -exec sphinx_gallery_py2jupyter '{}' +
NON_NOTEBOOKS=$(find $GENERATED_NOTEBOOKS_DIR -type f | grep -v -E '\.(ipynb|yml)')
rm -f $NON_NOTEBOOKS

mv $TMP_CONTENT_DIR/binder .
mv $TMP_CONTENT_DIR/tests .
rm -rf $TMP_CONTENT_DIR

mkdir -p notebooks
cp -v $GENERATED_NOTEBOOKS_DIR/*.ipynb notebooks/
cp -v $GENERATED_NOTEBOOKS_DIR/*.yml notebooks/
rm -rf $GENERATED_NOTEBOOKS_DIR

0 comments on commit 630b3b1

Please sign in to comment.