From eb7721edb03a11d7fb178d60e1d1ea3a3b720e1c Mon Sep 17 00:00:00 2001 From: David Liao Date: Tue, 31 Oct 2023 18:14:55 +0000 Subject: [PATCH] UPLOAD v0.1.6 --- .gitignore | 1 + R/meeting.R | 6 +++--- tests/testthat/test_meeting.R | 15 ++++++++++----- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 130a84f5..0ee615ff 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ .Rhistory .RData .Ruserdata +.Rmd docs inst/doc /doc/ diff --git a/R/meeting.R b/R/meeting.R index aeed4d71..c8072423 100644 --- a/R/meeting.R +++ b/R/meeting.R @@ -1,4 +1,4 @@ -#' The Spoken Meeting Records 委員發言 +#'@title The Spoken Meeting Records 委員發言 #' #'@author David Liao (davidycliao@@gmail.com) #' @@ -105,7 +105,7 @@ get_meetings <- function(start_date = NULL, end_date = NULL, meeting_unit = NULL } -#' The Meeting Records of Cross-caucus Session 黨團協商資訊 +#'@title The Meeting Records of Cross-caucus Session 黨團協商資訊 #' #'@author David Liao (davidycliao@@gmail.com) #' @@ -214,7 +214,7 @@ get_caucus_meetings <- function(start_date = NULL, end_date = NULL, } -#' The Video Information of Meetings and Committees 院會及委員會之委員發言片段相關影片資訊 +#'@title The Video Information of Meetings and Committees 院會及委員會之委員發言片段相關影片資訊 #' #'@param start_date character Must be formatted in Minguo (ROC) calendar with three #'forward slashes between year, month and day, e.g. "106/10/20". diff --git a/tests/testthat/test_meeting.R b/tests/testthat/test_meeting.R index 51f59d8f..9538d40d 100644 --- a/tests/testthat/test_meeting.R +++ b/tests/testthat/test_meeting.R @@ -10,12 +10,15 @@ test_that("get_caucus_meetings", { expect_equal(get_caucus_meetings(start_date = "106/10/20", end_date = "107/03/10", verbose = FALSE)$retrieved_number ,30) }) -test_that("get_speech_video", { - expect_equal(get_speech_video(start_date = "105/10/20", end_date = "109/03/10")$retrieved_number, 547) - expect_equal(get_speech_video(start_date = "105/10/20", end_date = "109/03/10", verbose = FALSE)$retrieved_number, 547) - expect_error(get_speech_video(start_date = "104/01/01", end_date = "104/01/02", verbose = FALSE), "The query is unavailable.") +# test_that("get_speech_video", { +# expect_equal(get_speech_video(start_date = "105/10/20", end_date = "109/03/10")$retrieved_number, 547) +# expect_equal(get_speech_video(start_date = "105/10/20", end_date = "109/03/10", verbose = FALSE)$retrieved_number, 547) +# expect_error(get_speech_video(start_date = "104/01/01", end_date = "104/01/02", verbose = FALSE), "The query is unavailable.") +# +# }) + + -}) test_that("get_public_debates", { expect_equal(get_public_debates(term = 10, session_period = 1)$retrieved_number, 107) @@ -29,6 +32,8 @@ test_that("get_public_debates", { }) +get_speech_video + # test_that("get_committee_record", { # expect_equal(get_committee_record(term = 8, session_period= 1, verbose = FALSE)$retrieved_number, 613)