Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.2.0 dev #83

Merged
merged 68 commits into from
Jun 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
ea43e5a
https://github.com/NIEHS/amadeus/issues/71
mitchellmanware Apr 25, 2024
334846d
https://github.com/NIEHS/amadeus/issues/70
mitchellmanware Apr 25, 2024
9c2502a
https://github.com/NIEHS/amadeus/issues/66
mitchellmanware Apr 26, 2024
867628e
https://github.com/NIEHS/amadeus/issues/64
mitchellmanware Apr 26, 2024
a9dcdf7
deprecate directory_to_download (download_hms) only
mitchellmanware Apr 26, 2024
480d3ac
deprecate directory_to_download 2
mitchellmanware Apr 29, 2024
8b87dcc
0.1.8 dev
sigmafelix Apr 30, 2024
062f448
https://github.com/NIEHS/amadeus/issues/68
mitchellmanware Apr 30, 2024
f0b5af8
update process_locs_vector to accept data.frame, sf, and SpatVector; …
mitchellmanware Apr 30, 2024
afcb0a7
process_hms patch
sigmafelix Apr 30, 2024
9830c50
extraction functions; geom = parameter
mitchellmanware May 1, 2024
53f99c3
update calc_koppen_geiger and calc_nlcd\n - utilize calc_process_locs…
mitchellmanware May 1, 2024
30af056
update calc_gmted, calc_ecoregion, calc_sedac*, calc_narr, calc_geos,…
mitchellmanware May 1, 2024
f4a891c
0.1.8 dev (05012024)
sigmafelix May 1, 2024
492f995
fix calc_lagged
mitchellmanware May 2, 2024
b1f8b42
update README.md and vignettes/download_functions.Rmd
mitchellmanware May 2, 2024
84b0d12
update README.md 2
mitchellmanware May 2, 2024
c264ed0
update README.md 3
mitchellmanware May 2, 2024
6587eee
udpate README.md 4
mitchellmanware May 2, 2024
57d117f
update calc_time with as.POSIXlt wrap; calc_time_check for all calc_*…
mitchellmanware May 2, 2024
84c1155
update documentation
mitchellmanware May 2, 2024
7c92997
download_data roxygen
mitchellmanware May 2, 2024
d5cb4de
process_aqs update
sigmafelix May 3, 2024
9329d3a
Merge branch 'isong-hucvars' into mm-manuscript-0425
sigmafelix May 3, 2024
7263ee0
Merge pull request #78 from NIEHS/mm-manuscript-0425
sigmafelix May 3, 2024
4a7f116
0.2.0dev
sigmafelix May 6, 2024
c0f78fc
MODIS functions bugfix
sigmafelix May 7, 2024
3e5f4ee
calc_nlcd bug fix
sigmafelix May 8, 2024
5fb0b6f
calc_nlcd roxygen doc fix
sigmafelix May 8, 2024
7b75408
calc_modis_par fix
sigmafelix May 15, 2024
a1ab9d5
Small fix
sigmafelix May 21, 2024
1965247
Hotfix: process_aqs
sigmafelix May 24, 2024
2701adb
process_aqs
sigmafelix May 28, 2024
337cd75
calc_ecoregions bug fix
sigmafelix May 29, 2024
ee50712
ecoregion function refactoring
sigmafelix May 30, 2024
21658ab
nlcd functions refactoring
sigmafelix May 30, 2024
1432d08
nlcd refactoring + lint
sigmafelix May 30, 2024
59cdef8
Rd syntax check
sigmafelix May 30, 2024
6dfebbd
lint + dependency fix
sigmafelix May 30, 2024
0ed2bb5
bug fix + test fix
sigmafelix May 31, 2024
0602464
test fix
sigmafelix May 31, 2024
f49641e
hms test fix
mitchellmanware May 31, 2024
96c0ddf
Vignette test error fix
sigmafelix May 31, 2024
ba71653
Minor change in docs
sigmafelix May 31, 2024
67aefd3
download_aqs fix
sigmafelix Jun 2, 2024
188238a
Download function update
sigmafelix Jun 3, 2024
8a7d71f
workflow to print errors
sigmafelix Jun 3, 2024
2c401d1
download patch
sigmafelix Jun 3, 2024
53bff7b
ad hoc patch
sigmafelix Jun 3, 2024
efc92c1
yaml fix
sigmafelix Jun 3, 2024
ad092fb
printing testcov results
sigmafelix Jun 4, 2024
1d48f65
yaml edit
sigmafelix Jun 4, 2024
724d050
yaml fix 3
sigmafelix Jun 4, 2024
b9bf675
yaml + R script for GH Action
sigmafelix Jun 4, 2024
ac2af2e
create runner temp dir
sigmafelix Jun 4, 2024
98c69a4
yaml: create dir in runner temp
sigmafelix Jun 4, 2024
71f1eee
yaml tweak
sigmafelix Jun 4, 2024
25aa2bb
Test fix + yaml change
sigmafelix Jun 4, 2024
462be82
calc_lagged patch + yaml fix
sigmafelix Jun 4, 2024
dc899d5
yaml fix for covr::report
sigmafelix Jun 4, 2024
f992ece
test coverage improvement
sigmafelix Jun 4, 2024
fc8f06a
AQS event processing update
sigmafelix Jun 12, 2024
5dd89c0
process_aqs patch
sigmafelix Jun 12, 2024
7b1eea0
test coverage improvement
sigmafelix Jun 18, 2024
73b040a
test coverage + edit download_functions
sigmafelix Jun 18, 2024
9bd7c50
test error fix
sigmafelix Jun 18, 2024
28fca01
Merge branch 'main' into isong-hucvars
sigmafelix Jun 18, 2024
bc5c58e
Fixing 0.05% short of coverage
sigmafelix Jun 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 47 additions & 1 deletion .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,47 @@ on:
name: pkgdown

jobs:
test-covr:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

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

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: |
any::pak
any::covr
any::devtools
any::DT
any::htmltools
needs: coverage

- name: Cache C++ and R dependencies
uses: actions/cache@v4
with:
path: |
~/.cache/R
~/.local/share/R
key: dependencies-${{ runner.os }}-${{ hashFiles('**/DESCRIPTION') }}
restore-keys: |
dependencies-${{ runner.os }}-

- name: Run tests and generate covr report
run: |
Rscript -e 'covr::report(file = "coverage_report.html")'

- name: Upload covr report as artifact
uses: actions/upload-artifact@v4
with:
name: covr-report
path: coverage_report.html

pkgdown:
needs: test-covr
runs-on: ubuntu-latest
# Only restrict concurrency for non-PR jobs
concurrency:
Expand All @@ -24,6 +64,12 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Download covr report
uses: actions/download-artifact@v4
with:
name: covr-report
path: .

- uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r@v2
Expand All @@ -41,7 +87,7 @@ jobs:

- name: Deploy to GitHub pages 🚀
if: github.event_name != 'pull_request'
uses: JamesIves/github-pages-deploy-action@v4.4.1
uses: JamesIves/github-pages-deploy-action@v4.6.1
with:
clean: false
branch: gh-pages
Expand Down
27 changes: 19 additions & 8 deletions .github/workflows/test-coverage-local.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,13 @@ jobs:

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::covr
needs: coverage
extra-packages: |
any::pak
any::covr
needs: coverage

- name: Cache C++ and R dependencies
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: |
~/.cache/R
Expand All @@ -38,10 +40,15 @@ jobs:
dependencies-${{ runner.os }}-

- name: Test coverage
run: >
Rscript -e
"covd<-covr::coverage_to_list()$totalcoverage;
write.table(covd[length(covd)], file = '${{ github.workspace }}/local_cov.Rout', row.names = F, col.names = F)"
run: |
Rscript ${{ github.workspace }}/.github/workflows/test-coverage.R ${{ runner.temp }} ${{ github.workspace }}
shell: bash

- name: Show testthat output
if: always()
run: |
## --------------------------------------------------------------------
find ${{ runner.temp }}/package -name 'testthat.Rout*' -exec cat '{}' \; || true
shell: bash

- name: Get Values
Expand All @@ -61,6 +68,10 @@ jobs:
id: patch-comparison
shell: bash
run: |
if ( ! test -f cov_current.Rout ); then
echo "0" >> cov_current.Rout
fi

cov_patch="${{ steps.get-values.outputs.coverage }}"
cov_current=$(cat cov_current.Rout)
echo "Current coverage: $cov_current"
Expand All @@ -86,7 +97,7 @@ jobs:
run: |
npm i -g badgen-cli
export COV=${{ steps.get-values.outputs.coverage }}
COLOR=$(node -p '+process.env.COV >= 95 ? `green` : `orange`')
COLOR=$(node -p '+process.env.COV >= 95 ? `green` : `yellow`')
mkdir -p badges
badgen -j coverage -s $COV% -c $COLOR > badges/coverage.svg

Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/test-coverage.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
args <- commandArgs(trailingOnly = TRUE)
runnertemp <- args[[1]]
ghworkspace <- args[[2]]

dir.create(file.path(runnertemp, "package"), showWarnings = FALSE, recursive = TRUE)
sink(paste0(runnertemp, '/package/testthat.Rout.res'))
cov <- covr::package_coverage()
sink()
covd <- covr::coverage_to_list(cov)$totalcoverage
write.table(
covd[length(covd)],
file = file.path(ghworkspace, 'local_cov.Rout'),
row.names = FALSE,
col.names = FALSE
)
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: amadeus
Title: AMADEUS: A Machine for Data, Environments, and User Setup for common environmental and climate health datasets
Version: 0.1.7
Version: 0.2.0
Authors@R: c(
person("Kyle", "Messier", , "kyle.messier@nih.gov", role = c("aut", "cre"), comment = c(ORCID = "0000-0001-9508-9623")),
person("Mitchell", "Manware", role = c("aut", "ctb"), comment = c(ORCID = "0009-0003-6440-6106")),
Expand All @@ -12,7 +12,7 @@ Authors@R: c(
)
Description: A Mechanism/Machine for Data, Environments, and User Setup package for health and climate research. It is fully tested, versioned, and open source and open access.
Depends: R (>= 4.1.0)
Imports: dplyr, sf, sftime, stats, terra, methods, data.table, httr, rvest, exactextractr, utils, stringi, testthat (>= 3.0.0), doParallel, parallelly, stars, foreach, future, tidyr, rlang, rstac, nhdplusTools, archive
Imports: dplyr, sf, sftime, stats, terra, methods, data.table, httr, rvest, exactextractr, utils, stringi, testthat (>= 3.0.0), parallelly, stars, future, future.apply, tidyr, rlang, rstac, nhdplusTools, archive, collapse, devtools
Suggests: covr, withr, knitr, rmarkdown, lwgeom, FNN, doRNG
Encoding: UTF-8
VignetteBuilder: knitr, rmarkdown
Expand Down
62 changes: 36 additions & 26 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Generated by roxygen2: do not edit by hand

export(as_mysftime)
export(calc_check_time)
export(calc_covariates)
export(calc_ecoregion)
export(calc_geos)
Expand Down Expand Up @@ -31,36 +32,36 @@ export(check_mysf)
export(check_mysftime)
export(check_url_status)
export(check_urls)
export(download_aqs_data)
export(download_cropscape_data)
export(download_aqs)
export(download_cropscape)
export(download_data)
export(download_ecoregion_data)
export(download_ecoregion)
export(download_epa_certificate)
export(download_geos_data)
export(download_gmted_data)
export(download_gridmet_data)
export(download_hms_data)
export(download_huc_data)
export(download_koppen_geiger_data)
export(download_merra2_data)
export(download_modis_data)
export(download_narr_monolevel_data)
export(download_narr_p_levels_data)
export(download_nei_data)
export(download_nlcd_data)
export(download_olm_data)
export(download_geos)
export(download_gmted)
export(download_gridmet)
export(download_hms)
export(download_huc)
export(download_koppen_geiger)
export(download_merra2)
export(download_modis)
export(download_narr_monolevel)
export(download_narr_p_levels)
export(download_nei)
export(download_nlcd)
export(download_olm)
export(download_permit)
export(download_prism_data)
export(download_prism)
export(download_remove_command)
export(download_remove_zips)
export(download_run)
export(download_sanitize_path)
export(download_sedac_groads_data)
export(download_sedac_population_data)
export(download_sedac_groads)
export(download_sedac_population)
export(download_setup_dir)
export(download_sink)
export(download_terraclimate_data)
export(download_tri_data)
export(download_terraclimate)
export(download_tri)
export(download_unzip)
export(dt_as_mysftime)
export(extract_urls)
Expand Down Expand Up @@ -122,30 +123,34 @@ import(sf)
import(sftime)
import(stars)
importFrom(archive,archive_extract)
importFrom(collapse,rowbind)
importFrom(data.table,.SD)
importFrom(data.table,as.data.table)
importFrom(data.table,fread)
importFrom(data.table,month)
importFrom(data.table,rbindlist)
importFrom(data.table,year)
importFrom(doParallel,registerDoParallel)
importFrom(dplyr,across)
importFrom(dplyr,all_of)
importFrom(dplyr,as_tibble)
importFrom(dplyr,bind_rows)
importFrom(dplyr,distinct)
importFrom(dplyr,ends_with)
importFrom(dplyr,filter)
importFrom(dplyr,group_by)
importFrom(dplyr,lag)
importFrom(dplyr,left_join)
importFrom(dplyr,mutate)
importFrom(dplyr,select)
importFrom(dplyr,summarize)
importFrom(dplyr,ungroup)
importFrom(exactextractr,exact_extract)
importFrom(foreach,"%dopar%")
importFrom(foreach,foreach)
importFrom(future,cluster)
importFrom(future,multicore)
importFrom(future,plan)
importFrom(future,sequential)
importFrom(future.apply,future_Map)
importFrom(future.apply,future_lapply)
importFrom(httr,GET)
importFrom(httr,HEAD)
importFrom(methods,is)
Expand All @@ -159,10 +164,16 @@ importFrom(rstac,read_collections)
importFrom(rstac,read_items)
importFrom(rstac,read_stac)
importFrom(sf,st_as_sf)
importFrom(sf,st_as_sfc)
importFrom(sf,st_crs)
importFrom(sf,st_drop_geometry)
importFrom(sf,st_geometry)
importFrom(sf,st_intersects)
importFrom(sf,st_read)
importFrom(sf,st_transform)
importFrom(sf,st_union)
importFrom(stars,read_stars)
importFrom(stars,st_mosaic)
importFrom(stars,st_warp)
importFrom(stats,aggregate)
importFrom(stats,setNames)
Expand Down Expand Up @@ -190,8 +201,7 @@ importFrom(terra,nlyr)
importFrom(terra,perim)
importFrom(terra,project)
importFrom(terra,rast)
importFrom(terra,same.crs)
importFrom(terra,snap)
importFrom(terra,set.crs)
importFrom(terra,sprc)
importFrom(terra,subset)
importFrom(terra,tapp)
Expand Down
Loading
Loading