Skip to content

Commit

Permalink
print the differences in obj$par
Browse files Browse the repository at this point in the history
  • Loading branch information
Bai-Li-NOAA committed Aug 1, 2024
1 parent a7cf054 commit c82ab48
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 15 deletions.
12 changes: 5 additions & 7 deletions .github/workflows/run-pollock-tests-by-fleet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,19 @@ jobs:
- name: Run pollock tests
run: |
# Names of required packages
packages <- c("dplyr", "tidyr", "ggplot2", "TMB", "reshape2", "here", "remotes", "lubridate")
packages <- c("dplyr", "tidyr", "ggplot2", "TMB", "reshape2", "here", "devtools", "lubridate")
# Install packages not yet installed
installed_packages <- packages %in% rownames(installed.packages())
if (any(installed_packages == FALSE)) {
install.packages(packages[!installed_packages], repos = "http://cran.us.r-project.org")
}
install.packages("FIMS", repos = c("https://noaa-fims.r-universe.dev", "https://cloud.r-project.org"))
# install.packages("FIMS", repos = c("https://noaa-fims.r-universe.dev", "https://cloud.r-project.org"))
devtools::install_github("NOAA-FIMS/FIMS")
# Load packages
invisible(lapply(packages, library, character.only = TRUE))
source(file.path(getwd(), "content", "run_pollock_tests_by_fleet.R"))
shell: Rscript {0}

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
shell: Rscript {0}
12 changes: 5 additions & 7 deletions .github/workflows/run-pollock-tests-by-process.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,19 @@ jobs:
- name: Run pollock tests
run: |
# Names of required packages
packages <- c("TMB")
packages <- c("dplyr", "tidyr", "ggplot2", "TMB", "reshape2", "here", "devtools", "lubridate")
# Install packages not yet installed
installed_packages <- packages %in% rownames(installed.packages())
if (any(installed_packages == FALSE)) {
install.packages(packages[!installed_packages], repos = "http://cran.us.r-project.org")
}
install.packages("FIMS", repos = c("https://noaa-fims.r-universe.dev", "https://cloud.r-project.org"))
# install.packages("FIMS", repos = c("https://noaa-fims.r-universe.dev", "https://cloud.r-project.org"))
devtools::install_github("NOAA-FIMS/FIMS")
# Load packages
invisible(lapply(packages, library, character.only = TRUE))
source(file.path(getwd(), "content", "run_pollock_tests.R"))
shell: Rscript {0}

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
shell: Rscript {0}
2 changes: 1 addition & 1 deletion content/run_pollock_tests.R
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,4 @@ opt2 <- with(obj2, nlminb(par,fn,gr))
all.equal(obj1$report(opt1$par), obj2$report(opt2$par))
sum(obj1$par)-sum(obj2$par)

cbind(sort(opt1$par)- sort(opt2$par))
print(cbind(sort(opt1$par)- sort(opt2$par)))

0 comments on commit c82ab48

Please sign in to comment.