Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .github/config.json

This file was deleted.

24 changes: 2 additions & 22 deletions .github/workflows/binder.yaml
Original file line number Diff line number Diff line change
@@ -1,30 +1,10 @@
# Reference https://mybinder.readthedocs.io/en/latest/howto/gh-actions-badges.html
name: Test this PR on Binder Badge

on:
pull_request_target:
types: [opened]

permissions:
pull-requests:
write

jobs:
binder:
runs-on: ubuntu-latest
steps:
- name: comment on PR with Binder link
uses: actions/github-script@v3
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
var PR_HEAD_USERREPO = process.env.PR_HEAD_USERREPO;
var PR_HEAD_REF = process.env.PR_HEAD_REF;
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/${PR_HEAD_USERREPO}/${PR_HEAD_REF}) :point_left: Test this PR on Binder`
})
env:
PR_HEAD_REF: ${{ github.event.pull_request.head.ref }}
PR_HEAD_USERREPO: ${{ github.event.pull_request.head.repo.full_name }}
uses: eds-book/notebooks-workflows/.github/workflows/binder.yaml@main
49 changes: 8 additions & 41 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,47 +2,14 @@ name: Build and push container image

on:
push:
branches:
- main
- postprint
branches: [main, postprint]
paths-ignore:
- 'README.md'
- 'netlify.toml'

jobs:
build-and-push:
runs-on: ubuntu-latest
if: github.repository_owner == 'eds-book-gallery'
steps:
# For biggish images, github actions runs out of disk space.
# So we cleanup some unwanted things in the disk image, and reclaim that space for our docker use
# https://github.com/actions/virtual-environments/issues/2606#issuecomment-772683150
# and https://github.com/easimon/maximize-build-space/blob/b4d02c14493a9653fe7af06cc89ca5298071c66e/action.yml#L104
# This gives us a total of about 52G of free space, which should be enough for now
- name: cleanup disk space
run: |
sudo rm -rf /usr/local/lib/android /usr/share/dotnet /opt/ghc
df -h

- name: Checkout files in repo
uses: actions/checkout@main

# Set quay image
- name: Get properties from the config file
id: config_quay
uses: notiz-dev/github-action-json-property@release
with:
path: '.github/config.json'
prop_path: 'quay_image'

- name: Build and push the image to quay.io
uses: jupyterhub/repo2docker-action@master
with:
# Make sure username & password/token pair matches your registry credentials
DOCKER_USERNAME: ${{ secrets.QUAY_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.QUAY_PASSWORD }}
DOCKER_REGISTRY: "quay.io"

# Uncomment and modify the following line with your image name, otherwise no push will happen
IMAGE_NAME: ${{steps.config_quay.outputs.prop}}

# Lets us monitor disks getting full as images get bigger over time
- name: Show how much disk space is left
run: df -h
uses: eds-book/notebooks-workflows/.github/workflows/build.yaml@main
secrets:
QUAY_USERNAME: ${{ secrets.QUAY_USERNAME }}
QUAY_PASSWORD: ${{ secrets.QUAY_PASSWORD }}
11 changes: 11 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: MyST GitHub Pages Deploy

on:
workflow_run:
workflows: ["Execute Notebook"]
branches: [main]
types: [completed]

jobs:
deploy:
uses: eds-book/notebooks-workflows/.github/workflows/deploy.yaml@main
11 changes: 11 additions & 0 deletions .github/workflows/execute.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Execute Notebook

on:
workflow_run:
workflows: ["Build and push container image"]
branches: [main, postprint]
types: [completed]

jobs:
execute:
uses: eds-book/notebooks-workflows/.github/workflows/execute.yaml@main
74 changes: 0 additions & 74 deletions .github/workflows/preview.yaml

This file was deleted.

71 changes: 0 additions & 71 deletions .github/workflows/render.yaml

This file was deleted.

38 changes: 1 addition & 37 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,40 +5,4 @@ on:

jobs:
test-build:
runs-on: ubuntu-latest
if: github.repository_owner == 'eds-book-gallery'
steps:

# For biggish images, github actions runs out of disk space.
# So we cleanup some unwanted things in the disk image, and reclaim that space for our docker use
# https://github.com/actions/virtual-environments/issues/2606#issuecomment-772683150
# and https://github.com/easimon/maximize-build-space/blob/b4d02c14493a9653fe7af06cc89ca5298071c66e/action.yml#L104
# This gives us a total of about 52G of free space, which should be enough for now
- name: cleanup disk space
run: |
sudo rm -rf /usr/local/lib/android /usr/share/dotnet /opt/ghc
df -h

- name: checkout files in repo
uses: actions/checkout@main

# Set quay image name
- name: Get properties from the config file
id: config_file
uses: notiz-dev/github-action-json-property@release
with:
path: '.github/config.json'
prop_path: 'quay_image'

- name: Build the image and push it if `NO_PUSH` disabled
uses: jupyterhub/repo2docker-action@master
with: # make sure username & password/token matches your registry
NO_PUSH: "true"
DOCKER_REGISTRY: "quay.io"

# Uncomment and modify the following line with your image name. a
IMAGE_NAME: ${{steps.config_quay.outputs.prop}}

# Lets us monitor disks getting full as images get bigger over time
- name: Show how much disk space is left
run: df -h
uses: eds-book/notebooks-workflows/.github/workflows/test.yaml@main
10 changes: 1 addition & 9 deletions notebook.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,13 @@
"*Describe the purpose of the use case.*\n",
"\n",
"### Description\n",
"*Describe the main features of the dataset/sensor, preprocessing, modelling or postprocessing routine*\n",
"*Describe the main features of the dataset/sensor, preprocessing, modelling or postprocessing routine.*\n",
"\n",
"### Highlights\n",
"*Provide 3-5 bullet points that convey the use case’s core procedures. Each bullet point must have a maximum of 85 characters, including spaces.*\n",
"* Highlight 1\n",
"* Highlight 2\n",
"\n",
"### Contributions\n",
"*Please indicate key contributions. Notebook authors (mandatory). Optional subheadings, used in published EDS book notebooks, are Dataset originator/creator, Dataset authors, Dataset documentation, Modelling codebase, Modelling publications, Modelling funding and Pipeline documentation. Feel free to add any of them or propose new ones to attribute relevant research contributions.*\n",
"\n",
"#### Notebook\n",
"* Author (role), Affiliation, GitHub alias\n",
"\n",
":::{note}\n",
"*Optional: add credits or acknowledgements to data and/or model providers or authors of code snippets*\n",
":::"
Expand Down Expand Up @@ -142,8 +136,6 @@
"\n",
"**Codebase**: Type here details of codebase version (only for notebooks categorised under modelling/preprocesing/post-processing themes).\n",
"\n",
"**License**: The code in this notebook is licensed under the MIT License. The Environmental Data Science book is licensed under the Creative Commons by Attribution 4.0 license. See further details [here](https://github.com/alan-turing-institute/environmental-ds-book/blob/master/LICENSE.md).\n",
"\n",
"**Contact**: If you have any suggestion or report an issue with this notebook, feel free to [create an issue](https://github.com/alan-turing-institute/environmental-ds-book/issues/new/choose) or send a direct message to [environmental.ds.book@gmail.com](mailto:environmental.ds.book@gmail.com)."
]
},
Expand Down
1 change: 1 addition & 0 deletions references.bib
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# notebook references in BibTeX format