-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #82 from NOAA-EDAB/UnitTests
Unit tests
- Loading branch information
Showing
116 changed files
with
4,044 additions
and
593 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
* using log directory ‘/home/rklasky/R/packages/Rpath/..Rcheck’ | ||
* using R version 4.3.1 (2023-06-16) | ||
* using platform: x86_64-pc-linux-gnu (64-bit) | ||
* R was compiled by | ||
gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0 | ||
GNU Fortran (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0 | ||
* running under: Linux Mint 20 | ||
* using session charset: UTF-8 | ||
* checking for file ‘./DESCRIPTION’ ... ERROR | ||
Required fields missing or empty: | ||
‘Author’ ‘Maintainer’ | ||
* DONE | ||
Status: 1 ERROR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
|
||
^.*\.Rproj$ | ||
^\.Rproj\.user$ | ||
^\.github$ | ||
^_pkgdown\.yml$ | ||
^docs$ | ||
^pkgdown$ | ||
^data-raw$ | ||
|
||
^.*\.Rproj$ | ||
^\.Rproj\.user$ | ||
^\.github$ | ||
^_pkgdown\.yml$ | ||
^docs$ | ||
^pkgdown$ | ||
^data-raw$ | ||
^doc$ | ||
^Meta$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
_R_CHECK_DONTTEST_EXAMPLES_=FALSE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
|
||
on: | ||
push: | ||
paths: | ||
- '.github/workflows/tests.yml' | ||
- 'R/*' | ||
- 'tests/testthat/*' | ||
- 'README.md' | ||
- 'DESCRIPTION' | ||
pull_request: | ||
paths: | ||
- '.github/workflows/tests.yml' | ||
- 'R/*' | ||
- 'tests/testthat/*' | ||
|
||
name: Unit-Tests | ||
|
||
jobs: | ||
# build: | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - uses: actions/checkout@v2 | ||
# - uses: r-lib/actions/setup-r@v2 | ||
# - uses: r-lib/actions/setup-pandoc@v2 | ||
# - name: Install dependencies | ||
# run: Rscript -e "install.packages(c('testthat', 'tidyverse', 'here'))" | ||
# - name: Run tests | ||
# run: Rscript -e "source('tests/testthat.R')" | ||
|
||
Unit-Tests: | ||
runs-on: ${{matrix.config.os}} | ||
|
||
name: ${{ matrix.config.os }} (${{ matrix.config.r }}) | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
#os: [macos-latest, ubuntu-latest, windows-latest] | ||
#os: [ubuntu-latest] | ||
config: | ||
- {os: macos-latest, r: 'release'} | ||
- {os: windows-latest, r: 'release'} | ||
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'} | ||
- {os: ubuntu-latest, r: 'release'} | ||
- {os: ubuntu-latest, r: 'oldrel-1'} | ||
env: | ||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
# R_REMOTES_NO_ERRORS_FROM_WARNINGS: false | ||
R_KEEP_PKG_SOURCE: yes | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
# with: | ||
# fetch-depth: 0 | ||
|
||
- uses: r-lib/actions/setup-pandoc@v2 | ||
|
||
- uses: r-lib/actions/setup-r@v2 | ||
with: | ||
r-version: ${{ matrix.config.r }} | ||
http-user-agent: ${{ matrix.config.http-user-agent }} | ||
use-public-rspm: true | ||
# r-version: '4.3.1' | ||
|
||
- uses: r-lib/actions/setup-r-dependencies@v2 | ||
|
||
- name: Install command line packages | ||
if: runner.os == 'Linux' | ||
run: | | ||
sudo apt update | ||
sudo apt-get install libcurl4-openssl-dev libgit2-dev | ||
- name: Install dependencies | ||
#run: Rscript -e "install.packages(c('remotes','testthat', 'tidyverse', 'here'))" | ||
run: | | ||
install.packages(c('usethis','remotes','testthat','tidyverse','here','rmarkdown','qpdf','distillery','ggpubr','rlist')) | ||
remotes::install_github("NOAA-EDAB/Rpath") | ||
shell: Rscript {0} | ||
|
||
- name: Run tests | ||
#run: Rscript -e "source('tests/testthat.R')" | ||
run: | | ||
source(here::here("data-raw/REcosystem.R")) | ||
source(here::here("tests/testthat.R")) | ||
shell: Rscript {0} | ||
|
||
# - name: commit data files | ||
# run: | | ||
# git config user.name github-actions | ||
# git config user.email [email protected] | ||
# file.copy('here::here("tests/testthat/Rplots.pdf")",to=here::here("inst/extdata/Rplots.pdf")) | ||
# git add inst/extdata/Rplots.pdf | ||
# git commit -m "automated commit from testthat yml" | ||
# git push |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,28 @@ | ||
.Rproj.user | ||
.Rhistory | ||
.RData | ||
*.png | ||
.Renviron | ||
*.jpg | ||
*.tif | ||
*.tar | ||
*.so | ||
outputs | ||
code | ||
*.xlsx | ||
*.docx | ||
Ecopath_dev | ||
Rpath.Rcheck* | ||
src/*.o | ||
src/*.dll | ||
NAMESPACE | ||
tests/testthat/data/output/* | ||
tests/testthat/data/bkup/* | ||
tests/testthat/data/input/REcosystem_Current_*.dat | ||
tests/testthat/data/input/REcosystem_Current_*.csv | ||
tests/testthat/old/* | ||
tests/testthat/bkup/* | ||
tests/testthat/old dat files/* | ||
docs | ||
Rpath.Rproj | ||
doc | ||
Meta | ||
Rpath.Rproj |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,48 @@ | ||
Package: Rpath | ||
Type: Package | ||
Title: R implementation of Ecopath with Ecosim | ||
Version: 0.0.1.2 | ||
Date: 2016-07-15 | ||
Authors@R: c( | ||
person("Kerim", "Aydin", email = "[email protected]", role = "aut"), | ||
person("Sean", "Lucey", email = "[email protected]", | ||
role = c("aut", "cre")), | ||
person("Sarah", "Gaichas", email = "[email protected]", role = "aut")) | ||
Description: This package implements the core mass balance equations made popular | ||
by Ecopath with Ecosim. There are two parts to the package, the static snapshot | ||
of energy flow through the system using rpath and dynamic simulations run using | ||
the rsim family of functions. | ||
License: file LICENSE | ||
Encoding: UTF-8 | ||
Imports: | ||
data.table, | ||
graphics, | ||
grDevices, | ||
MASS, | ||
Rcpp (>= 0.11.3), | ||
stats, | ||
utils | ||
LinkingTo: Rcpp | ||
Suggests: | ||
knitr, | ||
rmarkdown | ||
VignetteBuilder: knitr | ||
RoxygenNote: 7.1.1 | ||
URL: https://github.com/NOAA-EDAB/Rpath | ||
BugReports: https://github.com/NOAA-EDAB/Rpath/issues | ||
Depends: | ||
R (>= 2.10) | ||
Package: Rpath | ||
Type: Package | ||
Title: R implementation of Ecopath with Ecosim | ||
Version: 0.0.1.2 | ||
Date: 2016-07-15 | ||
Authors@R: c( | ||
person("Kerim", "Aydin", email = "[email protected]", role = "aut"), | ||
person("Sean", "Lucey", email = "[email protected]", | ||
role = c("aut", "cre")), | ||
person("Sarah", "Gaichas", email = "[email protected]", role = "aut")) | ||
Description: This package implements the core mass balance equations made popular | ||
by Ecopath with Ecosim. There are two parts to the package, the static snapshot | ||
of energy flow through the system using rpath and dynamic simulations run using | ||
the rsim family of functions. | ||
License: file LICENSE | ||
Encoding: UTF-8 | ||
Imports: | ||
data.table, | ||
methods, | ||
graphics, | ||
grDevices, | ||
MASS, | ||
Rcpp (>= 0.11.3), | ||
stats, | ||
utils | ||
LinkingTo: Rcpp | ||
Suggests: | ||
here, | ||
knitr, | ||
rmarkdown, | ||
distillery, | ||
ggplot2, | ||
ggpubr, | ||
rlist, | ||
stringr, | ||
qpdf, | ||
usethis, | ||
dplyr, | ||
generics, | ||
testthat (>= 3.0.0) | ||
VignetteBuilder: knitr | ||
RoxygenNote: 7.2.3 | ||
URL: https://github.com/NOAA-EDAB/Rpath | ||
BugReports: https://github.com/NOAA-EDAB/Rpath/issues | ||
Depends: | ||
R (>= 2.10) | ||
Config/testthat/edition: 3 | ||
LazyData: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,23 @@ | ||
# Generated by using Rcpp::compileAttributes() -> do not edit by hand | ||
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393 | ||
|
||
rk4_run <- function(params, instate, forcing, fishing, stanzas, StartYear, EndYear) { | ||
.Call('_Rpath_rk4_run', PACKAGE = 'Rpath', params, instate, forcing, fishing, stanzas, StartYear, EndYear) | ||
} | ||
|
||
Adams_run <- function(params, instate, forcing, fishing, stanzas, StartYear, EndYear, InitDeriv) { | ||
.Call('_Rpath_Adams_run', PACKAGE = 'Rpath', params, instate, forcing, fishing, stanzas, StartYear, EndYear, InitDeriv) | ||
} | ||
|
||
deriv_vector <- function(params, state, forcing, fishing, stanzas, inyear, m, tt) { | ||
.Call('_Rpath_deriv_vector', PACKAGE = 'Rpath', params, state, forcing, fishing, stanzas, inyear, m, tt) | ||
} | ||
|
||
SplitSetPred <- function(stanzas, state) { | ||
.Call('_Rpath_SplitSetPred', PACKAGE = 'Rpath', stanzas, state) | ||
} | ||
|
||
SplitUpdate <- function(stanzas, state, forcing, deriv, yr, mon) { | ||
.Call('_Rpath_SplitUpdate', PACKAGE = 'Rpath', stanzas, state, forcing, deriv, yr, mon) | ||
} | ||
|
||
# Generated by using Rcpp::compileAttributes() -> do not edit by hand | ||
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393 | ||
|
||
rk4_run <- function(params, instate, forcing, fishing, stanzas, StartYear, EndYear) { | ||
.Call('_Rpath_rk4_run', PACKAGE = 'Rpath', params, instate, forcing, fishing, stanzas, StartYear, EndYear) | ||
} | ||
|
||
Adams_run <- function(params, instate, forcing, fishing, stanzas, StartYear, EndYear, InitDeriv) { | ||
.Call('_Rpath_Adams_run', PACKAGE = 'Rpath', params, instate, forcing, fishing, stanzas, StartYear, EndYear, InitDeriv) | ||
} | ||
|
||
deriv_vector <- function(params, state, forcing, fishing, stanzas, inyear, m, tt) { | ||
.Call('_Rpath_deriv_vector', PACKAGE = 'Rpath', params, state, forcing, fishing, stanzas, inyear, m, tt) | ||
} | ||
|
||
SplitSetPred <- function(stanzas, state) { | ||
.Call('_Rpath_SplitSetPred', PACKAGE = 'Rpath', stanzas, state) | ||
} | ||
|
||
SplitUpdate <- function(stanzas, state, forcing, deriv, yr, mon) { | ||
.Call('_Rpath_SplitUpdate', PACKAGE = 'Rpath', stanzas, state, forcing, deriv, yr, mon) | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.