Skip to content

Commit

Permalink
style and docs: run devtools::document() and styler::style_pkg()
Browse files Browse the repository at this point in the history
  • Loading branch information
kellijohnson-NOAA committed Mar 15, 2023
1 parent 47cffba commit 26b57b9
Show file tree
Hide file tree
Showing 19 changed files with 2 additions and 32 deletions.
1 change: 0 additions & 1 deletion tests/testthat/test-change-e.R
@@ -1,4 +1,3 @@

wd.old <- getwd()
temp_path <- file.path(tempdir(), "pars")
dir.create(temp_path, showWarnings = FALSE)
Expand Down
1 change: 0 additions & 1 deletion tests/testthat/test-change-o.R
@@ -1,4 +1,3 @@

# set up temp directory
temp_path <- file.path(tempdir(), "ss3sim-test")
dir.create(temp_path, showWarnings = FALSE)
Expand Down
1 change: 0 additions & 1 deletion tests/testthat/test-change-q.R
@@ -1,4 +1,3 @@

test_that("Automatic errors in change_q", {
expect_error(change_q(string_add = "Fishery"))
expect_error(change_q())
Expand Down
1 change: 0 additions & 1 deletion tests/testthat/test-change-tv.R
@@ -1,4 +1,3 @@

d <- system.file("extdata", package = "ss3sim")
om <- paste0(d, "/models/cod-om")

Expand Down
1 change: 0 additions & 1 deletion tests/testthat/test-change_catch.R
@@ -1,4 +1,3 @@

d <- system.file("extdata", "models", "cod-om", package = "ss3sim")
dat <- r4ss::SS_readdat(
file = file.path(d, "codOM.dat"),
Expand Down
1 change: 0 additions & 1 deletion tests/testthat/test-change_f.R
@@ -1,4 +1,3 @@

om <- system.file("extdata", "models", "cod-om", package = "ss3sim")
em <- system.file("extdata", "models", "cod-em", package = "ss3sim")
dat_list <- r4ss::SS_readdat(file.path(om, "codOM.dat"), verbose = FALSE)
Expand Down
2 changes: 0 additions & 2 deletions tests/testthat/test-clean-data.R
@@ -1,5 +1,3 @@


d <- system.file("extdata", package = "ss3sim")
om_dir <- file.path(d, "models", "cod-om")

Expand Down
2 changes: 0 additions & 2 deletions tests/testthat/test-forecast.R
@@ -1,5 +1,3 @@


test_that("check_forecast is working", {
file <- system.file(
package = "ss3sim",
Expand Down
1 change: 0 additions & 1 deletion tests/testthat/test-get-results.R
@@ -1,4 +1,3 @@

temp_path <- file.path(tempdir(), "ss3sim-test")
dir.create(temp_path, showWarnings = FALSE)
wd <- getwd()
Expand Down
2 changes: 0 additions & 2 deletions tests/testthat/test-model-setup.r
@@ -1,5 +1,3 @@


wd.old <- getwd()
temp_path <- file.path(tempdir(), "verify_input")
dir.create(temp_path, showWarnings = FALSE)
Expand Down
2 changes: 0 additions & 2 deletions tests/testthat/test-plot_functions.R
@@ -1,5 +1,3 @@


test_that("plot_cummean works", {
data("scalar_dat", package = "ss3sim")

Expand Down
1 change: 0 additions & 1 deletion tests/testthat/test-recdevs.R
@@ -1,4 +1,3 @@

# .
# get_recdevs() is pretty simple, so does not need a test for now.

Expand Down
2 changes: 0 additions & 2 deletions tests/testthat/test-run-ss3sim.R
@@ -1,5 +1,3 @@


# Tests are skipped on CRAN because the Stock Synthesis executable is no available.

temp_path <- file.path(tempdir(), "run-ss3sim-test")
Expand Down
2 changes: 0 additions & 2 deletions tests/testthat/test-run-ss3simwseas.R
@@ -1,5 +1,3 @@


# Tests are skipped on CRAN because the Stock Synthesis executable is no available.

library(magrittr)
Expand Down
2 changes: 0 additions & 2 deletions tests/testthat/test-sample-cal.R
@@ -1,5 +1,3 @@


temp_path <- file.path(tempdir(), "run-CAAL-test")
dir.create(temp_path, showWarnings = FALSE)
wd <- getwd()
Expand Down
2 changes: 0 additions & 2 deletions tests/testthat/test-sample-comp.R
@@ -1,5 +1,3 @@


d <- system.file("extdata", package = "ss3sim")
exp_dat_path <- file.path(d, "example-om", "ss3_exp_vals_comps.dat")

Expand Down
2 changes: 0 additions & 2 deletions tests/testthat/test-sample-index.R
@@ -1,5 +1,3 @@


temp_path <- file.path(tempdir(), "ss3sim-test")
dir.create(temp_path, showWarnings = FALSE)
wd <- getwd()
Expand Down
4 changes: 0 additions & 4 deletions tests/testthat/test-setup_scenarios.R
@@ -1,7 +1,3 @@




test_that("Default setup_scenarios work", {
input <- setup_scenarios_defaults()
scenario_list <- setup_scenarios(input)
Expand Down
4 changes: 2 additions & 2 deletions vignettes/introduction.Rmd
Expand Up @@ -611,7 +611,7 @@ Use the long data to create a multi-panel plot with {ggplot2}.
p <- plot_boxplot(
scalar_dat_long[
scalar_dat_long$parameter %in% c("depletion", "SSB_MSY") &
grepl("E10[0-1]", scalar_dat_long[, "scenario"]),
grepl("E10[0-1]", scalar_dat_long[, "scenario"]),
],
x = "E", y = "RE", re = FALSE,
horiz = "parameter", print = FALSE
Expand Down Expand Up @@ -642,7 +642,7 @@ print(p)
p <- plot_boxplot(
scalar_dat_long[
scalar_dat_long$parameter %in% c("depletion", "SSB_MSY") &
grepl("E[0-1]-", scalar_dat_long$scenario),
grepl("E[0-1]-", scalar_dat_long$scenario),
],
x = "D", y = "RE", re = FALSE,
vert = "E", horiz = "parameter", print = FALSE
Expand Down

0 comments on commit 26b57b9

Please sign in to comment.