From 03ced02507c19b17ea3763ce3d9ceada8090ab47 Mon Sep 17 00:00:00 2001 From: Tetsuo Koyama Date: Sat, 11 Jul 2020 14:47:03 +0900 Subject: [PATCH 1/3] :up: jupyter notebook to jupyterlab --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 594ac9f1..907d42ad 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ In all cases, learners should follow along the worked examples in each lesson by Lessons ------- > Launch an interactive session with this module using the Binder service: -[![Binder](https://mybinder.org/badge.svg)](https://mybinder.org/v2/gh/barbagroup/CFDPython/master) +[![Binder](https://mybinder.org/badge.svg)](https://mybinder.org/v2/gh/barbagroup/CFDPython/master?urlpath=lab) Steps 1–4 are in one spatial dimension. Steps 5–10 are in two dimensions (2D). Steps 11–12 solve the Navier-Stokes equation in 2D. Three "bonus" notebooks cover the CFL condition for numerical stability, array operations with NumPy, and defining functions in Python. From 6d3ed769e9097908c6405a020341e82885327fdf Mon Sep 17 00:00:00 2001 From: Tetsuo Koyama Date: Sat, 11 Jul 2020 14:54:29 +0900 Subject: [PATCH 2/3] GitHub bot to show mybinder badge of branch in PR --- .github/workflows/binder.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/binder.yml diff --git a/.github/workflows/binder.yml b/.github/workflows/binder.yml new file mode 100644 index 00000000..8370fc9a --- /dev/null +++ b/.github/workflows/binder.yml @@ -0,0 +1,29 @@ +name: Binder +on: + pull_request: + types: [opened, reopened] + +jobs: + Create-Binder-Badge: + runs-on: ubuntu-latest + steps: + + - name: checkout pull request branch + uses: actions/checkout@v2 + with: + ref: ${{ github.event.pull_request.head.sha }} + + - name: comment on PR with Binder link + uses: actions/github-script@v1 + with: + github-token: ${{secrets.GITHUB_TOKEN}} + script: | + var BRANCH_NAME = process.env.BRANCH_NAME; + github.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: `[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/${context.repo.owner}/${context.repo.repo}/${BRANCH_NAME}?urlpath=lab) :point_left: Launch a binder notebook on this branch` + }) + env: + BRANCH_NAME: ${{ github.event.pull_request.head.ref }} From a28e340a7ef726469a574e13c73aed0b807c7108 Mon Sep 17 00:00:00 2001 From: Tetsuo Koyama Date: Sat, 11 Jul 2020 15:07:54 +0900 Subject: [PATCH 3/3] Running the notebook server by Jupyter lab --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 907d42ad..31088504 100644 --- a/README.md +++ b/README.md @@ -111,6 +111,12 @@ Once Jupyter is installed, open up a terminal and then run jupyter notebook ``` +or if you want to run JupyterLab + +```Bash +jupyter lab +``` + This will start up a Jupyter session in your browser! ## How to contribute to CFD Python