diff --git a/binder/postBuild b/binder/postBuild deleted file mode 100644 index c5f3c03..0000000 --- a/binder/postBuild +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash -set -e - -TMP_CONTENT_DIR=/tmp/pyinterp -mkdir -p $TMP_CONTENT_DIR -cp -r examples binder $TMP_CONTENT_DIR - -find . -delete - -GENERATED_NOTEBOOKS_DIR=.generated-notebooks -cp -r $TMP_CONTENT_DIR/examples $GENERATED_NOTEBOOKS_DIR - -find $GENERATED_NOTEBOOKS_DIR -name '*.py' -exec sphx_glr_python_to_jupyter.py '{}' + -NON_NOTEBOOKS=$(find $GENERATED_NOTEBOOKS_DIR -type f | grep -v '\.ipynb') -rm -f $NON_NOTEBOOKS - -mv $TMP_CONTENT_DIR/binder . -rm -rf $TMP_CONTENT_DIR - -mkdir notebooks -ln -s ../$GENERATED_NOTEBOOKS_DIR notebooks/auto_examples diff --git a/docs/source/conf.py b/docs/source/conf.py index 6ba56c7..adf75e8 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -76,27 +76,20 @@ def push_front_syspath(): 'MatrixFloat64': 'MatrixFloat64', 'MatrixComplex128': 'MatrixComplex128', } - +dependencies = HERE.joinpath('..', '..', 'binder', 'environment.yml').resolve() sphinx_gallery_conf = { 'examples_dirs': [HERE.parent.parent.joinpath('examples')], 'filename_pattern': r'[\\\/]ex_', 'pypandoc': False, 'binder': { - 'org': - 'CNES', - 'repo': - 'aviso-fes', - 'branch': - 'main', - 'binderhub_url': - 'https://mybinder.org', - 'dependencies': - [HERE.joinpath('..', '..', 'binder', 'environment.yml').resolve()], - 'use_jupyter_lab': - True, + 'org': 'CNES', + 'repo': 'aviso-fes', + 'branch': 'main', + 'binderhub_url': 'https://mybinder.org', + 'dependencies': [dependencies], + 'use_jupyter_lab': True, } } -print([HERE.joinpath('..', '..', 'binder', 'environment.yml').resolve()]) exclude_patterns = [] # -- Options for HTML output -------------------------------------------------