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

Devverse docs #18

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ trash
inst/extdata/sample_output/ras_catalog/HUC8.fgb
inst/extdata/sample_ras/timing_samples
.Rbuildignore
.RData
.Rhistory
.RRASSLER.Rproj
.Rproj.user
model-debug.Rmd
cookbooks.R
OWP_cookbooks.R
31 changes: 17 additions & 14 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
Package: RRASSLER
Type: Package
Title: R based HEC-RAS model accounting wrestler
Version: 0.1.0
Version: 0.1.2
Authors@R: c(person(given = "Jim", family = "Coll", role = c("aut", "cre"), email = "[email protected]",comment = c(ORCID = "0000-0002-6994-6668")),
person(given = "Mike", family = "Johnson", role = "ctb",email = "[email protected]",comment = c(ORCID = "0000-0002-5288-8350")),
person(given = "Mike", family = "Johnson", role = "ctb", email = "[email protected]",comment = c(ORCID = "0000-0002-5288-8350")),
person(given = "Laura", family = "Keys", role = "ctb",comment = c(ORCID = "0000-0003-1470-5215")),
person(given = "Andy", family = "Carter", role = c("ctb", "trl")),
person("NOAA", role = c("fnd")),
person("Lynker", role = c("fnd")))
person("NOAA", role = c("fnd")),
person("Lynker", role = c("fnd")))
Maintainer: Jim Coll <[email protected]>
Description: A package for making HEC-RAS data more FAIR by cataloging models, cross sections, and points for accounting, interoperability, and reuse in RAS and other applications. These tools are experimental, preliminary or provisional and are subject to revision. They are being provided to meet the need for timely better science and emergency response.
Description: A package for making HEC-RAS data more FAIR by cataloging models, cross sections, and points for accounting, interoperability, and reuse in RAS and other applications
License: MIT + file LICENSE
URL: https://github.com/NOAA-OWP/RRASSLER
BugReports: https://github.com/NOAA-OWP/RRASSLER/issues/new
Expand All @@ -22,22 +22,16 @@ Imports:
AOI,
arrow,
aws.s3,
cowplot,
data.table,
DiagrammeR,
dm,
formattable,
labelled,
doParallel,
dplyr,
foreach,
ggplot2,
glue,
httr,
leafem,
leaflet,
leafpop,
lubridate,
lwgeom,
mapview,
nhdplusTools,
parallel,
rhdf5,
Expand All @@ -48,10 +42,19 @@ Imports:
tidyr,
unglue,
utils
Suggests:
knitr,
cowplot,
DiagrammeR,
ggplot2,
leafem,
leaflet,
leafpop,
mapview
Remotes:
grimbough/rhdf5,
mikejohnson51/AOI,
Encoding: UTF-8
RoxygenNote: 7.3.1
RoxygenNote: 7.3.2
LazyData: true
VignetteBuilder: knitr
20 changes: 16 additions & 4 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
# RRASSLER 0.1.0 - 2024-06-28
> All notable changes to this project will be documented in this file. We attempt to follow the [Semantic Versioning 2.0.0](http://semver.org/) format.

# RRASSLER 0.1.2 - 2024-12-18

## Changes

More documentation polish and the reintroduction of package heavy functionality and formatting. Check out a new, in-line unit test pattern [here](https://noaa-owp.github.io/RRASSLER/articles/enhancement_accountinglock.html).

All notable changes to this project will be documented in this file. We attempt to follow the [Semantic Versioning 2.0.0](http://semver.org/) format.
# RRASSLER 0.1.1 - 2024-12-06

## Changes

Mini-fied and slimmed down the entire package into a hydrofabric-verse compatible format so that it can pass `devtools::check()` for a premier at AGU. There will be another PR following that re-adds those temporarily lost functions in a more R package appropriate form shortly.

# RRASSLER 0.1.0 - 2024-06-28

## Changes

Expand All @@ -13,10 +25,10 @@ We have reached a stable minor version that addresses parsing issues, model acco

## Changes

- Removed multiple dependencies, hull cleanup, addressed todos and typos, updated docs
- Removed multiple dependencies, hull cleanup, addressed todos and typos, updated docs.

# RRASSLER 0.0.01 - 2023-07-25

## Added

- First large release
- First large release.
15 changes: 15 additions & 0 deletions R/RRASSLER-package.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#' @keywords internal
"_PACKAGE"

## usethis namespace: start
#' @importFrom data.table :=
#' @importFrom data.table .BY
#' @importFrom data.table .EACHI
#' @importFrom data.table .GRP
#' @importFrom data.table .I
#' @importFrom data.table .N
#' @importFrom data.table .NGRP
#' @importFrom data.table .SD
#' @importFrom data.table data.table
## usethis namespace: end
NULL
4 changes: 2 additions & 2 deletions R/append_catalog_fields.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
#' @param path_to_ras_dbase the path to the folder in which you are building your catalog, Default: NULL
#' @param out_name the name of the csv you want to generate, Default: NULL
#' @param overwrite flag to dictate whether or not to overwrite the out_name, should it exist. set to TRUE to delete and (re)generate, FALSE to safely exit, Default: FALSE
#' @param is_verbose flag to determine whether print statements are suppressed, TRUE to show messages and FALSE to surpress them, Default: TRUE
#' @param is_verbose flag to determine whether print statements are suppressed, TRUE to show messages and FALSE to suppress them, Default: TRUE
#' @param HUC8_override a path to the spatial key if you need to run this over a temp dir for eg ras2fim, Default: NULL
#' @return a new csv with helper columns
#' @family post-process
#' @details DETAILS
#' @details TRUE
#' @examples
#' \dontrun{
#' if(interactive()){
Expand Down
3 changes: 1 addition & 2 deletions R/cloud_ingest_record.R
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
#' @importFrom nhdplusTools get_nhdplus
#' @importFrom AOI aoi_get
#' @importFrom arrow write_parquet

cloud_ingest_record <- function(in_file = NULL,
ras_dbase = NULL,
root_bucket = NULL,
Expand All @@ -57,7 +56,7 @@ cloud_ingest_record <- function(in_file = NULL,
overwrite = FALSE) {
# sinew::moga(file.path(getwd(),"R/cloud_ingest_record.R"),overwrite = TRUE)
# devtools::document()
# pkgdown::build_site(new_process=FALSE)
# pkgdown::build_site(new_process=TRUE)
#
# devtools::load_all()
#
Expand Down
4 changes: 2 additions & 2 deletions R/crosswalk_hull_to_hydrofabric_value.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
#' @description crosswalk_hull_to_hydrofabric_value
#' @param hull the model cross section hulls
#' @param river the river streamlines
#' @return OUTPUT_DESCRIPTION
#' @details DETAILS
#' @return The representative COMID from nhdplusTools
#' @details Used to tie into hydrofabric models
#' @family helpers
#' @examples
#' \dontrun{
Expand Down
3 changes: 2 additions & 1 deletion R/disk_ingest_record.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#' list_of_prj_files <- list.files(dir_to_scrape,pattern = glob2rx("*.prj$"),full.names = TRUE,ignore.case = TRUE,recursive = TRUE)
#' disk_ingest_record(in_file = list_of_prj_files[1], path_to_ras_dbase = ras_dbase,code_to_place_in_source = "test",proj_override = "EPSG:2277",apply_vdat_trans = FALSE,is_quiet = FALSE,is_verbose = FALSE,overwrite = FALSE)
#'
#' #EXAMPLE2
#' dir_to_scrape <- "./inst/extdata/sample_ras/ras2fim-sample-dataset/"
#' list_of_prj_files <- list.files(dir_to_scrape,pattern = glob2rx("*.prj$"),full.names = TRUE,ignore.case = TRUE,recursive = TRUE)
#' disk_ingest_record(in_file = list_of_prj_files[1], path_to_ras_dbase = ras_dbase,code_to_place_in_source = "test",proj_override = "EPSG:26915",apply_vdat_trans = FALSE,is_quiet = FALSE,is_verbose = TRUE,overwrite = FALSE)
Expand Down Expand Up @@ -56,7 +57,7 @@ disk_ingest_record <- function(in_file = NULL,
overwrite = FALSE) {
# sinew::moga(file.path(getwd(),"R/disk_ingest_record.R"),overwrite = TRUE)
# devtools::document()
# pkgdown::build_site(new_process=FALSE)
# pkgdown::build_site(new_process=TRUE)
# devtools::load_all()
#
# ras_dbase <- "./inst/extdata/sample_output/ras_catalog/"
Expand Down
8 changes: 7 additions & 1 deletion R/get_datum_from_crs.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#' @title get_datum_from_crs
#' @description attempts to parse datum and datum unit from file based on WKT
#' @param x PARAM_DESCRIPTION
#' @param x either the string or the sf crs
#' @return list of CRS and vertical unit
#' @details DETAILS
#' @examples
Expand All @@ -9,6 +9,9 @@
#' #EXAMPLE1
#' get_datum_from_crs("EPSG:6349")
#'
#' EXAMPLE2
#' get_datum_from_crs(sf::st_crs("EPSG:6349"))
#'
#' }
#' }
#' @seealso
Expand All @@ -21,6 +24,9 @@

get_datum_from_crs <- function(x) {
# sinew::moga(file.path(getwd(),"R/get_datum_from_crs.R"),overwrite = TRUE)
# devtools::document()
# pkgdown::build_site(new_process=TRUE)
# devtools::load_all()
# x <- "EPSG:6349"

## -- Start --
Expand Down
4 changes: 2 additions & 2 deletions R/load_catalog_csv_as_DT.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@
#' @param is_quiet if TRUE, function will suppress message, Default: TRUE
#' @return returns the model_catalog as a data.table object with enforced column types
#' @family helper
#' @details DETAILS
#' @details a little utility that sets column types on load for some of our sillier edge cases. the vector applied is `data.table::fread(path_to_csv,colClasses = c("nhdplus_comid" = "character","model_name" = "character","units" = "character","crs" = "character","final_name_key" = "character"))`
#' @examples
#' \dontrun{
#' if(interactive()){
#' #EXAMPLE1
#' ras_catalog_dbase = load_catalog_csv_as_DT(file.path(path_to_ras_dbase, "accounting.csv", fsep = .Platform$file.sep),is_quiet = !is_verbose)
#' }
#' }
#' @seealso
Expand All @@ -17,7 +18,6 @@
#' @export
#' @import magrittr
#' @import data.table

load_catalog_csv_as_DT <- function(path_to_csv, is_quiet = TRUE) {
# sinew::moga(file.path(getwd(),"R/load_catalog_csv_as_DT.R"),overwrite = TRUE)
# devtools::document()
Expand Down
Loading