Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
khufkens committed Oct 3, 2023
1 parent 96e7df5 commit 1d1a203
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 7 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,17 @@ name: test-coverage

jobs:
test-coverage:
timeout-minutes: 30
timeout-minutes: 120
runs-on: ubuntu-20.04
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
PASS:: ${{ secrets.CODECOV_TOKEN }}

steps:
- uses: actions/checkout@v2
- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
- uses: r-lib/actions/setup-pandoc@v2

- name: Query dependencies
Expand Down
15 changes: 12 additions & 3 deletions tests/testthat/test_skytrackr.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,17 @@ test_that("test functions without task ids", {
plot = FALSE
)

# create polygon tasks
expect_type(location, "list")

# no start
location <- skytrackr::cc874 |>
skytrackr::skytrackr(
iterations = 10,
particles = 3,
tolerance = 11,
plot = FALSE
)

expect_type(location, "list")

location_mask <- skytrackr::cc874 |>
Expand All @@ -21,9 +31,8 @@ test_that("test functions without task ids", {
start_location = c(51.08, 3.73),
tolerance = 11,
land_mask = TRUE,
plot = FALSE
plot = TRUE
)

# create polygon tasks
expect_type(location_mask, "list")
})
21 changes: 18 additions & 3 deletions vignettes/introduction.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -216,9 +216,24 @@ As a sensitivity analysis I set values to low (effectively 0) values, for a rang

```{r echo = FALSE}
# load sensitiviy analysis
sensitivity_default <- readRDS(system.file(package = "skytrackr","extdata/sensitivity_default.rds"))
sensitivity_full <- readRDS(system.file(package = "skytrackr","extdata/sensitivity_full.rds"))
sensitivity_night <- readRDS(system.file(package = "skytrackr","extdata/sensitivity_night.rds"))
sensitivity_default <- readRDS(
system.file(
package = "skytrackr",
"extdata/sensitivity_default.rds"
)
)
sensitivity_full <- readRDS(
system.file(
package = "skytrackr",
"extdata/sensitivity_full.rds"
)
)
sensitivity_night <- readRDS(
system.file(
package = "skytrackr",
"extdata/sensitivity_night.rds"
)
)
p <- ggplot(sensitivity_default) +
geom_point(
Expand Down

0 comments on commit 1d1a203

Please sign in to comment.