[Stacomir-commits] r531 - in pkg/stacomir: inst/cran-comments tests/testthat

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Oct 1 17:46:18 CEST 2018


Author: legrand
Date: 2018-10-01 17:46:17 +0200 (Mon, 01 Oct 2018)
New Revision: 531

Modified:
   pkg/stacomir/inst/cran-comments/cran-comments-v0.5.4.0.md
   pkg/stacomir/tests/testthat/test-01-report_mig_mult.R
   pkg/stacomir/tests/testthat/test-10-report_env.R
   pkg/stacomir/tests/testthat/test-11-report_mig_env.R
   pkg/stacomir/tests/testthat/test-13-report_species.R
Log:
update cran-comments and overriding user schema when iav schema is needed (inside some test file)

Modified: pkg/stacomir/inst/cran-comments/cran-comments-v0.5.4.0.md
===================================================================
--- pkg/stacomir/inst/cran-comments/cran-comments-v0.5.4.0.md	2018-10-01 15:19:57 UTC (rev 530)
+++ pkg/stacomir/inst/cran-comments/cran-comments-v0.5.4.0.md	2018-10-01 15:46:17 UTC (rev 531)
@@ -10,14 +10,10 @@
 
 In addition this version adds :
 
+* the removal of calls to the database named "test", and use of dplyr for internal calculations. 
+* the update of tests
+* the developpement of a vignette to present the package
 
-* compilation of messages, fixes bug for for some year in report\_mig\_mult
-* Editing translation messages 
-* fix bug for setasqualitative method in report\_sea__age
-* updated documentation 
-* Modification in glass eel graph
-* changes to the summary-report\_mig\_interannual-method 
-
 #Testing Environments
 
 My Windows machine.

Modified: pkg/stacomir/tests/testthat/test-01-report_mig_mult.R
===================================================================
--- pkg/stacomir/tests/testthat/test-01-report_mig_mult.R	2018-10-01 15:19:57 UTC (rev 530)
+++ pkg/stacomir/tests/testthat/test-01-report_mig_mult.R	2018-10-01 15:46:17 UTC (rev 531)
@@ -1,7 +1,13 @@
 context("report_mig_mult")
 test_that("Test an instance of report_mig_mult",{
       skip_if_not(stacomi_installed(),"skipping as the program is not installed on this computer")
-	  stacomi(gr_interface=FALSE,login_window=FALSE,database_expected=FALSE)
+	  stacomi(gr_interface=FALSE,login_window=FALSE,database_expected=TRUE)
+	  # overriding user schema
+	  baseODBC<-get("baseODBC",envir=envir_stacomi)
+	  baseODBC[c(2,3)]<-rep("iav",2)
+	  assign("baseODBC",baseODBC,envir_stacomi)
+	  sch<-get("sch",envir=envir_stacomi) # "iav."
+	  assign("sch","iav.",envir_stacomi)
 	  report_mig_mult<-new("report_mig_mult")
 	  #options(warn = -1)
 	  report_mig_mult<-suppressWarnings(choice_c(report_mig_mult,
@@ -20,7 +26,13 @@
 ## This test check that the code above works with numeric and a different formating for date
 test_that("Test another instance of report_mig_mult",{
       skip_if_not(stacomi_installed(),"skipping as the program is not installed on this computer")
-	  stacomi(gr_interface=FALSE,login_window=FALSE,database_expected=FALSE)
+	  stacomi(gr_interface=FALSE,login_window=FALSE,database_expected=TRUE)
+	  # overriding user schema
+	  baseODBC<-get("baseODBC",envir=envir_stacomi)
+	  baseODBC[c(2,3)]<-rep("iav",2)
+	  assign("baseODBC",baseODBC,envir_stacomi)
+	  sch<-get("sch",envir=envir_stacomi) # "iav."
+	  assign("sch","iav.",envir_stacomi)
 	  report_mig_mult<-new("report_mig_mult")
 	  #options(warn = -1)
 	  report_mig_mult<-suppressWarnings(choice_c(report_mig_mult,
@@ -38,7 +50,13 @@
 test_that("Tests one instance with error (dc does not exist)",
 	{
       skip_if_not(stacomi_installed(),"skipping as the program is not installed on this computer")
-	  stacomi(gr_interface=FALSE,login_window=FALSE,database_expected=FALSE)
+	  stacomi(gr_interface=FALSE,login_window=FALSE,database_expected=TRUE)
+	  # overriding user schema
+	  baseODBC<-get("baseODBC",envir=envir_stacomi)
+	  baseODBC[c(2,3)]<-rep("iav",2)
+	  assign("baseODBC",baseODBC,envir_stacomi)
+	  sch<-get("sch",envir=envir_stacomi) # "iav."
+	  assign("sch","iav.",envir_stacomi)
 	  report_mig_mult<-new("report_mig_mult")
 	  options(warn = -1)
 	  expect_error(choice_c(report_mig_mult,
@@ -55,7 +73,13 @@
 test_that("Test charge method for report_mig_mult",
 	{
 	  skip_if_not(stacomi_installed(),"skipping as the program is not installed on this computer")
-	  stacomi(gr_interface=FALSE,login_window=FALSE,database_expected=FALSE)
+	  stacomi(gr_interface=FALSE,login_window=FALSE,database_expected=TRUE)
+	  # overriding user schema
+	  baseODBC<-get("baseODBC",envir=envir_stacomi)
+	  baseODBC[c(2,3)]<-rep("iav",2)
+	  assign("baseODBC",baseODBC,envir_stacomi)
+	  sch<-get("sch",envir=envir_stacomi) # "iav."
+	  assign("sch","iav.",envir_stacomi)
 	  report_mig_mult<-new("report_mig_mult")
 	  options(warn = -1)
 	  report_mig_mult<-choice_c(report_mig_mult,
@@ -76,7 +100,13 @@
 test_that("Test connect method for report_mig_mult",
 	{
 	  skip_if_not(stacomi_installed(),"skipping as the program is not installed on this computer")
-	  stacomi(gr_interface=FALSE,login_window=FALSE,database_expected=FALSE)
+	  stacomi(gr_interface=FALSE,login_window=FALSE,database_expected=TRUE)
+	  # overriding user schema
+	  baseODBC<-get("baseODBC",envir=envir_stacomi)
+	  baseODBC[c(2,3)]<-rep("iav",2)
+	  assign("baseODBC",baseODBC,envir_stacomi)
+	  sch<-get("sch",envir=envir_stacomi) # "iav."
+	  assign("sch","iav.",envir_stacomi)
 	  report_mig_mult<-new("report_mig_mult")
 	  options(warn = -1)
 	  report_mig_mult<-choice_c(report_mig_mult,

Modified: pkg/stacomir/tests/testthat/test-10-report_env.R
===================================================================
--- pkg/stacomir/tests/testthat/test-10-report_env.R	2018-10-01 15:19:57 UTC (rev 530)
+++ pkg/stacomir/tests/testthat/test-10-report_env.R	2018-10-01 15:46:17 UTC (rev 531)
@@ -3,7 +3,13 @@
 
 test_that("test creating an instance of report_env",{
 	  skip_if_not(stacomi_installed(),"skipping as the program is not installed on this computer")
-	  stacomi(gr_interface=FALSE,login_window=FALSE,database_expected=FALSE)
+	  stacomi(gr_interface=FALSE,login_window=FALSE,database_expected=TRUE)
+	  # overriding user schema
+	  baseODBC<-get("baseODBC",envir=envir_stacomi)
+	  baseODBC[c(2,3)]<-rep("iav",2)
+	  assign("baseODBC",baseODBC,envir_stacomi)
+	  sch<-get("sch",envir=envir_stacomi) # "iav."
+	  assign("sch","iav.",envir_stacomi)
 	  r_env<-new("report_env")
 	  r_env<-choice_c(r_env,
 		  stationMesure=c("temp_gabion","coef_maree"),
@@ -17,7 +23,13 @@
 
 test_that("test plot method",{
 	  skip_if_not(stacomi_installed(),"skipping as the program is not installed on this computer")
-	  stacomi(gr_interface=FALSE,login_window=FALSE,database_expected=FALSE)
+	  stacomi(gr_interface=FALSE,login_window=FALSE,database_expected=TRUE)
+	  # overriding user schema
+	  baseODBC<-get("baseODBC",envir=envir_stacomi)
+	  baseODBC[c(2,3)]<-rep("iav",2)
+	  assign("baseODBC",baseODBC,envir_stacomi)
+	  sch<-get("sch",envir=envir_stacomi) # "iav."
+	  assign("sch","iav.",envir_stacomi)
 	  r_env<-new("report_env")
 	  r_env<-choice_c(r_env,
 		  stationMesure=c("temp_gabion","coef_maree"),

Modified: pkg/stacomir/tests/testthat/test-11-report_mig_env.R
===================================================================
--- pkg/stacomir/tests/testthat/test-11-report_mig_env.R	2018-10-01 15:19:57 UTC (rev 530)
+++ pkg/stacomir/tests/testthat/test-11-report_mig_env.R	2018-10-01 15:46:17 UTC (rev 531)
@@ -3,7 +3,13 @@
 
 test_that("test creating an instance of report_mig_env",{
 	  skip_if_not(stacomi_installed(),"skipping as the program is not installed on this computer")
-	  stacomi(gr_interface=FALSE,login_window=FALSE,database_expected=FALSE)
+	  stacomi(gr_interface=FALSE,login_window=FALSE,database_expected=TRUE)
+	  # overriding user schema
+	  baseODBC<-get("baseODBC",envir=envir_stacomi)
+	  baseODBC[c(2,3)]<-rep("iav",2)
+	  assign("baseODBC",baseODBC,envir_stacomi)
+	  sch<-get("sch",envir=envir_stacomi) # "iav."
+	  assign("sch","iav.",envir_stacomi)
 	  r_mig_env<-new("report_mig_env")
 	  r_mig_env<-choice_c(r_mig_env,
 		  dc=c(5,6,12),
@@ -22,7 +28,13 @@
 
 test_that("test plot method",{
 	  skip_if_not(stacomi_installed(),"skipping as the program is not installed on this computer")
-	  stacomi(gr_interface=FALSE,login_window=FALSE,database_expected=FALSE)
+	  stacomi(gr_interface=FALSE,login_window=FALSE,database_expected=TRUE)
+	  # overriding user schema
+	  baseODBC<-get("baseODBC",envir=envir_stacomi)
+	  baseODBC[c(2,3)]<-rep("iav",2)
+	  assign("baseODBC",baseODBC,envir_stacomi)
+	  sch<-get("sch",envir=envir_stacomi) # "iav."
+	  assign("sch","iav.",envir_stacomi)
 	  r_mig_env<-new("report_mig_env")
 	  r_mig_env<-choice_c(r_mig_env,
 		  dc=c(5,6,12),

Modified: pkg/stacomir/tests/testthat/test-13-report_species.R
===================================================================
--- pkg/stacomir/tests/testthat/test-13-report_species.R	2018-10-01 15:19:57 UTC (rev 530)
+++ pkg/stacomir/tests/testthat/test-13-report_species.R	2018-10-01 15:46:17 UTC (rev 531)
@@ -6,7 +6,13 @@
 	  skip_if_not(stacomi_installed(),"skipping as the program is not installed on this computer")
 	  stacomi(gr_interface=FALSE,
 		  login_window=FALSE,
-		  database_expected=FALSE)
+		  database_expected=TRUE)
+	  # overriding user schema
+	  baseODBC<-get("baseODBC",envir=envir_stacomi)
+	  baseODBC[c(2,3)]<-rep("iav",2)
+	  assign("baseODBC",baseODBC,envir_stacomi)
+	  sch<-get("sch",envir=envir_stacomi) # "iav."
+	  assign("sch","iav.",envir_stacomi)
 	  bilesp<-new("report_species")
 	  # split is one of "none", "year", "week", "month
 	  
@@ -29,7 +35,13 @@
 	  skip_if_not(stacomi_installed(),"skipping as the program is not installed on this computer")
 	  stacomi(gr_interface=FALSE,
 		  login_window=FALSE,
-		  database_expected=FALSE)
+		  database_expected=TRUE)
+  # overriding user schema
+  baseODBC<-get("baseODBC",envir=envir_stacomi)
+  baseODBC[c(2,3)]<-rep("iav",2)
+  assign("baseODBC",baseODBC,envir_stacomi)
+  sch<-get("sch",envir=envir_stacomi) # "iav."
+  assign("sch","iav.",envir_stacomi)
 	  bilesp<-new("report_species")
 	  # split is one of "none", "year", "week", "month
 	  



More information about the Stacomir-commits mailing list