Skip to content

Commit

Permalink
Merge pull request #79 from unifhy-org/release-v0.1.0
Browse files Browse the repository at this point in the history
Release v0.1.0
  • Loading branch information
Thibault Hallouin authored Dec 7, 2021
2 parents 63dcea5 + 54875d2 commit c4e235c
Show file tree
Hide file tree
Showing 1,125 changed files with 229,094 additions and 60,523 deletions.
73 changes: 73 additions & 0 deletions .github/workflows/advanced_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Advanced tests

on:
pull_request:
types: [ready_for_review]
branches: [main]

jobs:

run-basic-tests:

strategy:
matrix:
os: [ubuntu-latest, macos-latest]
python-version: [3.7, 3.8, 3.9]
fail-fast: false

runs-on: ${{ matrix.os }}

defaults:
run:
shell: bash -l {0}

steps:

# check out PR HEAD commit
- name: check out PR HEAD commit
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}

# set up a conda environment
- name: set up miniconda environment
uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: testing-env
python-version: ${{ matrix.python-version }}
auto-update-conda: true
mamba-version: "*"
channels: conda-forge
channel-priority: true

# install dependencies on conda environment
- name: install package dependencies
run: |
mamba install udunits2=2.2.25
mamba install --file=requirements.txt
# build dummy components required for tests
- name: install Fortran compiler (linux)
if: matrix.os == 'ubuntu-latest'
run: |
mamba install gfortran_impl_linux-64
- name: install Fortran compiler (macos)
if: matrix.os == 'macos-latest'
run: |
mamba install gfortran_impl_osx-64
- name: build dummy C and Fortran components
run: |
mamba install cython
(cd ./tests/components && make)
# install package
- name: install package
run: |
pip install -e .
# run tests
- name: run advanced test suite
run: |
(cd ./tests && python run_all_tests.py)
57 changes: 57 additions & 0 deletions .github/workflows/basic_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Basic tests

on:
pull_request:
types: [ready_for_review]
branches: [dev]

jobs:

run-basic-tests:

strategy:
matrix:
os: [ubuntu-latest, macos-latest]
python-version: [3.7, 3.8, 3.9]
fail-fast: false

runs-on: ${{ matrix.os }}

defaults:
run:
shell: bash -l {0}

steps:

# check out PR HEAD commit
- name: check out PR HEAD commit
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}

# set up a conda environment
- name: set up miniconda environment
uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: testing-env
python-version: ${{ matrix.python-version }}
auto-update-conda: true
mamba-version: "*"
channels: conda-forge
channel-priority: true

# install dependencies on conda environment
- name: install package dependencies
run: |
mamba install udunits2=2.2.25
mamba install --file=requirements.txt
# install package
- name: install package
run: |
pip install -e .
# run tests
- name: run basic test suite
run: |
(cd ./tests && python run_basic_tests.py)
99 changes: 99 additions & 0 deletions .github/workflows/build_docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
name: Build docs

on:
workflow_dispatch:
inputs:
branch:
description: 'branch where to source and build documentation'
required: false
default: 'dev'
release:
description: 'release version tag (#.#.#)'
required: false
default: ''

jobs:

checkout-components:

strategy:
matrix:
components:
- artemis
- gr4
- rfm
- smart
fail-fast: false

runs-on: ubuntu-latest

steps:
- name: checkout ${{ matrix.components }} component for unifhy
uses: actions/checkout@v2
with:
repository: unifhy-org/unifhycontrib-${{ matrix.components }}

- name: store ${{ matrix.components }} as artifact
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.components }}
path: unifhycontrib/${{ matrix.components }}

build-docs:

needs: checkout-components

runs-on: ubuntu-latest

defaults:
run:
shell: bash -l {0}

steps:

- name: checkout framework repository
uses: actions/checkout@v2
with:
ref: ${{ github.event.inputs.branch }}

- name: bring back all component artifacts
uses: actions/download-artifact@v2
with:
path: unifhycontrib

- name: set up miniconda environment
uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: building-docs-env
python-version: ${{ matrix.python-version }}
auto-update-conda: true
mamba-version: "*"
channels: conda-forge
channel-priority: true

- name: install dependencies for framework and its documentation
run: |
mamba install --file=requirements.txt
mamba install --file=requirements-docs.txt
- name: setup git user info
run: |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
- name: fetch remote tags
run: |
git fetch --tags
- name: build docs
run: |
if [[ ! -z ${{ github.event.inputs.release }} ]]; then export VERSION_RELEASE=${{ github.event.inputs.release }}; fi
cd ${{ github.workspace }}/docs
make github_html
- name: commit and push built docs (if changes)
run: |
cd ${{ github.workspace }}/docs
added=$(git add --all --verbose)
if [[ ! -z $added ]]; then git commit -m "update html documentation"; fi
if [[ ! -z $added ]]; then git push https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git ${{ github.event.inputs.branch }}; fi
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
__pycache__/
*.pyc
*.pyf
*.so

# ignore documentation built because copied in docs/ root already
docs/_doc_build

# ignore component contributions added during documentation built on GitHub
unifhycontrib

# =========================
# Operating System Files
# =========================
Expand Down
32 changes: 4 additions & 28 deletions .zenodo.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,38 +6,14 @@
"orcid": "0000-0003-0144-2989"
},
{
"name": "Rich Ellis",
"affiliation": "UK Centre for Ecology and Hydrology, UK"
},
{
"name": "Bryan N. Lawrence",
"affiliation": "National Centre for Atmospheric Science, UK"
},
{
"name": "Grenville M. S. Lister",
"affiliation": "National Centre for Atmospheric Science, UK"
},
{
"name": "Douglas B. Clark",
"affiliation": "UK Centre for Ecology and Hydrology, UK"
},
{
"name": "Andrew Hughes",
"affiliation": "British Geological Survey, UK"
},
{
"name": "Jan Polcher",
"affiliation": "Laboratoire de Météorologie Dynamique, France"
},
{
"name": "Simon Dadson",
"name": "Richard J. Ellis",
"affiliation": "UK Centre for Ecology and Hydrology, UK"
}
],
"title": "cm4twc",
"description": "A Community Model for the Terrestrial Water Cycle.",
"title": "unifhy",
"description": "A Unified Framework for Hydrology.",
"notes": "Funded by the Natual Environment Research Council (NERC) Hydro-JULES programme (NE/S017380/1).",
"license": {
"id": "BSD 3-Clause"
"id": "BSD-3-Clause"
}
}
2 changes: 1 addition & 1 deletion LICENCE.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
BSD 3-Clause Licence

Copyright (c) 2020, UK Centre for Ecology & Hydrology.
Copyright (c) 2021, UK Centre for Ecology & Hydrology.
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
28 changes: 17 additions & 11 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,18 +1,24 @@
Community Model for the Terrestrial Water Cycle
-----------------------------------------------
Unified Framework for Hydrology
-------------------------------

.. image:: https://badge.fury.io/py/cm4twc.svg
:target: https://pypi.python.org/pypi/cm4twc
.. image:: https://img.shields.io/pypi/v/unifhy?style=flat-square&color=00b0f0
:target: https://pypi.python.org/pypi/unifhy
:alt: PyPI Version
.. image:: https://zenodo.org/badge/234523723.svg
.. image:: https://img.shields.io/badge/dynamic/json?url=https://zenodo.org/api/records/4726695&label=doi&query=doi&style=flat-square&color=00b0f0
:target: https://zenodo.org/badge/latestdoi/234523723
:alt: DOI
.. image:: https://img.shields.io/badge/License-BSD%203--Clause-blue.svg
.. image:: https://img.shields.io/github/license/unifhy-org/unifhy?style=flat-square&color=00b0f0
:target: https://opensource.org/licenses/BSD-3-Clause
:alt: Licence
.. image:: https://img.shields.io/badge/fair-%E2%97%8F%20%20%E2%97%8F%20%20%E2%97%8F%20%20%E2%97%8F%20%20%E2%97%8B-yellow?style=flat-square
:target: https://fair-software.eu
:alt: FAIR Software Compliance
.. image:: https://img.shields.io/github/workflow/status/unifhy-org/unifhy/Basic%20tests?style=flat-square&label=tests
:target: https://github.com/unifhy-org/unifhy/actions/workflows/basic_tests.yml
:alt: Tests Status

The Python package `cm4twc` (Community Model for the Terrestrial Water
Cycle) is a hydrological modelling framework which combines interchangeable
modelling components for the surface layer, subsurface, and open water
parts of the terrestrial water cycle. It is designed to foster collaborations
between land surface and hydrological modelling communities.
The Python package `unifhy` (Unified Framework for Hydrology) is a hydrological
modelling framework which combines interchangeable modelling components for the
surface layer, subsurface, and open water parts of the terrestrial water cycle.
It is designed to foster collaborations between land surface, hydrological, and
groundwater modelling communities.
Loading

0 comments on commit c4e235c

Please sign in to comment.