Skip to content

Commit

Permalink
Pull from upstream and resolve conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
Qianyu Li committed Mar 8, 2024
2 parents 59947a3 + 4564337 commit b326828
Show file tree
Hide file tree
Showing 256 changed files with 3,904 additions and 4,426 deletions.
57 changes: 57 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
#
# Add project labels
#

# Add 'Documentation' label to any changes in the documentation

'Documentation':
- book_source/**
- documentation/**
- CONTRIBUTING.md
- DEBUGING.md
- DEV-INTRO.md
- README.md

# Add 'Dockerfile' label to any changes in the docker directory
'Dockerfile':
- docker/**


# Add 'Website' label to any changes in the web directory

'Website':
- web/**

# Add 'Base' label to any changes in the base directory

'Base':
- base/**

# Add 'Models' label to any changes in the models directory

'Models':
- models/**

# Add 'Modules' label to any changes in the modules directory

'Modules':
- modules/**

# Add 'GitHub Actions' label to any changes in the .github/workflows directory

'GitHub Actions':
- .github/workflows/**

# Add 'Scripts' label to any changes in the scripts directory

'Scripts':
- scripts/**

# Add 'Tests' label to any changes in the tests directory

'Tests':
- tests/**
- '**/tests/**'
- '!**/tests/Rcheck_reference.log'


30 changes: 30 additions & 0 deletions .github/settings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#Define the colour of labels over here

labels:

- name: "Documentation"
color: a2dcf2

- name: "Dockerfile"
color: 0052CC

- name: "Website"
color: 84b6eb

- name: "Base"
color: 1ED626

- name: "Models"
color: C5DEF5

- name: "Modules"
color: FBCA04

- name: "GitHub Actions"
color: 84b6eb

- name: "Scripts"
color: 3B8924

- name: "Tests"
color: ff8c00
12 changes: 7 additions & 5 deletions .github/workflows/book.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,13 @@ jobs:

steps:
# checkout source code
- uses: actions/checkout@v3
# install rmarkdown
- name: Install rmarkdown
- uses: actions/checkout@v4
# install bookdown
- name: Install bookdown
run: |
Rscript -e 'install.packages(c("rmarkdown","bookdown"))'
Rscript \
-e 'repos <- c(getOption("repos"), sub(r"(\d{4}-\d{2}-\d{2})", "latest", getOption("repos")))' \
-e 'remotes::install_version("bookdown", ">= 0.31", dependencies = TRUE, upgrade = FALSE, repos = repos)'
# copy files
- name: copy extfiles
run: |
Expand All @@ -53,7 +55,7 @@ jobs:
# download documentation repo
- name: Checkout documentation repo
if: github.event_name == 'push'
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: ${{ github.repository_owner }}/pecan-documentation
path: pecan-documentation
Expand Down
15 changes: 8 additions & 7 deletions .github/workflows/ci-weekly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
# checkout source code
- name: work around https://github.com/actions/checkout/issues/766
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
set-safe-directory: false

Expand All @@ -53,7 +53,8 @@ jobs:
- 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
working-directory: docker/depends
run: Rscript pecan.depends.R

# initialize database
- name: db setup
Expand Down Expand Up @@ -97,15 +98,15 @@ jobs:
# checkout source code
- name: work around https://github.com/actions/checkout/issues/766
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
set-safe-directory: false

# 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
run: Rscript scripts/generate_dependencies.R && cd docker/depends && Rscript pecan.depends.R

# run PEcAn checks
- name: check
Expand Down Expand Up @@ -144,15 +145,15 @@ jobs:
# checkout source code
- name: work around https://github.com/actions/checkout/issues/766
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
set-safe-directory: false

# 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
run: Rscript scripts/generate_dependencies.R && cd docker/depends && Rscript pecan.depends.R

# initialize database
- name: db setup
Expand All @@ -162,7 +163,7 @@ jobs:

# install sipnet
- name: Check out SIPNET
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: PecanProject/sipnet
path: sipnet
Expand Down
15 changes: 8 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
# checkout source code
- name: work around https://github.com/actions/checkout/issues/766
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
set-safe-directory: false

Expand All @@ -65,7 +65,8 @@ jobs:
- 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
working-directory: docker/depends
run: Rscript pecan.depends.R

# initialize database
- name: db setup
Expand Down Expand Up @@ -111,7 +112,7 @@ jobs:
# checkout source code
- name: work around https://github.com/actions/checkout/issues/766
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
set-safe-directory: false

Expand All @@ -128,7 +129,7 @@ jobs:
- 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
run: Rscript scripts/generate_dependencies.R && cd docker/depends/ && Rscript pecan.depends.R

# run PEcAn checks
# The package names of base, modules, and models are passed as matrix variables to avoid repeatability of code
Expand Down Expand Up @@ -170,15 +171,15 @@ jobs:
# checkout source code
- name: work around https://github.com/actions/checkout/issues/766
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
set-safe-directory: false

# 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
run: Rscript scripts/generate_dependencies.R && cd docker/depends/ && Rscript pecan.depends.R

# initialize database
- name: db setup
Expand All @@ -188,7 +189,7 @@ jobs:

# install sipnet
- name: Check out SIPNET
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: PecanProject/sipnet
path: sipnet
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/depends.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches:
- develop
- master
workflow_dispatch:

# this runs on the develop branch
schedule:
Expand All @@ -27,7 +28,6 @@ jobs:
fail-fast: false
matrix:
R:
- "4.0"
- "4.1"
- "4.2"
- "4.3"
Expand All @@ -36,12 +36,12 @@ jobs:
steps:
- name: Work around https://github.com/actions/checkout/issues/766
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
set-safe-directory: false

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
with:
driver: docker
buildkitd-flags: --debug
Expand All @@ -50,7 +50,10 @@ jobs:
# calculate some variables that are used later
- name: github branch
# build Rdevel only on Mondays, others every day (but not twice on Mondays)
if: (matrix.R != 'devel' && github.event.schedule == '0 0 * * *') || (matrix.R == 'devel' && github.event.schedule == '30 1 * * 1')
if: |
github.event_name == 'workflow_dispatch' ||
(matrix.R != 'devel' && github.event.schedule == '0 0 * * *') ||
(matrix.R == 'devel' && github.event.schedule == '30 1 * * 1')
run: |
BRANCH=${GITHUB_REF##*/}
echo "GITHUB_BRANCH=${BRANCH}" >> $GITHUB_ENV
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ jobs:
steps:
- name: Work around https://github.com/actions/checkout/issues/766
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
set-safe-directory: false
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
with:
driver: docker
buildkitd-flags: --debug
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:

steps:
- name: Checkout source code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Run tests
run: |
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/prlabeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# This workflow is based on github action official label action v4.
# This workflow action is triggered on pull request event(on both fork & inside repo)
# Labels will be applied based on filepath modification in PR.
# This workflow uses a regex based labeling config file(.github/labeler.yml) to take labeling decision.

name: "PR Labeler"
on:
- pull_request_target
jobs:
label:
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest

steps:
- uses: actions/labeler@v4
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
configuration-path: ".github/labeler.yml"
sync-labels: false
dot: true
9 changes: 5 additions & 4 deletions .github/workflows/styler-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
run: echo '${{ steps.file_changes.outputs.files_modified }}'
- name: work around https://github.com/actions/checkout/issues/766
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
set-safe-directory: false
- uses: r-lib/actions/pr-fetch@master
Expand Down Expand Up @@ -51,7 +51,7 @@ jobs:
steps:
- name: work around https://github.com/actions/checkout/issues/766
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
set-safe-directory: false
- uses: r-lib/actions/pr-fetch@v1
Expand All @@ -62,7 +62,8 @@ jobs:
- name: install any new dependencies
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
run: Rscript docker/depends/pecan.depends.R
working-directory: docker/depends
run: Rscript pecan.depends.R
- id: file_changes
uses: trilom/[email protected]
- name : make
Expand All @@ -82,7 +83,7 @@ jobs:
run: |
git config --global user.email "[email protected]"
git config --global user.name "PEcAn stylebot"
git add \*.Rd \*NAMESPACE Makefile.depends docker/depends/pecan.depends.R
git add \*.Rd \*NAMESPACE Makefile.depends docker/depends/pecan_package_dependencies.R docker/depends/pecan_deps_from_github.txt
if [ "$(git diff --name-only --cached)" != "" ]; then git commit -m 'automated documentation update' ; fi
- uses: r-lib/actions/pr-push@master
with:
Expand Down
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,8 @@ clean:
+ ./scripts/time.sh "roxygen2 ${1}" Rscript -e ${SETROPTIONS} \
-e "if (!requireNamespace('roxygen2', quietly = TRUE)" \
-e " || packageVersion('roxygen2') != '7.2.3') {" \
-e " devtools::install_github('r-lib/[email protected]')" \
-e " cran <- c(getOption('repos'), 'cloud.r-project.org')" \
-e " remotes::install_version('roxygen2', '7.2.3', repos = cran, upgrade = FALSE)" \
-e "}"
$(eval INSTALLED_ROXYGEN_VERSION := 7.2.3)
echo `date` > $@
Expand Down
Loading

0 comments on commit b326828

Please sign in to comment.