Skip to content

Commit 1f4c805

Browse files
authored
Merge pull request #3311 from PecanProject/release/v1.8.0
release v1.8.0
2 parents 166f285 + 9ced374 commit 1f4c805

File tree

1,491 files changed

+54689
-18402
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,491 files changed

+54689
-18402
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
- [ ] Immediately
1515
- [ ] Within one week
1616
- [ ] When possible
17+
1718
## Types of changes
1819
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
1920
- [ ] Bug fix (non-breaking change which fixes an issue) <!-- please add issue number -->
@@ -24,6 +25,7 @@
2425
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
2526
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
2627
- [ ] My change requires a change to the documentation.
28+
- [ ] My name is in the list of CITATION.cff
2729
- [ ] I have updated the CHANGELOG.md.
2830
- [ ] I have updated the documentation accordingly.
2931
- [ ] I have read the **CONTRIBUTING** document.

.github/labeler.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
#
2+
# Add project labels
3+
#
4+
5+
# Add 'Documentation' label to any changes in the documentation
6+
7+
'Documentation':
8+
- book_source/**
9+
- documentation/**
10+
- CONTRIBUTING.md
11+
- DEBUGING.md
12+
- DEV-INTRO.md
13+
- README.md
14+
15+
# Add 'Dockerfile' label to any changes in the docker directory
16+
'Dockerfile':
17+
- docker/**
18+
19+
20+
# Add 'Website' label to any changes in the web directory
21+
22+
'Website':
23+
- web/**
24+
25+
# Add 'Base' label to any changes in the base directory
26+
27+
'Base':
28+
- base/**
29+
30+
# Add 'Models' label to any changes in the models directory
31+
32+
'Models':
33+
- models/**
34+
35+
# Add 'Modules' label to any changes in the modules directory
36+
37+
'Modules':
38+
- modules/**
39+
40+
# Add 'GitHub Actions' label to any changes in the .github/workflows directory
41+
42+
'GitHub Actions':
43+
- .github/workflows/**
44+
45+
# Add 'Scripts' label to any changes in the scripts directory
46+
47+
'Scripts':
48+
- scripts/**
49+
50+
# Add 'Tests' label to any changes in the tests directory
51+
52+
'Tests':
53+
- tests/**
54+
- '**/tests/**'
55+
- '!**/tests/Rcheck_reference.log'
56+
57+

.github/settings.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#Define the colour of labels over here
2+
3+
labels:
4+
5+
- name: "Documentation"
6+
color: a2dcf2
7+
8+
- name: "Dockerfile"
9+
color: 0052CC
10+
11+
- name: "Website"
12+
color: 84b6eb
13+
14+
- name: "Base"
15+
color: 1ED626
16+
17+
- name: "Models"
18+
color: C5DEF5
19+
20+
- name: "Modules"
21+
color: FBCA04
22+
23+
- name: "GitHub Actions"
24+
color: 84b6eb
25+
26+
- name: "Scripts"
27+
color: 3B8924
28+
29+
- name: "Tests"
30+
color: ff8c00

.github/workflows/book.yml

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ on:
55
branches:
66
- master
77
- develop
8-
98
tags:
109
- '*'
11-
1210
pull_request:
11+
merge_group:
12+
workflow_dispatch:
1313

1414
jobs:
1515
bookdown:
@@ -18,48 +18,53 @@ jobs:
1818
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
1919

2020
container:
21-
image: pecan/depends:R4.0.3
21+
image: pecan/depends:R4.1
2222

2323
steps:
2424
# checkout source code
25-
- uses: actions/checkout@v2
26-
# install rmarkdown
27-
- name: Install rmarkdown
25+
- uses: actions/checkout@v4
26+
# install bookdown
27+
- name: Install bookdown
2828
run: |
29-
Rscript -e 'install.packages(c("rmarkdown","bookdown"))'
29+
Rscript \
30+
-e 'repos <- c(getOption("repos"), sub(r"(\d{4}-\d{2}-\d{2})", "latest", getOption("repos")))' \
31+
-e 'remotes::install_version("bookdown", ">= 0.31", dependencies = TRUE, upgrade = FALSE, repos = repos)'
3032
# copy files
3133
- name: copy extfiles
3234
run: |
3335
mkdir -p book_source/extfiles
3436
cp -f documentation/tutorials/01_Demo_Basic_Run/extfiles/* book_source/extfiles
3537
# compile PEcAn code
36-
- name: build
37-
run: make -j1
38+
- name: build needed modules
39+
run: |
40+
R CMD INSTALL base/logger
41+
R CMD INSTALL base/remote
42+
R CMD INSTALL base/utils
3843
# render book
3944
- name: Render Book
4045
run: |
4146
cd book_source
4247
Rscript -e 'options(bookdown.render.file_scope=FALSE); bookdown::render_book("index.Rmd", "bookdown::gitbook")'
4348
# save artifact
44-
- uses: actions/upload-artifact@v2
49+
- uses: actions/upload-artifact@v3
4550
with:
4651
name: pecan-documentation
4752
path: book_source/_book/
4853
# download documentation repo
4954
- name: Checkout documentation repo
50-
if: github.event_name != 'pull_request'
51-
uses: actions/checkout@v2
55+
if: github.event_name == 'push'
56+
uses: actions/checkout@v4
5257
with:
5358
repository: ${{ github.repository_owner }}/pecan-documentation
5459
path: pecan-documentation
5560
token: ${{ secrets.GH_PAT }}
5661
# upload new documentation
5762
- name: publish to github
58-
if: github.event_name != 'pull_request'
63+
if: github.event_name == 'push'
5964
run: |
6065
git config --global user.email "pecanproj@gmail.com"
6166
git config --global user.name "GitHub Documentation Robot"
62-
export VERSION=${GITHUB_REF##*/}
67+
export VERSION=$(echo $GITHUB_REF | sed 's,.*/,,' )
6368
cd pecan-documentation
6469
mkdir -p $VERSION
6570
rsync -a --delete ../book_source/_book/ ${VERSION}/

.github/workflows/check.yml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: check
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
R-version:
7+
required: true
8+
type: string
9+
make-grouping:
10+
required: true
11+
type: string
12+
13+
env:
14+
R_LIBS_USER: /usr/local/lib/R/site-library
15+
LC_ALL: en_US.UTF-8
16+
NCPUS: 2
17+
PGHOST: postgres
18+
CI: true
19+
20+
jobs:
21+
check:
22+
runs-on: ubuntu-latest
23+
24+
env:
25+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
26+
_R_CHECK_LENGTH_1_CONDITION_: true
27+
_R_CHECK_LENGTH_1_LOGIC2_: true
28+
# Avoid compilation check warnings that come from the system Makevars
29+
# See https://stat.ethz.ch/pipermail/r-package-devel/2019q2/003898.html
30+
_R_CHECK_COMPILATION_FLAGS_KNOWN_: -Wformat -Werror=format-security -Wdate-time
31+
# Keep R checks from trying to consult the very flaky worldclockapi.com
32+
_R_CHECK_SYSTEM_CLOCK_: 0
33+
34+
container:
35+
image: pecan/depends:R${{ inputs.R-version }}
36+
37+
steps:
38+
# checkout source code
39+
- name: work around https://github.com/actions/checkout/issues/766
40+
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
41+
- uses: actions/checkout@v4
42+
with:
43+
set-safe-directory: false
44+
45+
# Forbid spaces in names. Yes, *we* know it's not 1980 anymore, but Make doesn't.
46+
- name: check for filenames that would confuse Make
47+
run: |
48+
SPACENAMES=`find . -name '* *'`
49+
if [ -n "$SPACENAMES" ]; then
50+
echo "::error file=${SPACENAMES}::Spaces in filename(s): ${SPACENAMES}. Please rename these files by converting spaces to underscores."
51+
exit 1
52+
fi
53+
54+
# install additional tools needed
55+
- name: install utils
56+
run: apt-get update && apt-get install -y postgresql-client qpdf
57+
- name: install new dependencies
58+
run: Rscript scripts/generate_dependencies.R && cd docker/depends && Rscript pecan.depends.R
59+
60+
# run PEcAn checks
61+
# The package names of base, modules, and models are passed as matrix variables to avoid repeatability of code
62+
- name: check
63+
run: make -j1 ${{ inputs.make-grouping }}
64+
env:
65+
REBUILD_DOCS: "FALSE"
66+
RUN_TESTS: "FALSE"
67+
68+
- name: check for out-of-date files
69+
uses: infotroph/tree-is-clean@v1

.github/workflows/ci-weekly.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Weekly Checks
2+
3+
on:
4+
# every Monday at 4:30 AM
5+
# (hopefully after the 1:30 AM `depends` build has completed)
6+
schedule:
7+
- cron: '30 4 * * 1'
8+
workflow_dispatch:
9+
10+
jobs:
11+
test:
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
R:
16+
- "devel"
17+
uses: ./.github/workflows/test.yml
18+
with:
19+
R-version: ${{ matrix.R }}
20+
secrets: inherit
21+
22+
check:
23+
strategy:
24+
fail-fast: false
25+
matrix:
26+
R:
27+
- "devel"
28+
uses: ./.github/workflows/check.yml
29+
with:
30+
R-version: ${{ matrix.R }}
31+
make-grouping: "check"
32+
secrets: inherit
33+
34+
sipnet:
35+
strategy:
36+
fail-fast: false
37+
matrix:
38+
R:
39+
- "devel"
40+
uses: ./.github/workflows/sipnet.yml
41+
with:
42+
R-version: ${{ matrix.R }}
43+
secrets: inherit

0 commit comments

Comments
 (0)