Skip to content

Commit

Permalink
feat: Update FES2022 documentation and binder configuration
Browse files Browse the repository at this point in the history
The code changes include adding a new environment.yml file in the binder directory, which specifies the dependencies for the pyfes project. Additionally, the postBuild script has been modified to generate Jupyter notebooks from Python files and remove non-notebook files. The conf.py file in the docs/source directory has been updated to include the binder configuration for the FES2022 documentation.

Recent user commits and repository commits indicate a focus on documentation updates, code development information, and fixing syntax errors.
  • Loading branch information
fbriol committed Jul 1, 2024
1 parent 47a3b72 commit ef2e087
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 10 deletions.
10 changes: 10 additions & 0 deletions binder/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: pyfes
channels:
- conda-forge
dependencies:
- cartopy
- matplotlib
- jupyter
- pyfes
- sphinx-gallery
- sphinx-inline-tabs
21 changes: 21 additions & 0 deletions binder/postBuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/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
25 changes: 15 additions & 10 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,17 +81,22 @@ def push_front_syspath():
'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')],
# 'use_jupyter_lab': True,
# }
'binder': {
'org':
'CNES',
'repo':
'aviso-fes',
'branch':
'main',
'binderhub_url':
'https://mybinder.org',
'dependencies':
[HERE.joinpath('..', '..', 'binder', 'environment.yml').resolve()],
'use_jupyter_lab':
True,
}
}

print([HERE.joinpath('..', '..', 'binder', 'environment.yml').resolve()])
exclude_patterns = []

# -- Options for HTML output -------------------------------------------------
Expand Down

0 comments on commit ef2e087

Please sign in to comment.