Skip to content

Commit

Permalink
Adding Sphinx documentation (#2)
Browse files Browse the repository at this point in the history
* Updating github actions to use single build script

* Adding basic sphinx docs

* Changing fabm-ersem to pyfabm-ersem

* Adding famb0d-gotm-ersem build

* Seperating README into sphinx docs

* Adding pyfabm tutorial script

* Restructure tutorial page

* Updating install scripts into seperate folders

* Running pyfabm-tut on github actions

* Initial restructure of sphinx docs

* Adding basic api

* Updating api generator

* Updating pyfabm tutorial

* Updating api

* Renaming api to module index

* Updating structure

* Updating history.rst and adding description from webpage pdf

* Updating gotm tutorial

* Updating ERSEM model pages

* Updating tutorials

* Adding gotm tutorial to actions

* Adding netcdf install to gotm tutorial

* Updating docs

* Updating gotm tutorial with figure

* Adding aquarium fabm0d tutorial

* Updates to docs

* Updating docs to include conda install

* Fixing GOTM version
  • Loading branch information
Michael Wathen authored Apr 19, 2021
1 parent 678122f commit f63bfeb
Show file tree
Hide file tree
Showing 49 changed files with 1,400 additions and 347 deletions.
75 changes: 48 additions & 27 deletions .github/workflows/ersem.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This is a basic workflow to help you get started with Actions

name: build-ersem
name: ersem

on:
push:
Expand All @@ -9,40 +9,61 @@ on:
branches: [ master ]

jobs:
build-fabm-ersem:
build-pyfabm-ersem-debian:
runs-on: ubuntu-latest
steps:
- name: Checkout branch
uses: actions/checkout@v2
- uses: actions/checkout@v2
- name: Setup python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Installing wheel and numpy
run: python -m pip install wheel numpy
- name: Cloning FABM
run: git clone https://github.com/fabm-model/fabm.git
- name: Building FABM-ERSEM
- name: Installing PyFABM-ERSEM dependences
run: ./github-actions/pyfabm-ersem/pyfabm-ersem-dep-debian.sh
- name: Building and installing PyFABM-ERSEM
run: |
mkdir build && cd build
cmake ../fabm/src/drivers/python -DFABM_ERSEM_BASE=..
make install
- name: Check installation
run: python -c "import fabm"
build-gotm-fabm-ersem:
branch=$(git branch --show-current)
./github-actions/pyfabm-ersem/pyfabm-ersem-build.sh $branch
- name: Running pyfabm tutorial
run: |
python -m pip install matplotlib
python github-actions/pyfabm-ersem/pyfabm-tut.py
build-gotm-fabm-ersem-debian:
runs-on: ubuntu-latest
steps:
- name: Checkout branch
uses: actions/checkout@v2
- name: Installing netCDF
run: sudo apt-get install libnetcdff-dev
- name: Cloning FABM and GOTM
- uses: actions/checkout@v2
- name: Setup python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Installing GOTM-FABM-ERSEM dependences
run: ./github-actions/gotm-fabm-ersem/gotm-fabm-ersem-dep-debian.sh
- name: Building and installing GOTM-FABM-ERSEM
run: |
branch=$(git branch --show-current)
./github-actions/gotm-fabm-ersem/gotm-fabm-ersem-build.sh $branch
- name: Running tutorial
run: |
./github-actions/gotm-fabm-ersem/gotm-tut-config-setup.sh
sudo apt install libnetcdff-dev
python -m pip install matplotlib netCDF4
python github-actions/gotm-fabm-ersem/gotm-tut.py -p ersem-setups/L4
build-fabm0d-gotm-ersem-debian:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Installing FABM0d-GOTM-ERSEM dependences
run: ./github-actions/fabm0d-gotm-ersem/fabm0d-gotm-ersem-dep-debian.sh
- name: Building and installing FABM0d-GOTM-ERSEM
run: |
git clone https://github.com/fabm-model/fabm.git
git clone https://github.com/gotm-model/code.git gotm
cd gotm && git submodule update --init --recursive && cd ..
- name: Building GOTM-FABM-ERSEM
branch=$(git branch --show-current)
./github-actions/fabm0d-gotm-ersem/fabm0d-gotm-ersem-build.sh $branch
- name: Running tutorial
run: |
mkdir build && cd build
cmake ../gotm -DFABM_BASE=../fabm -DFABM_ERSEM_BASE=..
make install
./github-actions/fabm0d-gotm-ersem/aquarium-tut-config-setup.sh
sudo apt install libnetcdff-dev
python -m pip install matplotlib netCDF4
python github-actions/fabm0d-gotm-ersem/aquarium-tut.py -p ersem-setups/0d-aquarium/output.nc
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Removing docs build
docs/build/

# Removing pycache
__pycache__

# the module index is built each time the docs
docs/source/module_index.rst

# removing swap files
*.swp
Loading

0 comments on commit f63bfeb

Please sign in to comment.