Skip to content

Commit

Permalink
update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Bai-Li-NOAA committed Oct 19, 2023
1 parent 102aa9d commit 9b63afa
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 5 deletions.
9 changes: 6 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,17 @@ Authors@R:
person("First", "Last", , "[email protected]", role = c("aut", "cre"),
comment = c(ORCID = "YOUR-ORCID-ID"))
Description: What the package does (one paragraph).
License: `use_mit_license()`, `use_gpl3_license()` or friends to pick a
license
License: GPL (>= 3) | file LICENSE
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.2.3
Imports:
mvbutils,
tools
tools,
hexSticker,
jsonlite,
jsonvalidate,
shiny
Suggests:
testthat (>= 3.0.0)
Config/testthat/edition: 3
Expand Down
5 changes: 5 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,8 @@ export(read_in)
export(shiny_dd)
export(validate_Rd)
import(tools)
importFrom(hexSticker,sticker)
importFrom(jsonlite,fromJSON)
importFrom(jsonlite,toJSON)
importFrom(jsonvalidate,json_validate)
importFrom(shiny,runApp)
2 changes: 2 additions & 0 deletions R/add_object.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
#' @param input_list A list of fields corresponding to entries. Must include
#' \code{name,description,Examples, Units, Rationale, Alternatives, Range of possible values}
#' @return An R list in the JSON format which includes the new term.
#' @importFrom jsonlite fromJSON toJSON
#' @importFrom jsonvalidate json_validate
#' @export
add_object <- function(input_list) {
json_obj <- jsonlite::fromJSON(system.file("extdata","top20.json", package = "stockassessmentdictionary"))
Expand Down
4 changes: 4 additions & 0 deletions R/make_hex.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#' Create a hexagonal sticker for the 'fishdictionary' package.
#'
#' @importFrom hexSticker sticker
#' @return The function does not return any value but creates a hexagonal sticker image.
make_hex <- function(){
hexSticker::sticker(paste0("./static/pictures/", c("nounbook.png","nounfish.png")),
package="fishdictionary", p_size=20, s_x=c(1,1), s_y=c(.4,.9),
Expand Down
1 change: 1 addition & 0 deletions R/shiny_dd.r
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#' Run the data dictionary app
#'
#' Run the data dictionary app
#' @importFrom shiny runApp
#' @export
#' @param browse Logical. Use browser for running Shiny app.
#' @examples
Expand Down
2 changes: 1 addition & 1 deletion R/validate_Rd.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ validate_Rd <- function(Rd_file) {
if (is.null(Rd_file)) stop("Please provide the path to the R documentation (Rd) file.")

Rd <- tools::parse_Rd(Rd_file)
tags <- tools:::RdTags(Rd)
tags <- lapply(Rd, attr, "Rd_tag")

# Validate name
name <- Rd[[which(tags == "\\name")]]
Expand Down
2 changes: 1 addition & 1 deletion man/Catch.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions man/make_hex.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9b63afa

Please sign in to comment.