Skip to content

Commit

Permalink
Merge pull request #733 from MPAS-Dev/develop
Browse files Browse the repository at this point in the history
Merge develop to master for 1.2.8
  • Loading branch information
xylar authored Sep 5, 2020
2 parents a3f9b0f + 07661c0 commit 00facc6
Show file tree
Hide file tree
Showing 27 changed files with 433 additions and 303 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# MPAS-Analysis
[![Build Status](https://travis-ci.org/MPAS-Dev/MPAS-Analysis.svg?branch=develop)](https://travis-ci.org/MPAS-Dev/MPAS-Analysis)
[![Build Status](https://dev.azure.com/MPAS-Dev/MPAS-Analysis%20testing/_apis/build/status/MPAS-Dev.MPAS-Analysis?branchName=refs%2Fpull%2F728%2Fmerge)](https://dev.azure.com/MPAS-Dev/MPAS-Analysis%20testing/_build/latest?definitionId=2&branchName=refs%2Fpull%2F728%2Fmerge)

Analysis for simulations produced with Model for Prediction Across Scales
(MPAS) components and the Energy Exascale Earth System Model (E3SM), which
Expand Down Expand Up @@ -65,7 +65,7 @@ environment with the following packages:
* geometric\_features >= 0.1.9
* gsw
* pyremap < 0.1.0
* mpas\_tools >= 0.0.8
* mpas\_tools >= 0.0.13

These can be installed via the conda command:
```
Expand All @@ -75,7 +75,7 @@ conda create -n mpas-analysis python=3.8 numpy scipy "matplotlib-base>=3.0.2" \
netCDF4 "xarray>=0.14.1" dask bottleneck lxml "nco>=4.8.1" pyproj \
pillow cmocean progressbar2 requests setuptools shapely "cartopy>=0.18.0" \
cartopy_offlinedata "geometric_features>=0.1.9" gsw "pyremap<0.1.0" \
"mpas_tools>=0.0.8"
"mpas_tools>=0.0.13"
conda activate mpas-analysis
```

Expand Down
210 changes: 210 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,210 @@

trigger:
branches:
include:
- master
- develop
tags:
include:
- '*'

pr:
branches:
include:
- master
- develop

jobs:
- job:
displayName: linux
pool:
vmImage: 'ubuntu-16.04'
strategy:
matrix:
Python36:
python.version: '3.6'
Python37:
python.version: '3.7'
Python38:
python.version: '3.8'

steps:
- bash: echo "##vso[task.prependpath]$CONDA/bin"
displayName: Add conda to PATH

- bash: |
conda config --add channels conda-forge
conda config --set channel_priority strict
conda create --yes --quiet --name build python=$PYTHON_VERSION conda conda-build
displayName: Create Anaconda build environment
- bash: |
eval "$(conda shell.bash hook)"
conda activate build
conda build -m "ci/python${PYTHON_VERSION}.yaml" "ci/recipe"
displayName: Build MPAS-Analysis
- bash: |
eval "$(conda shell.bash hook)"
conda create --yes --quiet --name test --use-local python=$PYTHON_VERSION \
mpas-analysis pytest
displayName: Create Anaconda test environment
- bash: |
eval "$(conda shell.bash hook)"
conda activate test
pytest --pyargs mpas_analysis
displayName: pytest
- bash: |
eval "$(conda shell.bash hook)"
conda create --yes --quiet --name docs --use-local python=$PYTHON_VERSION \
mpas-analysis sphinx mock sphinx_rtd_theme tabulate m2r
condition: eq(variables['python.version'], '3.8')
displayName: Create Anaconda docs environment
- bash: |
eval "$(conda shell.bash hook)"
conda activate docs
echo "source branch: $(Build.SourceBranch)"
echo "repository: $(Build.Repository.Name)"
tag=$(git describe --tags $(git rev-list --tags --max-count=1))
echo "tag: $tag"
version=`python -c "import mpas_analysis; print(mpas_analysis.__version__)"`
echo "version: $version"
REPO_PATH=$PWD
if [[ "$(Build.SourceBranch)" == "refs/heads/develop" ]]; then
export DOCS_VERSION="latest"
deploy=True
elif [[ "$(Build.SourceBranch)" == "refs/heads/master" ]]; then
export DOCS_VERSION="stable"
deploy=True
elif [[ "$(Build.SourceBranch)" == refs/tags/* ]]; then
# this is a tag build
export DOCS_VERSION="$tag"
deploy=True
else
DOCS_VERSION="$version"
export DOCS_VERSION
deploy=False
fi
echo "Docs version: $DOCS_VERSION"
echo "Deploy to gh-pages? $deploy"
cd docs || exit 1
make html
cd "$REPO_PATH" || exit 1
if [[ "$deploy" == "True" ]]; then
PUBLICATION_BRANCH=gh-pages
# Checkout the branch
pushd $HOME || exit 1
git clone --branch=$PUBLICATION_BRANCH https://$(GitHubToken)@github.com/$(Build.Repository.Name) publish
cd publish || exit 1
# Update pages
if [[ -d "$DOCS_VERSION" ]]; then
git rm -rf "$DOCS_VERSION" > /dev/null
fi
mkdir "$DOCS_VERSION"
cp -r "$REPO_PATH"/docs/_build/html/* "$DOCS_VERSION"
# Commit and push latest version
git add .
if git diff-index --quiet HEAD; then
echo "No changes in the docs."
else
git config --local user.name "Azure Pipelines"
git config --local user.email "[email protected]"
git commit -m "[skip ci] Update $DOCS_VERSION"
git push -fq origin $PUBLICATION_BRANCH
fi
popd || exit 1
fi
condition: eq(variables['python.version'], '3.8')
displayName: build and deploy docs
- job:
displayName: xarray-master
pool:
vmImage: 'ubuntu-16.04'
strategy:
matrix:
Python38:
python.version: '3.8'

steps:
- bash: echo "##vso[task.prependpath]$CONDA/bin"
displayName: Add conda to PATH

- bash: |
conda config --add channels conda-forge
conda config --set channel_priority strict
conda create --yes --quiet --name build python=$PYTHON_VERSION conda conda-build
displayName: Create Anaconda build environment
- bash: |
eval "$(conda shell.bash hook)"
conda activate build
conda build -m "ci/python${PYTHON_VERSION}.yaml" "ci/recipe"
displayName: Build MPAS-Analysis
- bash: |
eval "$(conda shell.bash hook)"
conda create --yes --quiet --name test --use-local python=$PYTHON_VERSION \
mpas-analysis pytest
conda activate test
pip install git+https://github.com/pydata/xarray.git
displayName: Create Anaconda test environment
- bash: |
eval "$(conda shell.bash hook)"
conda activate test
pytest --pyargs mpas_analysis
displayName: pytest
- job:
displayName: osx
pool:
vmImage: 'macOS-10.14'
strategy:
matrix:
Python36:
python.version: '3.6'
Python37:
python.version: '3.7'
Python38:
python.version: '3.8'

steps:
- bash: echo "##vso[task.prependpath]$CONDA/bin"
displayName: Add conda to PATH

- bash: |
conda config --add channels conda-forge
conda config --set channel_priority strict
conda create --yes --quiet --name build python=$PYTHON_VERSION conda conda-build
displayName: Create Anaconda build environment
- bash: |
eval "$(conda shell.bash hook)"
conda activate build
conda build -m "ci/python${PYTHON_VERSION}.yaml" "ci/recipe"
displayName: Build MPAS-Analysis
- bash: |
eval "$(conda shell.bash hook)"
conda create --yes --quiet --name test --use-local python=$PYTHON_VERSION \
mpas-analysis pytest
displayName: Create Anaconda test environment
- bash: |
eval "$(conda shell.bash hook)"
conda activate test
pytest --pyargs mpas_analysis
displayName: pytest
32 changes: 0 additions & 32 deletions ci/environment-py36.yml

This file was deleted.

34 changes: 0 additions & 34 deletions ci/environment-py37-xarray-master.yml

This file was deleted.

32 changes: 0 additions & 32 deletions ci/environment-py37.yml

This file was deleted.

32 changes: 0 additions & 32 deletions ci/environment-py38.yml

This file was deleted.

21 changes: 0 additions & 21 deletions ci/install.bash

This file was deleted.

Loading

0 comments on commit 00facc6

Please sign in to comment.