From eaf29100e81c2fedeabafb8756337a94ba2cc403 Mon Sep 17 00:00:00 2001
From: Johannes Boog <johannesboog@yahoo.de>
Date: Thu, 24 Nov 2022 17:09:58 +0100
Subject: [PATCH] [bugfix] namespace imports]

---
 DESCRIPTION                   | 13 ++++---------
 NAMESPACE                     |  7 +++++++
 R/generate_benchmark_script.R |  2 +-
 R/ogs6.R                      |  4 ++++
 R/ogs6_chain.R                |  1 +
 R/ogs6_ensemble.R             |  2 ++
 R/ogs6_gml.R                  |  1 +
 R/ogs6_h5.R                   |  2 ++
 R/ogs6_msh.R                  |  1 +
 R/ogs6_pvd.R                  |  2 ++
 R/ogs6_vtu.R                  |  3 ++-
 11 files changed, 27 insertions(+), 11 deletions(-)

diff --git a/DESCRIPTION b/DESCRIPTION
index f69e37c..8e5f34a 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,7 +1,7 @@
 Package: r2ogs6
 Type: Package
 Title: An API to the multi-physics simulator OpenGeoSys-v6
-Version: 0.2.0
+Version: 0.6.41
 Authors@R: c(person(given = "Ruben",
                     family = "Heinrich",
                     role = c("aut"),
@@ -33,27 +33,22 @@ Suggests:
     devtools,
     ggplot2,
     BiocManager,
-    rhdf5
+    rhdf5,
+    rmarkdown
 Imports: 
-    purrr,
     xml2,
     tibble,
     R6,
     stringr,
-    readr,
     assertthat,
     crayon,
     utils,
-    rmarkdown,
-    curl,
     dplyr,
-    rlang,
     doParallel,
     reticulate,
     config,
-    sticky,
     foreach
-RoxygenNote: 7.1.2
+RoxygenNote: 7.2.1
 VignetteBuilder: knitr
 Depends: 
     R (>= 2.10)
diff --git a/NAMESPACE b/NAMESPACE
index a2f3112..f0de41a 100644
--- a/NAMESPACE
+++ b/NAMESPACE
@@ -67,4 +67,11 @@ export(prj_time_stepping)
 export(prj_tl_process)
 export(prj_vtkdiff)
 export(read_in_prj)
+importFrom(R6,R6Class)
+importFrom(crayon,green)
+importFrom(crayon,red)
+importFrom(crayon,yellow)
+importFrom(doParallel,registerDoParallel)
+importFrom(dplyr,bind_cols)
+importFrom(dplyr,bind_rows)
 importFrom(foreach,"%dopar%")
diff --git a/R/generate_benchmark_script.R b/R/generate_benchmark_script.R
index aa26f3a..d2ef9a2 100644
--- a/R/generate_benchmark_script.R
+++ b/R/generate_benchmark_script.R
@@ -399,7 +399,7 @@ construct_add_call <- function(object, nested_call = FALSE) {
     }
 
     #For lists we need to use recursion
-    if(class(object) == "list"){
+    if(inherits(object, "list")){
 
         element_strs <- lapply(object, function(x){construct_add_call(x, TRUE)})
 
diff --git a/R/ogs6.R b/R/ogs6.R
index 0955da2..df0bcc3 100644
--- a/R/ogs6.R
+++ b/R/ogs6.R
@@ -5,6 +5,7 @@
 #' OGS6
 #' @description Constructor for the \code{OGS6} base class
 #' @export
+#' @importFrom R6 R6Class
 OGS6 <- R6::R6Class("OGS6",
   public = list(
 
@@ -171,6 +172,9 @@ OGS6 <- R6::R6Class("OGS6",
     #' @examples
     #' ogs6_obj <- OGS6$new(sim_name = "my_sim", sim_path = "my/path")
     #' ogs6_obj$get_status()
+    #' @importFrom crayon red
+    #' @importFrom crayon yellow
+    #' @importFrom crayon green
     get_status = function(print_status = TRUE){
 
       assertthat::assert_that(assertthat::is.flag(print_status))
diff --git a/R/ogs6_chain.R b/R/ogs6_chain.R
index 25d4fca..be7830b 100644
--- a/R/ogs6_chain.R
+++ b/R/ogs6_chain.R
@@ -5,6 +5,7 @@
 #'OGS6_Chain
 #'@description Constructor for the OGS6_Chain base class
 #'@export
+#' @importFrom R6 R6Class
 OGS6_Chain <- R6::R6Class(
     "OGS6_Chain",
 
diff --git a/R/ogs6_ensemble.R b/R/ogs6_ensemble.R
index ce51aad..7b4bd31 100644
--- a/R/ogs6_ensemble.R
+++ b/R/ogs6_ensemble.R
@@ -100,6 +100,7 @@ OGS6_Ensemble <- R6::R6Class(
         #' This is implementented via the 'parallel' package.
         #' @param overwrite flag: Should existing files be overwritten?
         #'@param verbose flag
+        #'@importFrom doParallel registerDoParallel
         run_simulation = function(parallel = FALSE,
                                   overwrite = T,
                                   verbose = F){
@@ -186,6 +187,7 @@ OGS6_Ensemble <- R6::R6Class(
         #' Defaults to first timestep.
         #'@param end_at_timestep number: Optional: Timestep to end at. Defaults
         #' to last timestep.
+        #'@importFrom dplyr bind_rows
         get_point_data = function(pvd_id = 1,
                                   point_ids,
                                   keys,
diff --git a/R/ogs6_gml.R b/R/ogs6_gml.R
index 48ffb80..3077dc0 100644
--- a/R/ogs6_gml.R
+++ b/R/ogs6_gml.R
@@ -24,6 +24,7 @@
 #'     ))
 #' )
 #' @export
+#' @importFrom R6 R6Class
 OGS6_gml <- R6::R6Class(
     "OGS6_gml",
     public = list(
diff --git a/R/ogs6_h5.R b/R/ogs6_h5.R
index 3fe6ee3..19c08cd 100644
--- a/R/ogs6_h5.R
+++ b/R/ogs6_h5.R
@@ -3,6 +3,7 @@
 #' OGS6_h5
 #' @description Small class to wrap \code{h5} data into the \code{r2ogs6} workflow.
 #' @export
+#' @importFrom R6 R6Class
 OGS6_h5 <- R6::R6Class("OGS6_h5",
     public = list(
         #' @description This function will be called automatically after a
@@ -78,6 +79,7 @@ OGS6_h5 <- R6::R6Class("OGS6_h5",
         #' ogs6_h5 <- OGS6_h5$new(h5_path)
         #' df <- ogs6_h5$get_df("/t_0", "pressure")
         #' \dontrun{df <- ogs6_obj$h5s[[1]]$get_df("/t_0", "pressure")}
+        #' @importFrom dplyr bind_cols
         get_df = function(group, names = "geometry") {
 
             assertthat::is.string(group)
diff --git a/R/ogs6_msh.R b/R/ogs6_msh.R
index 71b21bd..fa8cb7a 100644
--- a/R/ogs6_msh.R
+++ b/R/ogs6_msh.R
@@ -3,6 +3,7 @@
 #' MSH files are a legacy format from OGS5. It is recommended to switch to VTU
 #'  files.
 #' @export
+#' @importFrom R6 R6Class
 OGS6_msh <- R6::R6Class("OGS6_msh",
     public = list(
         #' @description reates new OGS6_vtu object..
diff --git a/R/ogs6_pvd.R b/R/ogs6_pvd.R
index 4f2ff6b..6eacfb7 100644
--- a/R/ogs6_pvd.R
+++ b/R/ogs6_pvd.R
@@ -5,6 +5,7 @@
 #' OGS6_pvd
 #' @description Constructor for the OGS6_pvd base class
 #' @export
+#' @importFrom R6 R6Class
 OGS6_pvd <- R6::R6Class(
     "OGS6_pvd",
     public = list(
@@ -260,6 +261,7 @@ OGS6_pvd <- R6::R6Class(
         },
 
         # Returns a dataframe with all of the CellData
+        #' @importFrom dplyr bind_rows
         get_data = function(data_type,
                             ids,
                             keys,
diff --git a/R/ogs6_vtu.R b/R/ogs6_vtu.R
index 4db4ffa..645124d 100644
--- a/R/ogs6_vtu.R
+++ b/R/ogs6_vtu.R
@@ -5,6 +5,7 @@
 #' OGS6_vtu
 #' @description Constructor for the `OGS6_vtu` base class
 #' @export
+#' @importFrom R6 R6Class
 OGS6_vtu <- R6::R6Class(
     "OGS6_vtu",
     public = list(
@@ -244,7 +245,7 @@ OGS6_vtu <- R6::R6Class(
     ),
 
     private = list(
-
+        #' @importFrom dplyr bind_rows
         get_data = function(data_type,
                             ids,
                             keys){
-- 
GitLab