Statement of Need: Integrating JupyterBook and JupyterHubs via CI

Thanks @brian-rose, this is amazing work! This is definitely going in the right direction, and I really like the minimal configuration change required from the tutorial-writer’s point of view, though I acknowledge that more work still needs to happen at the backend to generalize this outside of Project Pythia.

Yes from me! That one-line execute_notebook: binder option would be an easy plug and play solution under Execute and cache your pages, and it looks like there was some similar discussion before at Add option for execution at build time with binderbot · Issue #1445 · executablebooks/jupyter-book · GitHub.

From what I can tell, the magic behind this seems to be happening via binderbot at https://github.com/ProjectPythiaCookbooks/cookbook-actions/blob/b676947e4c36cfbdcc96943b076101ef669a6fe3/.github/workflows/build-book.yaml#L89-L147, which contains some hardcoded values specific to Project Pythia. Seeing as this requires a bit of work, maybe we could:

  1. Short term: Generalize the workflow (read: remove hardcoding) at GitHub - ProjectPythia/cookbook-actions: Reusable workflows used by Project Pythia Cookbooks so people outside of Project Pythia can have a chunk of code in their GitHub Actions YAML like:
      uses: ProjectPythiaCookbooks/cookbook-actions/.github/workflows/build-book.yaml@main
      with:
        environment_name: custom-environment
        artifact_name: book-zip-${{ github.event.number }}
    
  2. Long term: Get the execute_notebook: binder option working directly in jupyter-book, so that this
    a) isn’t reliant on GitHub Actions infrastructure, i.e. people could run things locally, on GitLab, or other Continuous Integration services.
    b) works not only for Jupyter notebooks (*.ipynb files), but also tutorials written in Rmarkdown, MyST markdown, etc.

Happy to help test and/or review whatever comes out next. I’ve got a use case on executing some tutorial notebooks via a Binder instance on AWS us-west2 (where there’s cloud-hosted data) at 🚸 ICESat-2 ATL11 pre-processing to analysis ready format by weiji14 · Pull Request #10 · geo-smart/deepicedrainpipe · GitHub, and will be interested in beta testing some of this JupyterBook ↔ BinderHub integration.

1 Like