geanders / noaastormevents

explore noaa storm database
14 stars 1 forks source link

Warning message from check() in details vignette #26

Open theresekon opened 4 years ago

theresekon commented 4 years ago

Warning: Can't find help topic 'create_storm_data

' @importFrom dplyr %>%' in current package

geanders commented 4 years ago

I bet that somewhere in the files in the "R" folder, I forgot a closing quotation mark, so somewhere we've got:

'create_storm_data

#' @importFrom dplyr %>%' in current package

where we should have:

'create_storm_data'

#' @importFrom dplyr %>%' in current package

Could you take a look in all the ".R" files in the R folder and search each for "create_storm_data" to see if we can find where we have that typo and fix it?

geanders commented 4 years ago

To check, run:

library(devtools)
check()
theresekon commented 4 years ago

These were the only instances where I found code that matches. I don't see a place where we have a quotation mark missing. Maybe this first example shouldn't have two hash marks in front of @importFrom?

#' @inheritParams create_storm_data
#'
#' #' @importFrom dplyr %>%

#' floyd_data <- create_storm_data(date_range = c("1999-10-16", "1999-10-18"))
#' floyd_data2 <- create_storm_data(storm = "Floyd-1999")
#' }
#'
#' @importFrom dplyr %>%

#' @inheritParams create_storm_data
#'
#' @importFrom dplyr %>%
geanders commented 4 years ago

Yes, try taking out that second #' from the @importFrom line of the first code you copied and see if that gets rid of that message.

theresekon commented 4 years ago

Ok, it looks like that fixed that warning!

Now the check is bringing up these errors that look like they are coming from the test files that we found yesterday:

── 1. Error: The format of the database remains unchanged (@test-database.R#5)  ─────────────────
No file found for that year and / or file type.
Backtrace:
 1. noaastormevents::find_file_name(1996)

── 2. Error: Can find filename for 1999 (@test-findfilename.R.R#5)  ─────────────────────────────
No file found for that year and / or file type.
Backtrace:
 1. testthat::expect_equal(length(find_file_name(year = 1999)), 1)
 4. noaastormevents::find_file_name(year = 1999)
geanders commented 4 years ago

Those are fine. We'll end up fixing those test files (or replacing them) as you get more into writing some tests, so these aren't a big issue.