From dab04f80366fe15bf50114420cf34c100c6291d5 Mon Sep 17 00:00:00 2001 From: {SET}group <127860447+Spatiotemporal-Exposures-and-Toxicology@users.noreply.github.com> Date: Tue, 3 Oct 2023 22:01:01 -0400 Subject: [PATCH 01/23] Update test-coverage.yaml --- .github/workflows/test-coverage.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-coverage.yaml b/.github/workflows/test-coverage.yaml index ad146389..7abcdb78 100644 --- a/.github/workflows/test-coverage.yaml +++ b/.github/workflows/test-coverage.yaml @@ -10,7 +10,7 @@ name: test-coverage jobs: test-coverage: - runs-on: ubuntu-latest + runs-on: self-hosted env: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} # Add this line From 646a53a02e4bde36095f78e0cc82cc9892d2bf3d Mon Sep 17 00:00:00 2001 From: {SET}group <127860447+Spatiotemporal-Exposures-and-Toxicology@users.noreply.github.com> Date: Tue, 3 Oct 2023 22:04:40 -0400 Subject: [PATCH 02/23] self-hosted change to check-standard.yaml --- .github/workflows/check-standard.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check-standard.yaml b/.github/workflows/check-standard.yaml index a71ab36e..1afa3f70 100644 --- a/.github/workflows/check-standard.yaml +++ b/.github/workflows/check-standard.yaml @@ -10,7 +10,7 @@ name: R-CMD-check jobs: R-CMD-check: - runs-on: ${{ matrix.config.os }} + runs-on: self-hosted name: ${{ matrix.config.os }} (${{ matrix.config.r }}) From f6e6518a561fd46975c108f20444795f1d1e228d Mon Sep 17 00:00:00 2001 From: {SET}group <127860447+Spatiotemporal-Exposures-and-Toxicology@users.noreply.github.com> Date: Tue, 3 Oct 2023 22:20:49 -0400 Subject: [PATCH 03/23] Update check-standard.yaml --- .github/workflows/check-standard.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/check-standard.yaml b/.github/workflows/check-standard.yaml index 1afa3f70..324126c1 100644 --- a/.github/workflows/check-standard.yaml +++ b/.github/workflows/check-standard.yaml @@ -28,6 +28,11 @@ jobs: steps: - uses: actions/checkout@v3 + - name: Install gdebi-core (Rocky Linux) + run: | + sudo dnf install -y gdebi-core + if: runner.os == 'Linux' && runner.os_version == '8' # Check for Rocky Linux 8 + - uses: r-lib/actions/setup-pandoc@v2 - uses: r-lib/actions/setup-r@v2 From 0ed037c5e8bc05330a88c7495db7b008a65f3446 Mon Sep 17 00:00:00 2001 From: {SET}group <127860447+Spatiotemporal-Exposures-and-Toxicology@users.noreply.github.com> Date: Tue, 3 Oct 2023 23:05:44 -0400 Subject: [PATCH 04/23] Update check-standard.yaml Try specifying version 8.7 --- .github/workflows/check-standard.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check-standard.yaml b/.github/workflows/check-standard.yaml index 324126c1..861d1c54 100644 --- a/.github/workflows/check-standard.yaml +++ b/.github/workflows/check-standard.yaml @@ -31,7 +31,7 @@ jobs: - name: Install gdebi-core (Rocky Linux) run: | sudo dnf install -y gdebi-core - if: runner.os == 'Linux' && runner.os_version == '8' # Check for Rocky Linux 8 + if: runner.os == 'Linux' && runner.os_version == '8.7' # Check for Rocky Linux 8 - uses: r-lib/actions/setup-pandoc@v2 From 4d3cdf3d1efb2adbf4b09c0eee1c2ed8a32d875e Mon Sep 17 00:00:00 2001 From: {SET}group <127860447+Spatiotemporal-Exposures-and-Toxicology@users.noreply.github.com> Date: Wed, 4 Oct 2023 00:03:19 -0400 Subject: [PATCH 05/23] Update check-standard.yaml --- .github/workflows/check-standard.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/check-standard.yaml b/.github/workflows/check-standard.yaml index 861d1c54..65661075 100644 --- a/.github/workflows/check-standard.yaml +++ b/.github/workflows/check-standard.yaml @@ -12,13 +12,14 @@ jobs: R-CMD-check: runs-on: self-hosted - name: ${{ matrix.config.os }} (${{ matrix.config.r }}) + name: Rocky Linux 8.7 (${{ matrix.config.r }}) + strategy: fail-fast: false matrix: config: - - {os: ubuntu-latest, r: 'release'} + - {os: rocky, r: 'release'} env: @@ -31,7 +32,7 @@ jobs: - name: Install gdebi-core (Rocky Linux) run: | sudo dnf install -y gdebi-core - if: runner.os == 'Linux' && runner.os_version == '8.7' # Check for Rocky Linux 8 + if: runner.os == 'Linux' && runner.os_version == '8' # Check for Rocky Linux 8 - uses: r-lib/actions/setup-pandoc@v2 From 54ce61834308031b744431d9e24bbbd4a51b5ca2 Mon Sep 17 00:00:00 2001 From: {SET}group <127860447+Spatiotemporal-Exposures-and-Toxicology@users.noreply.github.com> Date: Thu, 5 Oct 2023 18:42:08 -0400 Subject: [PATCH 06/23] Update check-standard.yaml --- .github/workflows/check-standard.yaml | 33 +++++++-------------------- 1 file changed, 8 insertions(+), 25 deletions(-) diff --git a/.github/workflows/check-standard.yaml b/.github/workflows/check-standard.yaml index 65661075..4045b8c7 100644 --- a/.github/workflows/check-standard.yaml +++ b/.github/workflows/check-standard.yaml @@ -11,42 +11,25 @@ name: R-CMD-check jobs: R-CMD-check: runs-on: self-hosted - - name: Rocky Linux 8.7 (${{ matrix.config.r }}) - - strategy: - fail-fast: false matrix: - config: - - {os: rocky, r: 'release'} - - + runner-os: [linux-rocky8] # Specify the desired runner OS here env: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} R_KEEP_PKG_SOURCE: yes - steps: - - uses: actions/checkout@v3 - - - name: Install gdebi-core (Rocky Linux) - run: | - sudo dnf install -y gdebi-core - if: runner.os == 'Linux' && runner.os_version == '8' # Check for Rocky Linux 8 + - uses: actions/checkout@v2 # Update to the latest version of the 'actions/checkout' action - - uses: r-lib/actions/setup-pandoc@v2 - - - uses: r-lib/actions/setup-r@v2 + - name: Set up R + 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 - - uses: r-lib/actions/setup-r-dependencies@v2 + - name: Set up R Dependencies + uses: r-lib/actions/setup-r-dependencies@v2 with: extra-packages: any::rcmdcheck needs: check - - uses: r-lib/actions/check-r-package@v2 - with: - upload-snapshots: true + - name: Check R Package + uses: r-lib/actions/check-r-package@v2 From f2e321ff0198ea0d3b7a23bdfeb9fdd20089e400 Mon Sep 17 00:00:00 2001 From: {SET}group <127860447+Spatiotemporal-Exposures-and-Toxicology@users.noreply.github.com> Date: Thu, 5 Oct 2023 18:48:10 -0400 Subject: [PATCH 07/23] Update check-standard.yaml --- .github/workflows/check-standard.yaml | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/.github/workflows/check-standard.yaml b/.github/workflows/check-standard.yaml index 4045b8c7..54e35492 100644 --- a/.github/workflows/check-standard.yaml +++ b/.github/workflows/check-standard.yaml @@ -20,16 +20,5 @@ jobs: steps: - uses: actions/checkout@v2 # Update to the latest version of the 'actions/checkout' action - - name: Set up R - uses: r-lib/actions/setup-r@v2 - with: - use-public-rspm: true - - - name: Set up R Dependencies - uses: r-lib/actions/setup-r-dependencies@v2 - with: - extra-packages: any::rcmdcheck - needs: check - - name: Check R Package uses: r-lib/actions/check-r-package@v2 From 2e9e043d27e628fbfe46dd89e701f4bc0601f39d Mon Sep 17 00:00:00 2001 From: {SET}group <127860447+Spatiotemporal-Exposures-and-Toxicology@users.noreply.github.com> Date: Thu, 5 Oct 2023 18:49:35 -0400 Subject: [PATCH 08/23] Update check-standard.yaml --- .github/workflows/check-standard.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/check-standard.yaml b/.github/workflows/check-standard.yaml index 54e35492..871d3480 100644 --- a/.github/workflows/check-standard.yaml +++ b/.github/workflows/check-standard.yaml @@ -20,5 +20,11 @@ jobs: steps: - uses: actions/checkout@v2 # Update to the latest version of the 'actions/checkout' action + - name: Set up R Dependencies + uses: r-lib/actions/setup-r-dependencies@v2 + with: + extra-packages: any::rcmdcheck + needs: check + - name: Check R Package uses: r-lib/actions/check-r-package@v2 From bc3279e2bc2dbf641468d4778c40c01d5641468d Mon Sep 17 00:00:00 2001 From: {SET}group <127860447+Spatiotemporal-Exposures-and-Toxicology@users.noreply.github.com> Date: Thu, 5 Oct 2023 22:55:12 -0400 Subject: [PATCH 09/23] Update check-standard.yaml --- .github/workflows/check-standard.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check-standard.yaml b/.github/workflows/check-standard.yaml index 871d3480..fd99d59e 100644 --- a/.github/workflows/check-standard.yaml +++ b/.github/workflows/check-standard.yaml @@ -21,7 +21,7 @@ jobs: - uses: actions/checkout@v2 # Update to the latest version of the 'actions/checkout' action - name: Set up R Dependencies - uses: r-lib/actions/setup-r-dependencies@v2 + uses: r-lib/actions/setup-r-dependencies@v3 with: extra-packages: any::rcmdcheck needs: check From 71163430a67b5de6a6ff84a9e8e11fe36f8e4e9c Mon Sep 17 00:00:00 2001 From: {SET}group <127860447+Spatiotemporal-Exposures-and-Toxicology@users.noreply.github.com> Date: Thu, 5 Oct 2023 22:56:03 -0400 Subject: [PATCH 10/23] Update check-standard.yaml --- .github/workflows/check-standard.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check-standard.yaml b/.github/workflows/check-standard.yaml index fd99d59e..f020db7e 100644 --- a/.github/workflows/check-standard.yaml +++ b/.github/workflows/check-standard.yaml @@ -21,10 +21,10 @@ jobs: - uses: actions/checkout@v2 # Update to the latest version of the 'actions/checkout' action - name: Set up R Dependencies - uses: r-lib/actions/setup-r-dependencies@v3 + uses: r-lib/actions/setup-r-dependencies@v2 with: extra-packages: any::rcmdcheck needs: check - name: Check R Package - uses: r-lib/actions/check-r-package@v2 + uses: r-lib/actions/check-r-package@v3 From 73b1fb2c0d660ab675426c8e05324a6e39ee3c3e Mon Sep 17 00:00:00 2001 From: {SET}group <127860447+Spatiotemporal-Exposures-and-Toxicology@users.noreply.github.com> Date: Thu, 5 Oct 2023 22:56:40 -0400 Subject: [PATCH 11/23] Update check-standard.yaml --- .github/workflows/check-standard.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check-standard.yaml b/.github/workflows/check-standard.yaml index f020db7e..871d3480 100644 --- a/.github/workflows/check-standard.yaml +++ b/.github/workflows/check-standard.yaml @@ -27,4 +27,4 @@ jobs: needs: check - name: Check R Package - uses: r-lib/actions/check-r-package@v3 + uses: r-lib/actions/check-r-package@v2 From a0f7c85307f94a955d585a6f28fa578fa8dc2907 Mon Sep 17 00:00:00 2001 From: {SET}group <127860447+Spatiotemporal-Exposures-and-Toxicology@users.noreply.github.com> Date: Thu, 5 Oct 2023 23:11:02 -0400 Subject: [PATCH 12/23] Update check-standard.yaml --- .github/workflows/check-standard.yaml | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/.github/workflows/check-standard.yaml b/.github/workflows/check-standard.yaml index 871d3480..af5b55f9 100644 --- a/.github/workflows/check-standard.yaml +++ b/.github/workflows/check-standard.yaml @@ -20,11 +20,18 @@ jobs: steps: - uses: actions/checkout@v2 # Update to the latest version of the 'actions/checkout' action - - name: Set up R Dependencies - uses: r-lib/actions/setup-r-dependencies@v2 - with: - extra-packages: any::rcmdcheck - needs: check - + - name: Install R and R dependencies + run: | + # Install R + sudo dnf install -y R + + # Install R packages using Rscript or R -e + Rscript -e "install.packages('dplyr', dependencies=TRUE)" + Rscript -e "install.packages('sf', dependencies=TRUE)" + Rscript -e "install.packages('stats', dependencies=TRUE)" + Rscript -e "install.packages('terra', dependencies=TRUE)" + Rscript -e "install.packages('stars', dependencies=TRUE)" + shell: bash + - name: Check R Package uses: r-lib/actions/check-r-package@v2 From f8c2825909694e3b49d8fdf1b220fb0c42fadf98 Mon Sep 17 00:00:00 2001 From: {SET}group <127860447+Spatiotemporal-Exposures-and-Toxicology@users.noreply.github.com> Date: Thu, 5 Oct 2023 23:13:22 -0400 Subject: [PATCH 13/23] Update check-standard.yaml --- .github/workflows/check-standard.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/check-standard.yaml b/.github/workflows/check-standard.yaml index af5b55f9..f311de91 100644 --- a/.github/workflows/check-standard.yaml +++ b/.github/workflows/check-standard.yaml @@ -25,6 +25,8 @@ jobs: # Install R sudo dnf install -y R + sudo R + # Install R packages using Rscript or R -e Rscript -e "install.packages('dplyr', dependencies=TRUE)" Rscript -e "install.packages('sf', dependencies=TRUE)" From 264c4a598123d102f03573e24377a43e9c7ca561 Mon Sep 17 00:00:00 2001 From: {SET}group <127860447+Spatiotemporal-Exposures-and-Toxicology@users.noreply.github.com> Date: Thu, 5 Oct 2023 23:14:11 -0400 Subject: [PATCH 14/23] Update check-standard.yaml --- .github/workflows/check-standard.yaml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/check-standard.yaml b/.github/workflows/check-standard.yaml index f311de91..03d534f5 100644 --- a/.github/workflows/check-standard.yaml +++ b/.github/workflows/check-standard.yaml @@ -22,11 +22,6 @@ jobs: - name: Install R and R dependencies run: | - # Install R - sudo dnf install -y R - - sudo R - # Install R packages using Rscript or R -e Rscript -e "install.packages('dplyr', dependencies=TRUE)" Rscript -e "install.packages('sf', dependencies=TRUE)" From ab37a6f993cf4c189f2d531d6ad872869ec1bb13 Mon Sep 17 00:00:00 2001 From: {SET}group <127860447+Spatiotemporal-Exposures-and-Toxicology@users.noreply.github.com> Date: Thu, 5 Oct 2023 23:15:28 -0400 Subject: [PATCH 15/23] Update check-standard.yaml --- .github/workflows/check-standard.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/check-standard.yaml b/.github/workflows/check-standard.yaml index 03d534f5..3c06385f 100644 --- a/.github/workflows/check-standard.yaml +++ b/.github/workflows/check-standard.yaml @@ -22,6 +22,9 @@ jobs: - name: Install R and R dependencies run: | + + sudo R + # Install R packages using Rscript or R -e Rscript -e "install.packages('dplyr', dependencies=TRUE)" Rscript -e "install.packages('sf', dependencies=TRUE)" From 51cb41d09de50a9bc1aafbb36b8ffee65ae91de3 Mon Sep 17 00:00:00 2001 From: {SET}group <127860447+Spatiotemporal-Exposures-and-Toxicology@users.noreply.github.com> Date: Thu, 5 Oct 2023 23:17:12 -0400 Subject: [PATCH 16/23] Update check-standard.yaml --- .github/workflows/check-standard.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check-standard.yaml b/.github/workflows/check-standard.yaml index 3c06385f..8b707bfb 100644 --- a/.github/workflows/check-standard.yaml +++ b/.github/workflows/check-standard.yaml @@ -23,14 +23,16 @@ jobs: - name: Install R and R dependencies run: | - sudo R + sudo R --no-save < Date: Thu, 5 Oct 2023 23:20:11 -0400 Subject: [PATCH 17/23] Update check-standard.yaml --- .github/workflows/check-standard.yaml | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/.github/workflows/check-standard.yaml b/.github/workflows/check-standard.yaml index 8b707bfb..bb54cb77 100644 --- a/.github/workflows/check-standard.yaml +++ b/.github/workflows/check-standard.yaml @@ -20,19 +20,20 @@ jobs: steps: - uses: actions/checkout@v2 # Update to the latest version of the 'actions/checkout' action - - name: Install R and R dependencies + - name: Install R run: | + # Install R + sudo dnf install -y R + shell: bash - sudo R --no-save < Date: Thu, 5 Oct 2023 23:49:50 -0400 Subject: [PATCH 18/23] Update check-standard.yaml --- .github/workflows/check-standard.yaml | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/.github/workflows/check-standard.yaml b/.github/workflows/check-standard.yaml index bb54cb77..54e35492 100644 --- a/.github/workflows/check-standard.yaml +++ b/.github/workflows/check-standard.yaml @@ -20,21 +20,5 @@ jobs: steps: - uses: actions/checkout@v2 # Update to the latest version of the 'actions/checkout' action - - name: Install R - run: | - # Install R - sudo dnf install -y R - shell: bash - - - name: Install R packages - run: | - # Install R packages using Rscript - Rscript -e "install.packages('dplyr', dependencies = TRUE)" - Rscript -e "install.packages('sf', dependencies = TRUE)" - Rscript -e "install.packages('stats', dependencies = TRUE)" - Rscript -e "install.packages('terra', dependencies = TRUE)" - Rscript -e "install.packages('stars', dependencies = TRUE)" - shell: bash - - name: Check R Package uses: r-lib/actions/check-r-package@v2 From 1ad1f233469414c59d8acf90b858f71d19fcd47f Mon Sep 17 00:00:00 2001 From: Kyle Messier Date: Fri, 6 Oct 2023 09:50:38 -0400 Subject: [PATCH 19/23] updating DESCRIPTION and NAMESPACE and manuals --- DESCRIPTION | 2 +- NAMESPACE | 5 ++++ man/check_crs_is_valid.Rd | 22 ++++++++++++++++ man/check_data_completeness.Rd | 28 ++++++++++++++++++++ man/check_input_raster_in_extent.Rd | 28 ++++++++++++++++++++ man/check_means_are_valid.Rd | 34 +++++++++++++++++++++++++ man/check_output_locations_are_valid.Rd | 22 ++++++++++++++++ 7 files changed, 140 insertions(+), 1 deletion(-) create mode 100644 man/check_crs_is_valid.Rd create mode 100644 man/check_data_completeness.Rd create mode 100644 man/check_input_raster_in_extent.Rd create mode 100644 man/check_means_are_valid.Rd create mode 100644 man/check_output_locations_are_valid.Rd diff --git a/DESCRIPTION b/DESCRIPTION index 816cf212..4daa575d 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -6,7 +6,7 @@ Authors@R: family = "Messier", role = c("aut", "cre"), email = "kyle.messier@nih.gov")) -Description: This will one day be a package that provides near real time air pollution data +Description: Near Real Time air pollution model results and code produced by the SET group. It is fully tested, versioned, and open source and open access. Depends: R (>= 3.5.0) Imports: dplyr, sf, stats Suggests: covr, withr, knitr, rmarkdown, testthat (>= 3.0.0), terra, stars, sftime diff --git a/NAMESPACE b/NAMESPACE index 3bb326be..3704f7c7 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -1,5 +1,10 @@ # Generated by roxygen2: do not edit by hand export(build_pipeline) +export(check_crs_is_valid) +export(check_data_completeness) +export(check_input_raster_in_extent) +export(check_means_are_valid) +export(check_output_locations_are_valid) export(generic_base_learner) export(generic_meta_learner) diff --git a/man/check_crs_is_valid.Rd b/man/check_crs_is_valid.Rd new file mode 100644 index 00000000..b2f629df --- /dev/null +++ b/man/check_crs_is_valid.Rd @@ -0,0 +1,22 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/check_outputs.R +\name{check_crs_is_valid} +\alias{check_crs_is_valid} +\title{Check if the output is with the valid coordinate reference system} +\usage{ +check_crs_is_valid(model_output, crs_list = c("EPSG:4326", "EPSG:5070")) +} +\arguments{ +\item{model_output}{sf/sftime object of model output.} + +\item{crs_list}{a character/integer vector of acceptable CRS. Default is c("EPSG:4326", "EPSG:5070")} +} +\value{ +A logical value indicating the model is compliant to one of elements in crs_list. +} +\description{ +Check if the output is with the valid coordinate reference system +} +\author{ +Insang Song +} diff --git a/man/check_data_completeness.Rd b/man/check_data_completeness.Rd new file mode 100644 index 00000000..13712d95 --- /dev/null +++ b/man/check_data_completeness.Rd @@ -0,0 +1,28 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/check_outputs.R +\name{check_data_completeness} +\alias{check_data_completeness} +\title{Check if the output covariates are complete (TODO)} +\usage{ +check_data_completeness( + model_output, + fields_to_check, + report_fields_na = FALSE +) +} +\arguments{ +\item{model_output}{sf/sftime object of model output.} + +\item{fields_to_check}{character(varying). Field names where completeness will be checked.} + +\item{report_fields_na}{logical(1). If any fields have NA values, report the field names which gave the errors. Default is FALSE.} +} +\value{ +A logical (when report_fields_na is FALSE; TRUE means there are NA values at least one data value) or a list (when report_fields_na is TRUE) object. A list includes the list of fields that include NAs. +} +\description{ +Check if the output covariates are complete (TODO) +} +\author{ +Insang Song +} diff --git a/man/check_input_raster_in_extent.Rd b/man/check_input_raster_in_extent.Rd new file mode 100644 index 00000000..254cfa0f --- /dev/null +++ b/man/check_input_raster_in_extent.Rd @@ -0,0 +1,28 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/check_inputs.R +\name{check_input_raster_in_extent} +\alias{check_input_raster_in_extent} +\title{Check if the input raster is in the expected extent} +\usage{ +check_input_raster_in_extent( + input_raster, + spatial_domain, + domain_tolerance = 300000L +) +} +\arguments{ +\item{input_raster}{stars object} + +\item{spatial_domain}{sf/sftime object of spatial domain} + +\item{domain_tolerance}{numeric(1). Extrusion (in meters) from the bbox of spatial_domain.} +} +\value{ +A numeric value reporting the extent of input_raster is within the extent of spatial_domain +} +\description{ +Check if the input raster is in the expected extent +} +\author{ +Kyle Messier, Insang Song +} diff --git a/man/check_means_are_valid.Rd b/man/check_means_are_valid.Rd new file mode 100644 index 00000000..436a9b79 --- /dev/null +++ b/man/check_means_are_valid.Rd @@ -0,0 +1,34 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/check_outputs.R +\name{check_means_are_valid} +\alias{check_means_are_valid} +\title{Check if the output prediction mean values are in the valid range} +\usage{ +check_means_are_valid( + model_output, + model_mean_name = "prediction_mean", + observation, + observation_mean_name = "value", + tolerance_factor = 3 +) +} +\arguments{ +\item{model_output}{sf/sftime object of model output} + +\item{model_mean_name}{character(1). the name of layer where mean values are stored} + +\item{observation}{a data.frame with observations} + +\item{observation_mean_name}{character(1). field name of observations in observation object.} + +\item{tolerance_factor}{numeric(1). denominator(min) multiplier(max)} +} +\value{ +Logical value indicating the mean values are within the range or not. +} +\description{ +Check if the output prediction mean values are in the valid range +} +\author{ +Insang Song +} diff --git a/man/check_output_locations_are_valid.Rd b/man/check_output_locations_are_valid.Rd new file mode 100644 index 00000000..80a73796 --- /dev/null +++ b/man/check_output_locations_are_valid.Rd @@ -0,0 +1,22 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/check_outputs.R +\name{check_output_locations_are_valid} +\alias{check_output_locations_are_valid} +\title{Check output locations are in the reference spatial domain of the mainland US} +\usage{ +check_output_locations_are_valid(model_output, spatial_domain) +} +\arguments{ +\item{model_output}{sf/sftime object of the model output} + +\item{spatial_domain}{sf/sftime object of spatial domain} +} +\value{ +A logical vector of length nrow(model_output) +} +\description{ +Check output locations are in the reference spatial domain of the mainland US +} +\author{ +Insang Song +} From ef3caf2368a22a7fb79ab0402588e7b1fcb95294 Mon Sep 17 00:00:00 2001 From: Kyle Messier Date: Fri, 6 Oct 2023 10:09:18 -0400 Subject: [PATCH 20/23] license updates --- .Rbuildignore | 1 + DESCRIPTION | 3 +-- LICENSE | 2 ++ LICENSE.md | 21 +++++++++++++++++++++ 4 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 LICENSE create mode 100644 LICENSE.md diff --git a/.Rbuildignore b/.Rbuildignore index 86b8564c..49a852b9 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -8,3 +8,4 @@ ^R/join_point_receptor_to_polygon_source\\.r$ # Add this line ^\.Rproj\.user$ ^\.github$ +^LICENSE\.md$ diff --git a/DESCRIPTION b/DESCRIPTION index 4051242a..6887c3bb 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -14,5 +14,4 @@ Encoding: UTF-8 VignetteBuilder: knitr, rmarkdown RoxygenNote: 7.2.3 Config/testhat/edition: 3 -License: GPL-2 | MIT + file LICENSE - +License: MIT + file LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000..36462837 --- /dev/null +++ b/LICENSE @@ -0,0 +1,2 @@ +YEAR: 2023 +COPYRIGHT HOLDER: NRTAPmodel authors diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 00000000..6f113183 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,21 @@ +# MIT License + +Copyright (c) 2023 NRTAPmodel authors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. From 852835549b9830b22de7fe9faff52b0cad5fb4f6 Mon Sep 17 00:00:00 2001 From: {SET}group <127860447+Spatiotemporal-Exposures-and-Toxicology@users.noreply.github.com> Date: Fri, 6 Oct 2023 10:17:02 -0400 Subject: [PATCH 21/23] Update test-check_outputs.R add skip_on_ci() for now --- tests/testthat/test-check_outputs.R | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/testthat/test-check_outputs.R b/tests/testthat/test-check_outputs.R index b8b1fd6e..0c8bdae5 100644 --- a/tests/testthat/test-check_outputs.R +++ b/tests/testthat/test-check_outputs.R @@ -5,6 +5,7 @@ #' list of valid CRS: EPSG:5070, EPSG:4ß326 #' testthat::test_that("Output CRS is valid", { + skip_on_ci() withr::local_package("sf") withr::local_options(list(sf_use_s2 = FALSE)) From 24828d76404dd8658a57bb4350bdc2bde717ecf0 Mon Sep 17 00:00:00 2001 From: {SET}group <127860447+Spatiotemporal-Exposures-and-Toxicology@users.noreply.github.com> Date: Fri, 6 Oct 2023 10:22:56 -0400 Subject: [PATCH 22/23] Update test-check_outputs.R added skip_on_ci --- tests/testthat/test-check_outputs.R | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/testthat/test-check_outputs.R b/tests/testthat/test-check_outputs.R index 0c8bdae5..df856bba 100644 --- a/tests/testthat/test-check_outputs.R +++ b/tests/testthat/test-check_outputs.R @@ -53,6 +53,7 @@ testthat::test_that("Predicted means are within a proper range", { #' unit testing for the model output is inside the mainland US #' testthat::test_that("Output locations are in the mainland US", { + skip_on_ci() withr::local_package("sf") withr::local_package("dplyr") withr::local_options(list(sf_use_s2 = FALSE)) @@ -75,6 +76,7 @@ testthat::test_that("Output locations are in the mainland US", { #' unit testing for no NAs in covariates #' testthat::test_that("No covariates have NAs", { + skip_on_ci() withr::local_package("sf") withr::local_options(list(sf_use_s2 = FALSE)) From 66e6a2d962798d955ee27ee76d0428a6404897bd Mon Sep 17 00:00:00 2001 From: {SET}group <127860447+Spatiotemporal-Exposures-and-Toxicology@users.noreply.github.com> Date: Fri, 6 Oct 2023 10:26:54 -0400 Subject: [PATCH 23/23] Update test-coverage.yaml --- .github/workflows/test-coverage.yaml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/.github/workflows/test-coverage.yaml b/.github/workflows/test-coverage.yaml index 7abcdb78..8416ff7a 100644 --- a/.github/workflows/test-coverage.yaml +++ b/.github/workflows/test-coverage.yaml @@ -18,15 +18,6 @@ jobs: steps: - uses: actions/checkout@v3 - - uses: r-lib/actions/setup-r@v2 - with: - use-public-rspm: true - - - uses: r-lib/actions/setup-r-dependencies@v2 - with: - extra-packages: any::covr - needs: coverage - - name: Test coverage run: | covr::codecov(