Skip to content

Commit

Permalink
run notebooks on coast repo
Browse files Browse the repository at this point in the history
  • Loading branch information
thogar-computer committed Oct 31, 2023
1 parent fdd3db1 commit 30da16e
Show file tree
Hide file tree
Showing 6 changed files with 250 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/markdown-altimetry.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: notebook_to_md (altimetry)

on:
# External webhook trigger
repository_dispatch:
types: [push-notebook]


jobs:
commit-notebooks:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- name: Checkout site
uses: actions/checkout@v3
with:
submodules: recursive # Fetch Hugo themes and all extra projects
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
path: site

- name: Checkout coast
uses: actions/checkout@v3
with:
repository: British-Oceanographic-Data-Centre/COAsT
ref: develop
path: external

- name: Prepare environement
uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: coast
environment-file: external/environment.yml
python-version: 3.9.13
- name: prep exec notebooks
run: |
conda info
conda list
conda config --show
cd $GITHUB_WORKSPACE/external
sudo apt install wget unzip -y
wget -q https://linkedsystems.uk/erddap/files/COAsT_example_files/COAsT_example_files.zip
unzip COAsT_example_files.zip && mv COAsT_example_files ./example_scripts/notebook_tutorials/runnable_notebooks/altimetry/example_files
ls /home/runner/work/COAsT-site/COAsT-site/external/example_scripts/notebook_tutorials/runnable_notebooks/altimetry/example_files
mkdir -p ./example_scripts/notebook_tutorials/markdown/altimetry
ls ./example_scripts/notebooks
pip install .
mv config ./example_scripts/notebook_tutorials/runnable_notebooks/altimetry/config
bash notebook_to_md.sh altimetry
49 changes: 49 additions & 0 deletions .github/workflows/markdown-general.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: notebook_to_md (general)

on:
# External webhook trigger
repository_dispatch:
types: [push-notebook]

jobs:
commit-notebooks:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- name: Checkout site
uses: actions/checkout@v3
with:
submodules: recursive # Fetch Hugo themes and all extra projects
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
path: site

- name: Checkout coast
uses: actions/checkout@v3
with:
repository: British-Oceanographic-Data-Centre/COAsT
ref: develop
path: external

- name: Prepare environement
uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: coast
environment-file: external/environment.yml
python-version: 3.9.13
- name: prep exec notebooks
run: |
conda info
conda list
conda config --show
cd $GITHUB_WORKSPACE/external
sudo apt install wget unzip -y
wget -q https://linkedsystems.uk/erddap/files/COAsT_example_files/COAsT_example_files.zip
unzip COAsT_example_files.zip && mv COAsT_example_files ./example_scripts/notebook_tutorials/runnable_notebooks/general/example_files
ls /home/runner/work/COAsT-site/COAsT-site/external/example_scripts/notebook_tutorials/runnable_notebooks/general/example_files
mkdir -p ./example_scripts/notebook_tutorials/markdown/general
ls ./example_scripts/notebooks
pip install .
mv config ./example_scripts/notebook_tutorials/runnable_notebooks/general/config
bash notebook_to_md.sh general
49 changes: 49 additions & 0 deletions .github/workflows/markdown-gridded.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: notebook_to_md (gridded)

on:
# External webhook trigger
repository_dispatch:
types: [push-notebook]

jobs:
commit-notebooks:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- name: Checkout site
uses: actions/checkout@v3
with:
submodules: recursive # Fetch Hugo themes and all extra projects
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
path: site

- name: Checkout coast
uses: actions/checkout@v3
with:
repository: British-Oceanographic-Data-Centre/COAsT
ref: develop
path: external

- name: Prepare environement
uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: coast
environment-file: external/environment.yml
python-version: 3.9.13
- name: prep exec notebooks
run: |
conda info
conda list
conda config --show
cd $GITHUB_WORKSPACE/external
sudo apt install wget unzip -y
wget -q https://linkedsystems.uk/erddap/files/COAsT_example_files/COAsT_example_files.zip
unzip COAsT_example_files.zip && mv COAsT_example_files ./example_scripts/notebook_tutorials/runnable_notebooks/gridded/example_files
ls /home/runner/work/COAsT-site/COAsT-site/external/example_scripts/notebook_tutorials/runnable_notebooks/gridded/example_files
mkdir -p ./example_scripts/notebook_tutorials/markdown/gridded
ls ./example_scripts/notebooks
pip install .
mv config ./example_scripts/notebook_tutorials/runnable_notebooks/gridded/config
bash notebook_to_md.sh gridded
49 changes: 49 additions & 0 deletions .github/workflows/markdown-profile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: notebook_to_md (profile)

on:
# External webhook trigger
repository_dispatch:
types: [push-notebook]

jobs:
commit-notebooks:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- name: Checkout site
uses: actions/checkout@v3
with:
submodules: recursive # Fetch Hugo themes and all extra projects
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
path: site

- name: Checkout coast
uses: actions/checkout@v3
with:
repository: British-Oceanographic-Data-Centre/COAsT
ref: develop
path: external

- name: Prepare environement
uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: coast
environment-file: external/environment.yml
python-version: 3.9.13
- name: prep exec notebooks
run: |
conda info
conda list
conda config --show
cd $GITHUB_WORKSPACE/external
sudo apt install wget unzip rsync -y
wget -q https://linkedsystems.uk/erddap/files/COAsT_example_files/COAsT_example_files.zip
unzip COAsT_example_files.zip && mv COAsT_example_files ./example_scripts/notebook_tutorials/runnable_notebooks/profile/example_files
ls /home/runner/work/COAsT-site/COAsT-site/external/example_scripts/notebook_tutorials/runnable_notebooks/profile/example_files
mkdir -p ./example_scripts/notebook_tutorials/markdown
ls ./example_scripts/notebooks
pip install .
mv config ./example_scripts/notebook_tutorials/runnable_notebooks/profile/config
bash notebook_to_md.sh profile
49 changes: 49 additions & 0 deletions .github/workflows/markdown-tidegauge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: notebook_to_md (tidegauge)

on:
# External webhook trigger
repository_dispatch:
types: [push-notebook]

jobs:
commit-notebooks:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- name: Checkout site
uses: actions/checkout@v3
with:
submodules: recursive # Fetch Hugo themes and all extra projects
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
path: site

- name: Checkout coast
uses: actions/checkout@v3
with:
repository: British-Oceanographic-Data-Centre/COAsT
ref: develop
path: external

- name: Prepare environement
uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: coast
environment-file: external/environment.yml
python-version: 3.9.13
- name: prep exec notebooks
run: |
conda info
conda list
conda config --show
cd $GITHUB_WORKSPACE/external
sudo apt install wget unzip -y
wget -q https://linkedsystems.uk/erddap/files/COAsT_example_files/COAsT_example_files.zip
unzip COAsT_example_files.zip && mv COAsT_example_files ./example_scripts/notebook_tutorials/runnable_notebooks/tidegauge/example_files
ls /home/runner/work/COAsT-site/COAsT-site/external/example_scripts/notebook_tutorials/runnable_notebooks/tidegauge/example_files
mkdir -p ./example_scripts/notebook_tutorials/markdown/tidegauge
ls ./example_scripts/notebooks
pip install .
mv config ./example_scripts/notebook_tutorials/runnable_notebooks/tidegauge/config
bash notebook_to_md.sh tidegauge
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ It's aim is to deliver a flexible, community-ready framework for assessing kilom

Documentation can be found [here](https://british-oceanographic-data-centre.github.io/COAsT/docs/).

![PyPI version](https://badge.fury.io/py/COAsT.svg)
![Anaconda version](https://anaconda.org/bodc/coast/badges/version.svg)

## Notes on Object Structure and Loading (for contributors):

COAsT is an object-orientated package, meaning that data is stored within Python object
Expand Down

0 comments on commit 30da16e

Please sign in to comment.