[Stacomir-commits] r597 - in pkg/stacomirtools: . dev man tests tests/testthat

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Nov 10 11:31:58 CET 2021


Author: briand
Date: 2021-11-10 11:31:58 +0100 (Wed, 10 Nov 2021)
New Revision: 597

Modified:
   pkg/stacomirtools/NAMESPACE
   pkg/stacomirtools/dev/03_deploy.R
   pkg/stacomirtools/man/connect-ConnectionDB-method.Rd
   pkg/stacomirtools/man/connect-ConnectionODBC-method.Rd
   pkg/stacomirtools/man/connect-RequeteODBC-method.Rd
   pkg/stacomirtools/man/connect-RequeteODBCwhere-method.Rd
   pkg/stacomirtools/man/connect-RequeteODBCwheredate-method.Rd
   pkg/stacomirtools/man/connect.Rd
   pkg/stacomirtools/man/query-RequeteDBwhere-method.Rd
   pkg/stacomirtools/man/query-RequeteDBwheredate-method.Rd
   pkg/stacomirtools/man/query.Rd
   pkg/stacomirtools/man/stacomirtools.Rd
   pkg/stacomirtools/tests/testthat.R
   pkg/stacomirtools/tests/testthat/test-03-requeteODBC.R
Log:
Fixed tests

Modified: pkg/stacomirtools/NAMESPACE
===================================================================
--- pkg/stacomirtools/NAMESPACE	2021-11-10 09:05:24 UTC (rev 596)
+++ pkg/stacomirtools/NAMESPACE	2021-11-10 10:31:58 UTC (rev 597)
@@ -21,7 +21,7 @@
 exportMethods(getquery)
 exportMethods(query)
 import(RODBC)
+import(RPostgres)
 import(methods)
 import(pool)
-import(RPostgres)
 importFrom(DBI,dbGetQuery)

Modified: pkg/stacomirtools/dev/03_deploy.R
===================================================================
--- pkg/stacomirtools/dev/03_deploy.R	2021-11-10 09:05:24 UTC (rev 596)
+++ pkg/stacomirtools/dev/03_deploy.R	2021-11-10 10:31:58 UTC (rev 597)
@@ -17,12 +17,13 @@
 ## Check the package before sending to prod
 #usethis::use_build_ignore(".dbeaver")
 # delete namespace before loading again...
+devtools::load_all()
 devtools::document()
 devtools::build_readme()
 devtools::test()
 
 #roxygen2::roxygenise(clean = TRUE) # marche pas si les .Rd ont été écrits à la main il faut les supprimer
-
+Sys.setenv("NOT_CRAN"= "false") # to set checks without testhat testthat
 devtools::check()
 rhub::check_for_cran()
 

Modified: pkg/stacomirtools/man/connect-ConnectionDB-method.Rd
===================================================================
--- pkg/stacomirtools/man/connect-ConnectionDB-method.Rd	2021-11-10 09:05:24 UTC (rev 596)
+++ pkg/stacomirtools/man/connect-ConnectionDB-method.Rd	2021-11-10 10:31:58 UTC (rev 597)
@@ -2,6 +2,7 @@
 % Please edit documentation in R/ConnectionDB.R
 \name{connect,ConnectionDB-method}
 \alias{connect,ConnectionDB-method}
+\alias{connect.ConnectionDB}
 \title{connect method for ConnectionDB class}
 \usage{
 \S4method{connect}{ConnectionDB}(object, base = NULL)

Modified: pkg/stacomirtools/man/connect-ConnectionODBC-method.Rd
===================================================================
--- pkg/stacomirtools/man/connect-ConnectionODBC-method.Rd	2021-11-10 09:05:24 UTC (rev 596)
+++ pkg/stacomirtools/man/connect-ConnectionODBC-method.Rd	2021-11-10 10:31:58 UTC (rev 597)
@@ -2,6 +2,7 @@
 % Please edit documentation in R/ConnectionODBC.R
 \name{connect,ConnectionODBC-method}
 \alias{connect,ConnectionODBC-method}
+\alias{connect.ConnectionODBC}
 \title{connect method for ConnectionODBC class}
 \usage{
 \S4method{connect}{ConnectionODBC}(object)

Modified: pkg/stacomirtools/man/connect-RequeteODBC-method.Rd
===================================================================
--- pkg/stacomirtools/man/connect-RequeteODBC-method.Rd	2021-11-10 09:05:24 UTC (rev 596)
+++ pkg/stacomirtools/man/connect-RequeteODBC-method.Rd	2021-11-10 10:31:58 UTC (rev 597)
@@ -2,6 +2,7 @@
 % Please edit documentation in R/RequeteODBC.R
 \name{connect,RequeteODBC-method}
 \alias{connect,RequeteODBC-method}
+\alias{connect.RequeteODBC}
 \title{connect method loads a request to the database and returns either an error or a data.frame}
 \usage{
 \S4method{connect}{RequeteODBC}(object)

Modified: pkg/stacomirtools/man/connect-RequeteODBCwhere-method.Rd
===================================================================
--- pkg/stacomirtools/man/connect-RequeteODBCwhere-method.Rd	2021-11-10 09:05:24 UTC (rev 596)
+++ pkg/stacomirtools/man/connect-RequeteODBCwhere-method.Rd	2021-11-10 10:31:58 UTC (rev 597)
@@ -2,6 +2,7 @@
 % Please edit documentation in R/RequeteODBCwhere.R
 \name{connect,RequeteODBCwhere-method}
 \alias{connect,RequeteODBCwhere-method}
+\alias{connect.RequeteODBCwhere}
 \title{connect method loads a request to the database and returns either an error or a data.frame}
 \usage{
 \S4method{connect}{RequeteODBCwhere}(object)

Modified: pkg/stacomirtools/man/connect-RequeteODBCwheredate-method.Rd
===================================================================
--- pkg/stacomirtools/man/connect-RequeteODBCwheredate-method.Rd	2021-11-10 09:05:24 UTC (rev 596)
+++ pkg/stacomirtools/man/connect-RequeteODBCwheredate-method.Rd	2021-11-10 10:31:58 UTC (rev 597)
@@ -2,6 +2,7 @@
 % Please edit documentation in R/RequeteODBCwheredate.R
 \name{connect,RequeteODBCwheredate-method}
 \alias{connect,RequeteODBCwheredate-method}
+\alias{connect.RequeteODBCwheredate}
 \title{connect method loads a request to the database and returns either an error or a data.frame}
 \usage{
 \S4method{connect}{RequeteODBCwheredate}(object)

Modified: pkg/stacomirtools/man/connect.Rd
===================================================================
--- pkg/stacomirtools/man/connect.Rd	2021-11-10 09:05:24 UTC (rev 596)
+++ pkg/stacomirtools/man/connect.Rd	2021-11-10 10:31:58 UTC (rev 597)
@@ -2,6 +2,7 @@
 % Please edit documentation in R/ConnectionODBC.R
 \name{connect}
 \alias{connect}
+\alias{connect.generic}
 \title{generic connect function for baseODBC}
 \usage{
 connect(object, ...)

Modified: pkg/stacomirtools/man/query-RequeteDBwhere-method.Rd
===================================================================
--- pkg/stacomirtools/man/query-RequeteDBwhere-method.Rd	2021-11-10 09:05:24 UTC (rev 596)
+++ pkg/stacomirtools/man/query-RequeteDBwhere-method.Rd	2021-11-10 10:31:58 UTC (rev 597)
@@ -2,6 +2,7 @@
 % Please edit documentation in R/RequeteDBwhere.R
 \name{query,RequeteDBwhere-method}
 \alias{query,RequeteDBwhere-method}
+\alias{query.RequeteODBCwhere}
 \title{query method loads a request to the database and returns either an error or a data.frame}
 \usage{
 \S4method{query}{RequeteDBwhere}(object, ...)

Modified: pkg/stacomirtools/man/query-RequeteDBwheredate-method.Rd
===================================================================
--- pkg/stacomirtools/man/query-RequeteDBwheredate-method.Rd	2021-11-10 09:05:24 UTC (rev 596)
+++ pkg/stacomirtools/man/query-RequeteDBwheredate-method.Rd	2021-11-10 10:31:58 UTC (rev 597)
@@ -2,6 +2,7 @@
 % Please edit documentation in R/RequeteDBwheredate.R
 \name{query,RequeteDBwheredate-method}
 \alias{query,RequeteDBwheredate-method}
+\alias{query.RequeteDBwheredate}
 \title{query method loads a request to the database and returns either an error or a data.frame}
 \usage{
 \S4method{query}{RequeteDBwheredate}(object, ...)

Modified: pkg/stacomirtools/man/query.Rd
===================================================================
--- pkg/stacomirtools/man/query.Rd	2021-11-10 09:05:24 UTC (rev 596)
+++ pkg/stacomirtools/man/query.Rd	2021-11-10 10:31:58 UTC (rev 597)
@@ -2,6 +2,7 @@
 % Please edit documentation in R/RequeteDB.R
 \name{query}
 \alias{query}
+\alias{query.RequeteDB}
 \title{generic query function for}
 \usage{
 query(object, ...)

Modified: pkg/stacomirtools/man/stacomirtools.Rd
===================================================================
--- pkg/stacomirtools/man/stacomirtools.Rd	2021-11-10 09:05:24 UTC (rev 596)
+++ pkg/stacomirtools/man/stacomirtools.Rd	2021-11-10 10:31:58 UTC (rev 597)
@@ -37,12 +37,12 @@
 
 Authors:
 \itemize{
-  \item Marion Legrand \email{<tableau-salt-loire at logrami.fr>}
+  \item Marion Legrand \email{tableau-salt-loire at logrami.fr}
 }
 
 Other contributors:
 \itemize{
-  \item Beaulaton Laurent \email{<laurent.beaulaton at ofb.gouv.fr>} [contributor]
+  \item Beaulaton Laurent \email{laurent.beaulaton at ofb.gouv.fr} [contributor]
 }
 
 }

Modified: pkg/stacomirtools/tests/testthat/test-03-requeteODBC.R
===================================================================
--- pkg/stacomirtools/tests/testthat/test-03-requeteODBC.R	2021-11-10 09:05:24 UTC (rev 596)
+++ pkg/stacomirtools/tests/testthat/test-03-requeteODBC.R	2021-11-10 10:31:58 UTC (rev 597)
@@ -19,12 +19,16 @@
 
 
 
-test_that("Test that RequeteDB returns the sql string when options(stacomiR.printquery=TRUE) ", {
+test_that("Test that RequeteDB returns the sql string when options(stacomiR.printqueries=TRUE) ", {
       skip_on_cran()
-			options(stacomiR.printquery=TRUE)
+			o <- options()
+			options(
+					stacomiR.printqueries = TRUE
+			)
       req<-new("RequeteODBC")
       req at sql<-"select * from iav.t_lot_lot limit 10"
       req at baseODBC <- c("bd_contmig_nat",user,password)   
       expect_output(req<- connect(req))
+			options(o)
     })
 

Modified: pkg/stacomirtools/tests/testthat.R
===================================================================
--- pkg/stacomirtools/tests/testthat.R	2021-11-10 09:05:24 UTC (rev 596)
+++ pkg/stacomirtools/tests/testthat.R	2021-11-10 10:31:58 UTC (rev 597)
@@ -1,4 +1,6 @@
 library(testthat)
 library(stacomirtools)
-
+user <- "postgres"
+password <- "postgres"
+host <- "localhost"
 test_check("stacomirtools")



More information about the Stacomir-commits mailing list