From e1dcb2c15a1062c3d6a674cca8211de8e5f1d7ed Mon Sep 17 00:00:00 2001 From: Rob Kooper Date: Sun, 8 Sep 2024 17:05:24 -0500 Subject: [PATCH 1/2] rename master to main/latest github.io == latest github.com == main --- .github/workflows/book.yml | 7 +- .github/workflows/ci.yml | 5 +- .github/workflows/depends.yml | 102 ------------------ .github/workflows/docker.yml | 2 +- CONTRIBUTING.md | 14 +-- DEV-INTRO.md | 6 +- README.md | 2 +- .../01_install_pecan.Rmd | 2 +- .../02_user_demos/01_introductions_user.Rmd | 16 +-- .../03_web_workflow.Rmd | 2 +- .../02_git/01_using-git.Rmd | 8 +- book_source/03_topical_pages/03_pecan_xml.Rmd | 2 +- book_source/03_topical_pages/05_models/ed.Rmd | 2 +- .../03_topical_pages/09_standalone_tools.Rmd | 2 +- .../03_topical_pages/11_adding_to_pecan.Rmd | 2 +- .../12_troubleshooting-pecan.Rmd | 6 +- .../03_topical_pages/92_workflow_modules.Rmd | 2 +- .../03_install_OS/05_install_BETY.Rmd | 2 +- .../94_docker/02_quickstart.Rmd | 8 +- book_source/04_appendix/03_courses_taught.Rmd | 4 +- docker.sh | 6 +- documentation/index_vm.html | 2 +- .../tutorials/01_Demo_Basic_Run/Demo01.Rmd | 2 +- .../02_Demo_Uncertainty_Analysis/Demo02.Rmd | 4 +- .../tutorials/MCMC/MCMC_Concepts.Rmd | 4 +- documentation/tutorials/deploy.sh | 2 +- models/biocro/R/model2netcdf.BIOCRO.R | 2 +- models/maespa/R/write.config.MAESPA.R | 2 +- models/sibcasa/R/met2model.SIBCASA.R | 2 +- models/template/R/met2model.MODEL.R | 2 +- .../assim.sequential/inst/NEFI/README.html | 2 +- modules/data.atmosphere/README.md | 2 +- .../inst/scripts/cruncep/README.md | 2 +- .../inst/scripts/ncep/README.md | 2 +- .../vignettes/ameriflux_demo.Rmd | 4 +- .../inst/RpTools/RpTools/biophys_xarray.py | 4 +- modules/priors/vignettes/priors_demo.Rmd | 4 +- modules/uncertainty/R/ensemble.R | 2 +- .../uncertainty/man/write.ensemble.configs.Rd | 2 +- release.sh | 6 +- web/02-modelsite.php | 2 +- web/07-analysis.php | 2 +- web/08-finished.php | 2 +- web/common.php | 2 +- 44 files changed, 81 insertions(+), 181 deletions(-) delete mode 100644 .github/workflows/depends.yml diff --git a/.github/workflows/book.yml b/.github/workflows/book.yml index a7551fdf2f2..240ebd88774 100644 --- a/.github/workflows/book.yml +++ b/.github/workflows/book.yml @@ -3,7 +3,7 @@ name: renderbook on: push: branches: - - master + - main - develop tags: - '*' @@ -65,9 +65,12 @@ jobs: git config --global user.email "pecanproj@gmail.com" git config --global user.name "GitHub Documentation Robot" export VERSION=$(echo $GITHUB_REF | sed 's,.*/,,' ) + if [ "$VERSION" == "main" ]; then + export VERSION=latest + fi 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 + git push -q origin main diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3bc37aa5a17..24ef77419b5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,11 +3,10 @@ name: CI on: push: branches: - - master + - main - develop - tags: - - '*' + - "v*.*.*" pull_request: merge_group: issue_comment: diff --git a/.github/workflows/depends.yml b/.github/workflows/depends.yml deleted file mode 100644 index 7416d7486de..00000000000 --- a/.github/workflows/depends.yml +++ /dev/null @@ -1,102 +0,0 @@ -name: Docker Depends Image - -on: - push: - branches: - - develop - - master - workflow_dispatch: - - # this runs on the develop branch - schedule: - - cron: '0 0 * * *' # midnight daily - - cron: '30 1 * * 1' # 1:30 AM every Monday (devel only) - -env: - # official supported version of R - SUPPORTED: 4.1 - 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.1" - - "4.2" - - "4.3" - - "4.4" - - "devel" - - steps: - - name: Work around https://github.com/actions/checkout/issues/766 - run: git config --global --add safe.directory "$GITHUB_WORKSPACE" - - uses: actions/checkout@v4 - with: - set-safe-directory: false - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - with: - driver: docker - buildkitd-flags: --debug - install: true - - # calculate some variables that are used later - - name: github branch - # build weekly-tested versions only on Mondays, others every day - # (but not twice on Mondays) - if: | - github.event_name == 'workflow_dispatch' || - (contains(fromJSON('["4.1", "4.2", "4.4"]'), matrix.R) - && github.event.schedule == '0 0 * * *') || - (contains(fromJSON('["4.3", "devel"]'), matrix.R) - && github.event.schedule == '30 1 * * 1') - 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 - if: env.TAG != '' - uses: elgohr/Publish-Docker-Github-Action@v5 - 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 - if: env.TAG != '' - uses: elgohr/Publish-Docker-Github-Action@v5 - 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 diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 46ac384c5b7..807e621f5d8 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -4,11 +4,11 @@ on: push: branches: - main - - master - develop tags: - "v*.*.*" pull_request: + merge_group: workflow_dispatch: inputs: r_version: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d1118f69680..b6f7fa7a783 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -45,7 +45,7 @@ Switch pecan to your fork git remote set-url origin https://github.com//pecan.git ``` -Setup pecan to be able to fetch from the master/develop +Setup pecan to be able to fetch from the main/develop ```bash git remote add upstream https://github.com/PecanProject/pecan.git @@ -53,13 +53,13 @@ git remote add upstream https://github.com/PecanProject/pecan.git ## PEcAn Branches -PEcAn uses two protected branches, the master branch and the develop branch. The master branch will match the official releases, but all work will be done on the develop branch. Make sure that you create branches from the develop branch. This should be the default branch in your git repository. +PEcAn uses two protected branches, the main branch and the develop branch. The main branch will match the official releases, but all work will be done on the develop branch. Make sure that you create branches from the develop branch. This should be the default branch in your git repository. ## Adding Features When you add a new feature always create an issue first, this allows others to comment and give you tips. It will also help us keep track of what people are adding and with new releases helps us to write new release notes and give you credit for your work. -Secondly always work in a branch, never work on the master or develop branch. Keep your master and develop branch in sync with the master and develop of the official PEcAn repository. This makes the pull requests (you do want your work to be in the main branch right?) easier for us. +Secondly always work in a branch, never work on the main or develop branch. Keep your main and develop branch in sync with the main and develop of the official PEcAn repository. This makes the pull requests (you do want your work to be in the main branch right?) easier for us. Finally try to keep your branches focused on fixing/adding only one feature and try not fall in the trap of doing a lot of things in a single branch. This will not only make it harder for us to process your pull request but makes it take longer before you can submit your pull request. Small pull requests are more likely to be looked at faster and pulled into the develop branch faster. @@ -112,7 +112,7 @@ git push -u origin GH-issuenumber-title-of-issue ## Additional Resources -- [Adding models to PEcAn](https://pecanproject.github.io/pecan-documentation/master/adding-an-ecosystem-model.html) -- [PEcAn configuration files](https://pecanproject.github.io/pecan-documentation/master/pecan-xml-configuration.html) -- [Development help](https://pecanproject.github.io/pecan-documentation/master/developer-guide.html) -- [PEcAn Code of Conduct](https://pecanproject.github.io/pecan-documentation/master/contributor-covenant-code-of-conduct.html) +- [Adding models to PEcAn](https://pecanproject.github.io/pecan-documentation/latest/adding-an-ecosystem-model.html) +- [PEcAn configuration files](https://pecanproject.github.io/pecan-documentation/latest/pecan-xml-configuration.html) +- [Development help](https://pecanproject.github.io/pecan-documentation/latest/developer-guide.html) +- [PEcAn Code of Conduct](https://pecanproject.github.io/pecan-documentation/latest/contributor-covenant-code-of-conduct.html) diff --git a/DEV-INTRO.md b/DEV-INTRO.md index 465a071f9ff..59bde74b01a 100644 --- a/DEV-INTRO.md +++ b/DEV-INTRO.md @@ -1,6 +1,6 @@ # PEcAn Development -This is a minimal guide to getting started with PEcAn development under Docker. You can find more information about docker in the [pecan documentation](https://pecanproject.github.io/pecan-documentation/master/docker-index.html). +This is a minimal guide to getting started with PEcAn development under Docker. You can find more information about docker in the [pecan documentation](https://pecanproject.github.io/pecan-documentation/latest/docker-index.html). ## Requirements and Recommendations @@ -29,7 +29,7 @@ cd pecan ## Developing in Docker -The use of Docker in PEcAn is described in detail in the [PEcAn documentation](https://pecanproject.github.io/pecan-documentation/master/docker-index.html). This is intended as a quick start. +The use of Docker in PEcAn is described in detail in the [PEcAn documentation](https://pecanproject.github.io/pecan-documentation/latest/docker-index.html). This is intended as a quick start. ### Installing Docker @@ -61,7 +61,7 @@ You can now use the command `docker compose` to work with the containers setup f ### First time setup -The steps in this section only need to be done the first time you start working with the stack in docker. After this is done you can skip these steps. You can find more detail about the docker commands in the [pecan documentation](https://pecanproject.github.io/pecan-documentation/master/docker-index.html). +The steps in this section only need to be done the first time you start working with the stack in docker. After this is done you can skip these steps. You can find more detail about the docker commands in the [pecan documentation](https://pecanproject.github.io/pecan-documentation/latest/docker-index.html). - setup .env file - create folders to hold the data diff --git a/README.md b/README.md index 06b84f1e938..c30370067e5 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ PEcAn is not itself an ecosystem model, and it can be used to with a variety of ## Documentation -Consult documentation of the PEcAn Project; either the [latest stable development](https://pecanproject.github.io/pecan-documentation/develop/) branch, the latest [release](https://pecanproject.github.io/pecan-documentation/master/). Documentation from [earlier releases is here](https://pecanproject.github.io/documentation.html). +Consult documentation of the PEcAn Project; either the [latest stable development](https://pecanproject.github.io/pecan-documentation/develop/) branch, the latest [release](https://pecanproject.github.io/pecan-documentation/latest/). Documentation from [earlier releases is here](https://pecanproject.github.io/documentation.html). ## Getting Started diff --git a/book_source/02_demos_tutorials_workflows/01_install_pecan.Rmd b/book_source/02_demos_tutorials_workflows/01_install_pecan.Rmd index eb26d63e729..1d038862542 100644 --- a/book_source/02_demos_tutorials_workflows/01_install_pecan.Rmd +++ b/book_source/02_demos_tutorials_workflows/01_install_pecan.Rmd @@ -81,7 +81,7 @@ This will not go into much detail about about how to use Docker -- for more deta This should print the current version of docker-compose. We have tested the instruction below with versions of docker compose 1.22 and above. -3. **Download the PEcAn docker compose file**. It is located in the root directory of the [PEcAn source code](https://github.com/pecanproject/pecan). For reference, here are direct links to the [latest stable version](https://raw.githubusercontent.com/PecanProject/pecan/master/docker-compose.yml) and the [bleeding edge development version](https://raw.githubusercontent.com/PecanProject/pecan/develop/docker-compose.yml). (To download the files, you should be able to right click the link and select "Save link as".) Make sure the file is saved as `docker-compose.yml` in a directory called `pecan`. +3. **Download the PEcAn docker compose file**. It is located in the root directory of the [PEcAn source code](https://github.com/pecanproject/pecan). For reference, here are direct links to the [latest stable version](https://raw.githubusercontent.com/PecanProject/pecan/main/docker-compose.yml) and the [bleeding edge development version](https://raw.githubusercontent.com/PecanProject/pecan/develop/docker-compose.yml). (To download the files, you should be able to right click the link and select "Save link as".) Make sure the file is saved as `docker-compose.yml` in a directory called `pecan`. 4. **Initialize the PEcAn database and data images**. The following `docker compose` commands are used to download all the data PEcAn needs to start working. For more on how they work, see our [Docker topical pages](#pecan-docker-quickstart-init). diff --git a/book_source/02_demos_tutorials_workflows/02_user_demos/01_introductions_user.Rmd b/book_source/02_demos_tutorials_workflows/02_user_demos/01_introductions_user.Rmd index c9bdc0e81b9..2487ab7a9d3 100644 --- a/book_source/02_demos_tutorials_workflows/02_user_demos/01_introductions_user.Rmd +++ b/book_source/02_demos_tutorials_workflows/02_user_demos/01_introductions_user.Rmd @@ -13,16 +13,16 @@ The following Tutorials assume you have installed PEcAn. If you have not, please |Type|Title|Web Link| Source Rmd| |:--:|:---:|:------:|:---------:| |Demo| Basic Run| [html](#demo-1) | [Rmd](https://github.com/PecanProject/pecan/blob/develop/documentation/tutorials/01_Demo_Basic_Run/Demo01.Rmd)| -|Demo| Uncertainty Analysis| [html](#demo-2) | [Rmd](https://github.com/PecanProject/pecan/tree/master/documentation/tutorials/02_Demo_Uncertainty_Analysis)| +|Demo| Uncertainty Analysis| [html](#demo-2) | [Rmd](https://github.com/PecanProject/pecan/tree/main/documentation/tutorials/02_Demo_Uncertainty_Analysis)| |Demo| Output Analysis|html |[Rmd](https://github.com/PecanProject/pecan/tree/develop/documentation/tutorials/AnalyzeOutput)| |Demo| MCMC |html|[Rmd](https://github.com/PecanProject/pecan/tree/develop/documentation/tutorials/MCMC)| |Demo|Parameter Assimilation |html |[Rmd](https://github.com/PecanProject/pecan/tree/develop/documentation/tutorials/ParameterAssimilation)| |Demo|State Assimilation|html|[Rmd](https://github.com/PecanProject/pecan/tree/develop/documentation/tutorials/StateAssimilation)| |Demo| Sensitivity|html|[Rmd](https://github.com/PecanProject/pecan/tree/develop/documentation/tutorials/sensitivity)| -|Vignette|Allometries|html|[Rmd](https://github.com/PecanProject/pecan/blob/master/modules/allometry/vignettes/AllomVignette.Rmd)| -|Vignette|MCMC|html|[Rmd](https://github.com/PecanProject/pecan/blob/master/modules/assim.batch/vignettes/AssimBatchVignette.Rmd)| -|Vignette|Meteorological Data|html|[Rmd](https://github.com/PecanProject/pecan/tree/master/modules/data.atmosphere/vignettes)| -|Vignette|Meta-Analysis|html|[Rmd](https://github.com/PecanProject/pecan/blob/master/modules/meta.analysis/vignettes/single.MA_demo.Rmd)| -|Vignette|Photosynthetic Response Curves|html|[Rmd](https://github.com/PecanProject/pecan/blob/master/modules/photosynthesis/vignettes/ResponseCurves.Rmd)| -|Vignette|Priors|html|[Rmd](https://github.com/PecanProject/pecan/blob/master/modules/priors/vignettes/priors_demo.Rmd)| -|Vignette|Leaf Spectra:PROSPECT inversion|html|[Rmd](https://github.com/PecanProject/pecan/blob/master/modules/rtm/vignettes/pecanrtm.vignette.Rmd)| +|Vignette|Allometries|html|[Rmd](https://github.com/PecanProject/pecan/blob/main/modules/allometry/vignettes/AllomVignette.Rmd)| +|Vignette|MCMC|html|[Rmd](https://github.com/PecanProject/pecan/blob/main/modules/assim.batch/vignettes/AssimBatchVignette.Rmd)| +|Vignette|Meteorological Data|html|[Rmd](https://github.com/PecanProject/pecan/tree/main/modules/data.atmosphere/vignettes)| +|Vignette|Meta-Analysis|html|[Rmd](https://github.com/PecanProject/pecan/blob/main/modules/meta.analysis/vignettes/single.MA_demo.Rmd)| +|Vignette|Photosynthetic Response Curves|html|[Rmd](https://github.com/PecanProject/pecan/blob/main/modules/photosynthesis/vignettes/ResponseCurves.Rmd)| +|Vignette|Priors|html|[Rmd](https://github.com/PecanProject/pecan/blob/main/modules/priors/vignettes/priors_demo.Rmd)| +|Vignette|Leaf Spectra:PROSPECT inversion|html|[Rmd](https://github.com/PecanProject/pecan/blob/main/modules/rtm/vignettes/pecanrtm.vignette.Rmd)| diff --git a/book_source/02_demos_tutorials_workflows/03_web_workflow.Rmd b/book_source/02_demos_tutorials_workflows/03_web_workflow.Rmd index 997c4d5faa0..350fd2b27c5 100644 --- a/book_source/02_demos_tutorials_workflows/03_web_workflow.Rmd +++ b/book_source/02_demos_tutorials_workflows/03_web_workflow.Rmd @@ -200,7 +200,7 @@ At the moment, what is functional is a prototype workflow that works for invento This tool works with an internal copy of the FIA that is uploaded to a postGRES database along side BETY, however for space reasons this database does not ship with the PEcAn VM. To turn this feature on: 1. Download and Install the FIA database. Instructions in [Installing data for PEcAn] -2. For web-base runs, specify the database settings in the [config.php](https://github.com/PecanProject/pecan/blob/master/web/config.example.php) +2. For web-base runs, specify the database settings in the [config.php](https://github.com/PecanProject/pecan/blob/main/web/config.example.php) 3. For R-based runs, specify the database settings in the [THE PEcAn XML] More detailed information on how PEcAn processes inputs can be found on our [Input Conversion]page. diff --git a/book_source/02_demos_tutorials_workflows/05_developer_workflows/02_git/01_using-git.Rmd b/book_source/02_demos_tutorials_workflows/05_developer_workflows/02_git/01_using-git.Rmd index 3a25be86f07..c4054bde55b 100644 --- a/book_source/02_demos_tutorials_workflows/05_developer_workflows/02_git/01_using-git.Rmd +++ b/book_source/02_demos_tutorials_workflows/05_developer_workflows/02_git/01_using-git.Rmd @@ -48,7 +48,7 @@ We follow branch organization laid out on [this page](http://nvie.com/posts/a-su In short, there are three main branches you must be aware of: * **develop** - Main Branch containing the latest code. This is the main branch you will make changes to. -* **master** - Branch containing the latest stable code. DO NOT MAKE CHANGES TO THIS BRANCH. +* **main** - Branch containing the latest stable code. DO NOT MAKE CHANGES TO THIS BRANCH. * **release/vX.X.X** - Named branches containing code specific to a release. Only make changes to this branch if you are fixing a bug on a release branch. #### Milestones, Issues, Tasks @@ -121,7 +121,7 @@ git remote add upstream git@github.com:PecanProject/pecan.git ##### Hint: Keeping your fork in sync -If you have used the instructions above, you can use the helper script called [`scripts/syncgit.sh`](https://github.com/PecanProject/pecan/blob/master/scripts/syncgit.sh) to keep the master and develop branches of your own fork in sync with the PEcAnProject/pecan repository. +If you have used the instructions above, you can use the helper script called [`scripts/syncgit.sh`](https://github.com/PecanProject/pecan/blob/main/scripts/syncgit.sh) to keep the main and develop branches of your own fork in sync with the PEcAnProject/pecan repository. After following the above, your .git/config file will include the following: @@ -144,7 +144,7 @@ Then, you can run: ./scripts/syncgit.sh ``` -Now the master and develop branches on your fork will be up to date. +Now the main and develop branches on your fork will be up to date. #### Using Branching @@ -199,7 +199,7 @@ git push origin #### After pull request is merged -1. Make sure you start in master +1. Make sure you start in main ```sh git checkout develop` diff --git a/book_source/03_topical_pages/03_pecan_xml.Rmd b/book_source/03_topical_pages/03_pecan_xml.Rmd index aab32686fe4..4e6e6715a6a 100644 --- a/book_source/03_topical_pages/03_pecan_xml.Rmd +++ b/book_source/03_topical_pages/03_pecan_xml.Rmd @@ -473,7 +473,7 @@ PEcAn tries to detect and throw informative errors when dates are out of bounds The following tags are optional run settings that apply to any model: -* `jobtemplate`: the template used when creating a `job.sh` file, which is used to launch the actual model. Each model has its own default template in the `inst` folder of the corresponding R package (for instance, here is the one for [ED2](https://github.com/PecanProject/pecan/blob/master/models/ed/inst/template.job)). The following variables can be used: `@SITE_LAT@`, `@SITE_LON@`, `@SITE_MET@`, `@START_DATE@`, `@END_DATE@`, `@OUTDIR@`, `@RUNDIR@` which all come variables in the `pecan.xml` file. The following two command can be used to copy and clean the results from a scratch folder (specified as scratch in the run section below, for example local disk vs network disk) : `@SCRATCH_COPY@`, `@SCRATCH_CLEAR@`. +* `jobtemplate`: the template used when creating a `job.sh` file, which is used to launch the actual model. Each model has its own default template in the `inst` folder of the corresponding R package (for instance, here is the one for [ED2](https://github.com/PecanProject/pecan/blob/main/models/ed/inst/template.job)). The following variables can be used: `@SITE_LAT@`, `@SITE_LON@`, `@SITE_MET@`, `@START_DATE@`, `@END_DATE@`, `@OUTDIR@`, `@RUNDIR@` which all come variables in the `pecan.xml` file. The following two command can be used to copy and clean the results from a scratch folder (specified as scratch in the run section below, for example local disk vs network disk) : `@SCRATCH_COPY@`, `@SCRATCH_CLEAR@`. * `stop_on_error`: (logical) Whether the workflow should immediately terminate if _any_ of the model runs fail. If unset, this defaults to `TRUE` unless you are running an ensemble simulation (and ensemble size is greater than 1). diff --git a/book_source/03_topical_pages/05_models/ed.Rmd b/book_source/03_topical_pages/05_models/ed.Rmd index eaa9c46ca21..a94df3b9d45 100644 --- a/book_source/03_topical_pages/05_models/ed.Rmd +++ b/book_source/03_topical_pages/05_models/ed.Rmd @@ -171,7 +171,7 @@ ED2 is configured using 2 files which are placed in the run folder. * **ED2IN** : template for this file is located at models/ed/inst/ED2IN.\. The values in this template that need to be modified are described below and are surrounded with @ symbols. * **config.xml** : this file is generated by PEcAn. Some values are stored in the pecan.xml in \\\ section as well as in \ section. -An example of the template can be found in [ED2IN.r82](https://github.com/PecanProject/pecan/blob/master/models/ed/inst/ED2IN.r82) +An example of the template can be found in [ED2IN.r82](https://github.com/PecanProject/pecan/blob/main/models/ed/inst/ED2IN.r82) The ED2IN template can contain the following variables. These will be replaced with actual values when the model configuration is written. diff --git a/book_source/03_topical_pages/09_standalone_tools.Rmd b/book_source/03_topical_pages/09_standalone_tools.Rmd index f9ca555a796..9462799e87b 100644 --- a/book_source/03_topical_pages/09_standalone_tools.Rmd +++ b/book_source/03_topical_pages/09_standalone_tools.Rmd @@ -43,7 +43,7 @@ To load the Ameriflux data for the Harvard Forest (US-Ha1) site. bety = PEcAn.DB::betyConnect(php.config = "pecan/web/config.php") ``` - where the complete path to the `config.php` is specified. See [here](https://github.com/PecanProject/pecan/blob/master/web/config.example.php) for an example `config.php` file. + where the complete path to the `config.php` is specified. See [here](https://github.com/PecanProject/pecan/blob/main/web/config.example.php) for an example `config.php` file. 2. Look up the inputs record for the data in BETY. diff --git a/book_source/03_topical_pages/11_adding_to_pecan.Rmd b/book_source/03_topical_pages/11_adding_to_pecan.Rmd index ed86407b6e3..224e893d279 100644 --- a/book_source/03_topical_pages/11_adding_to_pecan.Rmd +++ b/book_source/03_topical_pages/11_adding_to_pecan.Rmd @@ -149,7 +149,7 @@ The new variable can be used to create a prior distribution for it as in the "Cr #### Setting up the module directory (required) -PEcAn assumes that the interface modules are available as an R package in the models directory named after the model in question. The simplest way to get started on that R package is to make a copy the [_template_](https://github.com/PecanProject/pecan/tree/master/models/template) directory in the pecan/models folder and re-name it to the name of your model. In the code, filenames, and examples below you will want to substitute the word **MODEL** for the name of your model (note: R is case-sensitive). +PEcAn assumes that the interface modules are available as an R package in the models directory named after the model in question. The simplest way to get started on that R package is to make a copy the [_template_](https://github.com/PecanProject/pecan/tree/main/models/template) directory in the pecan/models folder and re-name it to the name of your model. In the code, filenames, and examples below you will want to substitute the word **MODEL** for the name of your model (note: R is case-sensitive). If you do not want to write the interface modules in R then it is fairly simple to set up the R functions describe below to just call the script you want to run using R's _system_ command. Scripts that are not R functions should be placed in the _inst_ folder and R can look up the location of these files using the function _system.file_ which takes as arguments the _local_ path of the file within the package folder and the name of the package (typically PEcAn.MODEL). For example diff --git a/book_source/03_topical_pages/12_troubleshooting-pecan.Rmd b/book_source/03_topical_pages/12_troubleshooting-pecan.Rmd index 5d75b628b43..131eb071ec6 100755 --- a/book_source/03_topical_pages/12_troubleshooting-pecan.Rmd +++ b/book_source/03_topical_pages/12_troubleshooting-pecan.Rmd @@ -36,7 +36,7 @@ The next step is to add `debugonce()` before running the t This allows you can step through the function and evaluate the different objects as they are created and/or transformed. -See [tests README](https://github.com/PecanProject/pecan/blob/master/tests/README.md) for more information. +See [tests README](https://github.com/PecanProject/pecan/blob/main/tests/README.md) for more information. @@ -44,7 +44,7 @@ See [tests README](https://github.com/PecanProject/pecan/blob/master/tests/READM The following scripts (in `qaqc/vignettes` identify, respectively: -1. [relationships among functions across packages](https://github.com/PecanProject/pecan/blob/master/qaqc/vignettes/function_relationships.Rmd) -2. [function inputs and outputs](https://github.com/PecanProject/pecan/blob/master/qaqc/vignettes/module_output.Rmd) (e.g. that will identify which functions and outputs are used in a workflow). +1. [relationships among functions across packages](https://github.com/PecanProject/pecan/blob/main/qaqc/vignettes/function_relationships.Rmd) +2. [function inputs and outputs](https://github.com/PecanProject/pecan/blob/main/qaqc/vignettes/module_output.Rmd) (e.g. that will identify which functions and outputs are used in a workflow). diff --git a/book_source/03_topical_pages/92_workflow_modules.Rmd b/book_source/03_topical_pages/92_workflow_modules.Rmd index 2248287649b..64a4c03b51b 100644 --- a/book_source/03_topical_pages/92_workflow_modules.Rmd +++ b/book_source/03_topical_pages/92_workflow_modules.Rmd @@ -5,7 +5,7 @@ NOTE: As of PEcAn 1.2.6 -- needs to be updated significantly ## Overview -Workflow inputs and outputs (click to open in new page, then zoom). Code used to generate this image is provided in [qaqc/vignettes/module_output.Rmd](https://github.com/PecanProject/pecan/blob/master/qaqc/vignettes/module_output.Rmd) +Workflow inputs and outputs (click to open in new page, then zoom). Code used to generate this image is provided in [qaqc/vignettes/module_output.Rmd](https://github.com/PecanProject/pecan/blob/main/qaqc/vignettes/module_output.Rmd) [![PEcAn Workflow](http://isda.ncsa.illinois.edu/~kooper/EBI/workflow.svg)](http://isda.ncsa.illinois.edu/~kooper/EBI/workflow.svg) diff --git a/book_source/03_topical_pages/93_installation/03_install_OS/05_install_BETY.Rmd b/book_source/03_topical_pages/93_installation/03_install_OS/05_install_BETY.Rmd index 24739ba9154..a76c0ac3ad6 100644 --- a/book_source/03_topical_pages/93_installation/03_install_OS/05_install_BETY.Rmd +++ b/book_source/03_topical_pages/93_installation/03_install_OS/05_install_BETY.Rmd @@ -8,7 +8,7 @@ If you would like to install the Docker Version of BETY, please consult the [PEc #### Install Database + Data -* _note_ To install BETYdb without PEcAn, first download the [`load.bety.sh` script](https://raw.githubusercontent.com/PecanProject/pecan/master/scripts/load.bety.sh) +* _note_ To install BETYdb without PEcAn, first download the [`load.bety.sh` script](https://raw.githubusercontent.com/PecanProject/pecan/main/scripts/load.bety.sh) ```sh # install database (code assumes password is bety) diff --git a/book_source/03_topical_pages/94_docker/02_quickstart.Rmd b/book_source/03_topical_pages/94_docker/02_quickstart.Rmd index 94612ee13d4..d3014529b5f 100644 --- a/book_source/03_topical_pages/94_docker/02_quickstart.Rmd +++ b/book_source/03_topical_pages/94_docker/02_quickstart.Rmd @@ -35,11 +35,11 @@ curl -v -X POST \ ### Configure docker-compose {#pecan-setup-compose-configure} -This section will let you download some configuration files. The documentation provides links to the latest released version (master branch in GitHub) or the develop version that we are working on (develop branch in GitHub) which will become the next release. If you cloned the PEcAn GitHub repository you can use `git checkout ` to switch branches. +This section will let you download some configuration files. The documentation provides links to the latest released version (main branch in GitHub) or the develop version that we are working on (develop branch in GitHub) which will become the next release. If you cloned the PEcAn GitHub repository you can use `git checkout ` to switch branches. -The PEcAn Docker stack is configured using a `docker-compose.yml` file. You can download just this file directly from GitHub [latest](https://raw.githubusercontent.com/PecanProject/pecan/master/docker-compose.yml) or [develop](https://raw.githubusercontent.com/PecanProject/pecan/master/docker-compose.yml). You can also find this file in the root of cloned PEcAn GitHub repository. There is no need to edit the `docker-compose.yml` file. You can use either the `.env` file to change some of the settings, or the `docker-compose.override.yml` file to modify the `docker-compose.yml` file. This makes it easier for you to get an updated version of the `docker-compose.yml` file and not lose any changes you have made to it. +The PEcAn Docker stack is configured using a `docker-compose.yml` file. You can download just this file directly from GitHub [latest](https://raw.githubusercontent.com/PecanProject/pecan/main/docker-compose.yml) or [develop](https://raw.githubusercontent.com/PecanProject/pecan/main/docker-compose.yml). You can also find this file in the root of cloned PEcAn GitHub repository. There is no need to edit the `docker-compose.yml` file. You can use either the `.env` file to change some of the settings, or the `docker-compose.override.yml` file to modify the `docker-compose.yml` file. This makes it easier for you to get an updated version of the `docker-compose.yml` file and not lose any changes you have made to it. -Some of the settings in the `docker-compose.yml` can be set using a `.env` file. You can download either the [latest](https://raw.githubusercontent.com/PecanProject/pecan/master/docker/env.example) or the [develop](https://raw.githubusercontent.com/PecanProject/pecan/develop/docker/env.example) version. If you have cloned the GitHub repository it is also located in the docker folder. This file should be called `.env` and be placed in the same folder as your `docker-compose.yml` file. This file will allow you to set which version of PEcAn or BETY to use. See the comments in this file to control the settings. Option you might want to set are: +Some of the settings in the `docker-compose.yml` can be set using a `.env` file. You can download either the [latest](https://raw.githubusercontent.com/PecanProject/pecan/main/docker/env.example) or the [develop](https://raw.githubusercontent.com/PecanProject/pecan/develop/docker/env.example) version. If you have cloned the GitHub repository it is also located in the docker folder. This file should be called `.env` and be placed in the same folder as your `docker-compose.yml` file. This file will allow you to set which version of PEcAn or BETY to use. See the comments in this file to control the settings. Option you might want to set are: - `PECAN_VERSION` : The docker images to use for PEcAn. The default is `latest` which is the latest released version of PEcAn. Setting this to `develop` will result in using the version of PEcAn which will become the next release. - `PECAN_FQDN` : Is the name of the server where PEcAn is running. This is what is used to register all files generated by this version of PEcAn (see also `TRAEFIK_HOST`). @@ -48,7 +48,7 @@ Some of the settings in the `docker-compose.yml` can be set using a `.env` file. - `TRAEFIK_HOST` : Should be the FQDN of the server, this is needed when generating a SSL certificate. For SSL certificates you will need to set `TRAEFIK_ACME_ENABLE` as well as `TRAEFIK_ACME_EMAIL`. - `TRAEFIK_IPFILTER` : is used to limit access to certain resources, such as RabbitMQ and the Traefik dashboard. -A final file, which is optional, is a `docker-compose.override.yml`. You can download a version for the [latest](https://raw.githubusercontent.com/PecanProject/pecan/master/docker/docker-compose.example.yml) and [develop](https://raw.githubusercontent.com/PecanProject/pecan/develop/docker/docker-compose.example.yml) versions. If you have cloned the GitHub repository it is located in the docker folder. Use this file as an example of what you can do, only copy the pieces over that you really need. This will allow you to make changes to the docker-compose file for your local installation. You can use this to add additional containers to your stack, change the path where docker stores the data for the containers, or you can use this to open up the postgresql port. +A final file, which is optional, is a `docker-compose.override.yml`. You can download a version for the [latest](https://raw.githubusercontent.com/PecanProject/pecan/main/docker/docker-compose.example.yml) and [develop](https://raw.githubusercontent.com/PecanProject/pecan/develop/docker/docker-compose.example.yml) versions. If you have cloned the GitHub repository it is located in the docker folder. Use this file as an example of what you can do, only copy the pieces over that you really need. This will allow you to make changes to the docker-compose file for your local installation. You can use this to add additional containers to your stack, change the path where docker stores the data for the containers, or you can use this to open up the postgresql port. ```yaml version: "3" diff --git a/book_source/04_appendix/03_courses_taught.Rmd b/book_source/04_appendix/03_courses_taught.Rmd index 17d1bb83bac..b03adbd0899 100755 --- a/book_source/04_appendix/03_courses_taught.Rmd +++ b/book_source/04_appendix/03_courses_taught.Rmd @@ -38,5 +38,5 @@ Session 4: Integrating Forest Data Into Ecosystem Models ## Selected Publications -1. Dietze, M.C., D.S LeBauer, R. Kooper (2013) [On improving the communication between models and data](https://github.com/PecanProject/pecan/blob/master/documentation/dietze2013oic.pdf?raw=true). Plant, Cell, & Environment doi:10.1111/pce.12043 -2. LeBauer, D.S., D. Wang, K. Richter, C. Davidson, & M.C. Dietze. (2013). [Facilitating feedbacks between field measurements and ecosystem models](https://github.com/PecanProject/pecan/blob/master/documentation/lebauer2013ffb.pdf?raw=true). Ecological Monographs. doi:10.1890/12-0137.1 \ No newline at end of file +1. Dietze, M.C., D.S LeBauer, R. Kooper (2013) [On improving the communication between models and data](https://github.com/PecanProject/pecan/blob/main/documentation/dietze2013oic.pdf?raw=true). Plant, Cell, & Environment doi:10.1111/pce.12043 +2. LeBauer, D.S., D. Wang, K. Richter, C. Davidson, & M.C. Dietze. (2013). [Facilitating feedbacks between field measurements and ecosystem models](https://github.com/PecanProject/pecan/blob/main/documentation/lebauer2013ffb.pdf?raw=true). Ecological Monographs. doi:10.1890/12-0137.1 \ No newline at end of file diff --git a/docker.sh b/docker.sh index c37f672220b..4a2e3353992 100755 --- a/docker.sh +++ b/docker.sh @@ -26,7 +26,7 @@ PECAN_GIT_DATE="$(git log --pretty=format:%ad -1)" VERSION=${VERSION:-"$(awk '/Version:/ { print $2 }' base/all/DESCRIPTION)"} # check for branch and set IMAGE_VERSION -if [ "${PECAN_GIT_BRANCH}" == "master" ]; then +if [ "${PECAN_GIT_BRANCH}" == "main" ]; then IMAGE_VERSION=${IMAGE_VERSION:-"latest"} elif [ "${PECAN_GIT_BRANCH}" == "develop" ]; then IMAGE_VERSION=${IMAGE_VERSION:-"develop"} @@ -49,7 +49,7 @@ $0 [-dfhn] [-i ] [-r Documentation The documentation for PEcAn is rendered using bookdown. A PDF version can be found locally. The most up to date version can be found at - our website. diff --git a/documentation/tutorials/01_Demo_Basic_Run/Demo01.Rmd b/documentation/tutorials/01_Demo_Basic_Run/Demo01.Rmd index 97ec998211f..57fbc7db351 100644 --- a/documentation/tutorials/01_Demo_Basic_Run/Demo01.Rmd +++ b/documentation/tutorials/01_Demo_Basic_Run/Demo01.Rmd @@ -155,7 +155,7 @@ The entire PEcAn team welcomes any questions you may have! **If the Finished Stage has a Status of “DONE”, congratulations!** If you got this far, you have managed to run an ecosystem model without ever touching a line of code! Now it’s time to look at the results **click Finished**. -FYI, [adding a new model](https://pecanproject.github.io/pecan-documentation/master/adding-an-ecosystem-model.html) to PEcAn does not require modification of the model’s code, just the implementation of a wrapper function. +FYI, [adding a new model](https://pecanproject.github.io/pecan-documentation/latest/adding-an-ecosystem-model.html) to PEcAn does not require modification of the model’s code, just the implementation of a wrapper function. #### Output and Visualization diff --git a/documentation/tutorials/02_Demo_Uncertainty_Analysis/Demo02.Rmd b/documentation/tutorials/02_Demo_Uncertainty_Analysis/Demo02.Rmd index b560ff39258..f9164088852 100644 --- a/documentation/tutorials/02_Demo_Uncertainty_Analysis/Demo02.Rmd +++ b/documentation/tutorials/02_Demo_Uncertainty_Analysis/Demo02.Rmd @@ -97,12 +97,12 @@ The [next set of tutorials](#demo-table) will focus on the process of data assim #### Assimilation 'by hand' -[Explore](https://github.com/PecanProject/pecan/blob/master/documentation/tutorials/sensitivity/PEcAn_sensitivity_tutorial_v1.0.Rmd) how model error changes as a function of parameter value (i.e. data assimilation ‘by hand’) +[Explore](https://github.com/PecanProject/pecan/blob/main/documentation/tutorials/sensitivity/PEcAn_sensitivity_tutorial_v1.0.Rmd) how model error changes as a function of parameter value (i.e. data assimilation ‘by hand’) #### MCMC Concepts -[Explore](https://github.com/PecanProject/pecan/blob/master/documentation/tutorials/MCMC/MCMC_Concepts.Rmd) Bayesian MCMC concepts using the photosynthesis module +[Explore](https://github.com/PecanProject/pecan/blob/main/documentation/tutorials/MCMC/MCMC_Concepts.Rmd) Bayesian MCMC concepts using the photosynthesis module #### More info about tools, analyses, and specific tasks… diff --git a/documentation/tutorials/MCMC/MCMC_Concepts.Rmd b/documentation/tutorials/MCMC/MCMC_Concepts.Rmd index 162054f6ce0..46abe98f455 100644 --- a/documentation/tutorials/MCMC/MCMC_Concepts.Rmd +++ b/documentation/tutorials/MCMC/MCMC_Concepts.Rmd @@ -78,7 +78,7 @@ plot(dat$Ci[aci],dat$Photo[aci],main="ACi") plot(dat$PARi[!aci],dat$Photo[!aci],main="AQ") ``` -In PEcAn we've written a wrapper function, $fitA$, around the statistical model discussed above, which has a number of other bells and whistles discussed in the [PEcAn Photosynthesis Vignette](https://github.com/PecanProject/pecan/blob/master/modules/photosynthesis/vignettes/ResponseCurves.Rmd). For today we'll just use the most basic version, which takes as arguments the data and the number of MCMC iterations we want to run. +In PEcAn we've written a wrapper function, $fitA$, around the statistical model discussed above, which has a number of other bells and whistles discussed in the [PEcAn Photosynthesis Vignette](https://github.com/PecanProject/pecan/blob/main/modules/photosynthesis/vignettes/ResponseCurves.Rmd). For today we'll just use the most basic version, which takes as arguments the data and the number of MCMC iterations we want to run. ```{r echo=TRUE, eval=FALSE} fit <- fitA(dat,model=list(n.iter=10000)) @@ -179,7 +179,7 @@ Note: on the last figure you will get warnings about "No ACi" and "No AQ" which #### Additional information -There is a more detailed R Vignette on the use of the PEcAn photosynthesis module available in the [PEcAn Repository](https://github.com/PecanProject/pecan/blob/master/modules/photosynthesis/vignettes/ResponseCurves.Rmd). +There is a more detailed R Vignette on the use of the PEcAn photosynthesis module available in the [PEcAn Repository](https://github.com/PecanProject/pecan/blob/main/modules/photosynthesis/vignettes/ResponseCurves.Rmd). #### Citations diff --git a/documentation/tutorials/deploy.sh b/documentation/tutorials/deploy.sh index a4497227e55..434fadcaf5f 100755 --- a/documentation/tutorials/deploy.sh +++ b/documentation/tutorials/deploy.sh @@ -40,4 +40,4 @@ done < buildfiles cd book_hosted git add --all * git commit -m "Update tutorials `date`" || true -git push -q origin master +git push -q origin latest diff --git a/models/biocro/R/model2netcdf.BIOCRO.R b/models/biocro/R/model2netcdf.BIOCRO.R index 3d8269266cc..03c7cab4238 100644 --- a/models/biocro/R/model2netcdf.BIOCRO.R +++ b/models/biocro/R/model2netcdf.BIOCRO.R @@ -91,7 +91,7 @@ model2netcdf.BIOCRO <- function(result, genus = NULL, outdir, lat = -9999, lon = nc <- ncdf4::nc_open(ncfile, write = TRUE) } else { nc <- ncdf4::nc_create(filename = file.path(outdir, paste0(yeari, ".nc")), vars = vars) - ncdf4::ncatt_put(nc, 0, "description", "This is an output from the BioCro Crop model generated by the model2netcdf.BIOCRO.R function in the PEcAn.BIOCRO package; see https://pecanproject.github.io/pecan-documentation/master/ for more information") + ncdf4::ncatt_put(nc, 0, "description", "This is an output from the BioCro Crop model generated by the model2netcdf.BIOCRO.R function in the PEcAn.BIOCRO package; see https://pecanproject.github.io/pecan-documentation/latest/ for more information") } varfile <- file(file.path(outdir, paste(yeari, "nc", "var", sep = ".")), "w") diff --git a/models/maespa/R/write.config.MAESPA.R b/models/maespa/R/write.config.MAESPA.R index d88667480e8..7e1b21dfa2b 100755 --- a/models/maespa/R/write.config.MAESPA.R +++ b/models/maespa/R/write.config.MAESPA.R @@ -18,7 +18,7 @@ write.config.MAESPA <- function(defaults, trait.values, settings, run.id) { if(!require("Maeswrap")){ logger.severe("The Maeswrap package is not installed. Please consult PEcAn documentation for install notes: - https://pecanproject.github.io/pecan-documentation/master/pecan-models.html#maespa") + https://pecanproject.github.io/pecan-documentation/latest/pecan-models.html#maespa") } # find out where to write run/ouput diff --git a/models/sibcasa/R/met2model.SIBCASA.R b/models/sibcasa/R/met2model.SIBCASA.R index b0e57c707cb..5dc81323f70 100644 --- a/models/sibcasa/R/met2model.SIBCASA.R +++ b/models/sibcasa/R/met2model.SIBCASA.R @@ -16,7 +16,7 @@ met2model.SIBCASA <- function(in.path, in.prefix, outfolder, overwrite = FALSE) PEcAn.logger::logger.severe("NOT IMPLEMENTED") # Please follow the PEcAn style guide: - # https://pecanproject.github.io/pecan-documentation/master/coding-style.html + # https://pecanproject.github.io/pecan-documentation/latest/coding-style.html # Note that `library()` calls should _never_ appear here; instead, put # packages dependencies in the DESCRIPTION file, under "Imports:". diff --git a/models/template/R/met2model.MODEL.R b/models/template/R/met2model.MODEL.R index 5846976b72c..2d3f7012e33 100644 --- a/models/template/R/met2model.MODEL.R +++ b/models/template/R/met2model.MODEL.R @@ -15,7 +15,7 @@ met2model.MODEL <- function(in.path, in.prefix, outfolder, overwrite = FALSE) { PEcAn.logger::logger.severe("NOT IMPLEMENTED") # Please follow the PEcAn style guide: - # https://pecanproject.github.io/pecan-documentation/master/coding-style.html + # https://pecanproject.github.io/pecan-documentation/latest/coding-style.html # Note that `library()` calls should _never_ appear here; instead, put # packages dependencies in the DESCRIPTION file, under "Imports:". diff --git a/modules/assim.sequential/inst/NEFI/README.html b/modules/assim.sequential/inst/NEFI/README.html index 6c67d52b5fe..db88d350e13 100644 --- a/modules/assim.sequential/inst/NEFI/README.html +++ b/modules/assim.sequential/inst/NEFI/README.html @@ -38,7 +38,7 @@ };