From 63c3d16070bf0ef81ee878f4b73be332b0e959fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20BRIOL?= Date: Mon, 1 Jul 2024 18:29:01 +0200 Subject: [PATCH] feat: Update FES2022 documentation and binder configuration --- binder/postBuild | 21 --------------------- docs/source/conf.py | 21 +++++++-------------- 2 files changed, 7 insertions(+), 35 deletions(-) delete mode 100644 binder/postBuild 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 -------------------------------------------------