Skip to content

Commit

Permalink
Merge pull request #2867 from robkooper/release/1.7.2
Browse files Browse the repository at this point in the history
Release/1.7.2
  • Loading branch information
robkooper authored Oct 8, 2021
2 parents 5e33935 + 3ae997d commit e423ac0
Show file tree
Hide file tree
Showing 1,440 changed files with 68,934 additions and 22,439 deletions.
8 changes: 8 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
# ignore git folder
.git

# ignore .install, need own version in docker
.install

# ignore packrat lib/src folders, others might be needed
*/*/packrat/lib*/
*/*/packrat/src/

# ignore tests and contrib folder
tests
contrib

# ignore compiled files from rtm
modules/rtm/src/RTM/*.o
modules/rtm/src/RTM/*/*.o
modules/rtm/src/RTM/*/*/*.o
Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/Doc_changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ There is a broken URL link in the documentation. It is in the master version in

### Information for those wanting to make changes

Please follow the instructions in the [Editing this Book](https://pecanproject.github.io/pecan-documentation/develop/bookediting.html) section of the documentation.
Please follow the instructions in the [Editing this Book](https://pecanproject.github.io/pecan-documentation/develop/about-the-pecan-book.html#bookediting) section of the documentation.

All R-markdown files related to documentation are located within the main directory `/pecan/book_source` except for the demos and vignettes which are in `pecan/documentation/tutorials`.
All R-markdown files related to documentation are located within the main directory `/pecan/book_source` except for the demos and vignettes which are in `pecan/documentation/tutorials`.
68 changes: 68 additions & 0 deletions .github/workflows/book.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: renderbook

on:
push:
branches:
- master
- develop

tags:
- '*'

pull_request:

jobs:
bookdown:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

container:
image: pecan/depends:R4.0.3

steps:
# checkout source code
- uses: actions/checkout@v2
# install rmarkdown
- name: Install rmarkdown
run: |
Rscript -e 'install.packages(c("rmarkdown","bookdown"))'
# copy files
- name: copy extfiles
run: |
mkdir -p book_source/extfiles
cp -f documentation/tutorials/01_Demo_Basic_Run/extfiles/* book_source/extfiles
# compile PEcAn code
- name: build
run: make -j1
# render book
- name: Render Book
run: |
cd book_source
Rscript -e 'options(bookdown.render.file_scope=FALSE); bookdown::render_book("index.Rmd", "bookdown::gitbook")'
# save artifact
- uses: actions/upload-artifact@v2
with:
name: pecan-documentation
path: book_source/_book/
# download documentation repo
- name: Checkout documentation repo
if: github.event_name != 'pull_request'
uses: actions/checkout@v2
with:
repository: ${{ github.repository_owner }}/pecan-documentation
path: pecan-documentation
token: ${{ secrets.GH_PAT }}
# upload new documentation
- name: publish to github
if: github.event_name != 'pull_request'
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Documentation Robot"
export VERSION=${GITHUB_REF##*/}
cd pecan-documentation
mkdir -p $VERSION
rsync -a --delete ../book_source/_book/ ${VERSION}/
git add --all *
git commit -m "Build book from pecan revision ${GITHUB_SHA}" || true
git push -q origin master
223 changes: 223 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,223 @@
name: CI

on:
push:
branches:
- master
- develop

tags:
- '*'

pull_request:

issue_comment:
types:
- created

env:
R_LIBS_USER: /usr/local/lib/R/site-library
LC_ALL: en_US.UTF-8
NCPUS: 2
PGHOST: postgres
CI: true

jobs:

# ----------------------------------------------------------------------
# R BUILD
# ----------------------------------------------------------------------
build:
if: github.event_name != 'issue_comment' || startsWith(github.event.comment.body, '/build')
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

strategy:
fail-fast: false
matrix:
R:
- "4.0.3"
- "4.0.4"

container:
image: pecan/depends:R${{ matrix.R }}

steps:
# checkout source code
- uses: actions/checkout@v2

# install additional tools needed
- name: install utils
run: apt-get update && apt-get install -y postgresql-client qpdf curl

# check dependencies
- name: update dependency lists
run: Rscript scripts/generate_dependencies.R
- name: check for out-of-date dependencies files
uses: infotroph/tree-is-clean@v1
- name: install newly-added dependencies
run: Rscript docker/depends/pecan.depends.R

# compile PEcAn code
- name: build
run: make -j1
- name: check for out-of-date files
uses: infotroph/tree-is-clean@v1

# ----------------------------------------------------------------------
# R TEST
# ----------------------------------------------------------------------
test:
if: github.event_name != 'issue_comment' || startsWith(github.event.comment.body, '/build')
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

strategy:
fail-fast: false
matrix:
R:
- "4.0.3"
- "4.0.4"

services:
postgres:
image: mdillon/postgis:9.5
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5

container:
image: pecan/depends:R${{ matrix.R }}

steps:
# checkout source code
- uses: actions/checkout@v2

# install additional tools needed
- name: install utils
run: apt-get update && apt-get install -y postgresql-client qpdf
- name: install new dependencies
run: Rscript scripts/generate_dependencies.R && Rscript docker/depends/pecan.depends.R

# initialize database
- name: db setup
uses: docker://pecan/db:ci
- name: add models to db
run: ./scripts/add.models.sh

# run PEcAn tests
- name: test
run: make -j1 test
- name: check for out-of-date files
uses: infotroph/tree-is-clean@v1

# ----------------------------------------------------------------------
# R CHECK
# ----------------------------------------------------------------------
check:
if: github.event_name != 'issue_comment' || startsWith(github.event.comment.body, '/build')
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
R:
- "4.0.3"
- "4.0.4"

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
_R_CHECK_LENGTH_1_CONDITION_: true
_R_CHECK_LENGTH_1_LOGIC2_: true
# Avoid compilation check warnings that come from the system Makevars
# See https://stat.ethz.ch/pipermail/r-package-devel/2019q2/003898.html
_R_CHECK_COMPILATION_FLAGS_KNOWN_: -Wformat -Werror=format-security -Wdate-time
# Keep R checks from trying to consult the very flaky worldclockapi.com
_R_CHECK_SYSTEM_CLOCK_: 0

container:
image: pecan/depends:R${{ matrix.R }}

steps:
# checkout source code
- uses: actions/checkout@v2

# install additional tools needed
- name: install utils
run: apt-get update && apt-get install -y postgresql-client qpdf
- name: install new dependencies
run: Rscript scripts/generate_dependencies.R && Rscript docker/depends/pecan.depends.R
# need processx > 3.5.2 to avoid cryptic errors from
# https://github.com/r-lib/rcmdcheck/issues/140
# Remove when https://github.com/r-lib/processx/pull/299 reaches CRAN
- name: update processx
run: Rscript -e 'devtools::install_github("r-lib/processx")'

# run PEcAn checks
- name: check
run: make -j1 check
env:
REBUILD_DOCS: "FALSE"
RUN_TESTS: "FALSE"
- name: check for out-of-date files
uses: infotroph/tree-is-clean@v1


# ----------------------------------------------------------------------
# SIPNET TESTS
# ----------------------------------------------------------------------
sipnet:
if: github.event_name != 'issue_comment' || startsWith(github.event.comment.body, '/build')
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

strategy:
fail-fast: false
matrix:
R:
- "4.0.3"
- "4.0.4"

services:
postgres:
image: mdillon/postgis:9.5
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5

container:
image: pecan/depends:R${{ matrix.R }}

steps:
# checkout source code
- uses: actions/checkout@v2

# install additional tools needed
- name: install utils
run: apt-get update && apt-get install -y postgresql-client qpdf
- name: install new dependencies
run: Rscript scripts/generate_dependencies.R && Rscript docker/depends/pecan.depends.R

# initialize database
- name: db setup
uses: docker://pecan/db:ci
- name: add models to db
run: ./scripts/add.models.sh

# install sipnet
- name: Check out SIPNET
uses: actions/checkout@v2
with:
repository: PecanProject/sipnet
path: sipnet
- name: install sipnet
run: |
cd ${GITHUB_WORKSPACE}/sipnet
make
# compile PEcAn code
- name: build
run: make -j1

# run SIPNET test
- name: integration test
run: ./tests/integration.sh ghaction
76 changes: 76 additions & 0 deletions .github/workflows/depends.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: Docker Depends Image

on:
push:
branches:
- develop
- master

# this runs on the develop branch
schedule:
- cron: '0 0 * * *'

env:
# official supported version of R
SUPPORTED: 4.0.3
DOCKERHUB_ORG: pecan

jobs:
depends:
if: github.repository == 'PecanProject/pecan'
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

strategy:
fail-fast: false
matrix:
R:
- "4.0.3"
- "4.0.4"

steps:
- uses: actions/checkout@v2

# calculate some variables that are used later
- name: github branch
run: |
BRANCH=${GITHUB_REF##*/}
echo "GITHUB_BRANCH=${BRANCH}" >> $GITHUB_ENV
tags="R${{ matrix.R }}"
if [ "${{ matrix.R }}" == "${{ env.SUPPORTED }}" ]; then
if [ "$BRANCH" == "master" ]; then
tags="${tags},latest"
elif [ "$BRANCH" == "develop" ]; then
tags="${tags},develop"
fi
fi
echo "TAG=${tags}" >> $GITHUB_ENV
# this will publish to the actor (person) github packages
- name: Publish to GitHub
uses: elgohr/[email protected]
env:
R_VERSION: ${{ matrix.R }}
with:
name: ${{ github.repository_owner }}/pecan/depends
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
context: docker/depends
tags: "${{ env.TAG }}"
registry: docker.pkg.github.com
buildargs: R_VERSION

# this will publish to the clowder dockerhub repo
- name: Publish to Docker Hub
uses: elgohr/[email protected]
env:
R_VERSION: ${{ matrix.R }}
with:
name: ${{ env.DOCKERHUB_ORG }}/depends
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
context: docker/depends
tags: "${{ env.TAG }}"
buildargs: R_VERSION
Loading

0 comments on commit e423ac0

Please sign in to comment.