Skip to content

Commit

Permalink
Merge pull request #109 from Appsilon/tomek.abstract_class_no_init
Browse files Browse the repository at this point in the history
No initialization of abstract class
  • Loading branch information
kamilzyla committed Apr 28, 2023
2 parents 1fbfdb1 + 8d261cb commit c1ac1f6
Show file tree
Hide file tree
Showing 8 changed files with 1 addition and 52 deletions.
1 change: 0 additions & 1 deletion R/data-storage-log-file.R
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ DataStorageLogFile <- R6::R6Class( # nolint object_name_linter
#' @param log_file_path string with path to JSON log file user actions

initialize = function(log_file_path) {
super$initialize()
logger::log_debug(
"path to file: {log_file_path}",
namespace = "shiny.telemetry"
Expand Down
1 change: 0 additions & 1 deletion R/data-storage-mariadb.R
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ DataStorageMariaDB <- R6::R6Class( # nolint object_name_linter
port = 3306,
dbname = "shiny_telemetry"
) {
super$initialize()
checkmate::assert_string(password)
checkmate::assert_string(username)
checkmate::assert_string(hostname)
Expand Down
1 change: 0 additions & 1 deletion R/data-storage-plumber.R
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ DataStoragePlumber <- R6::R6Class( # nolint object_name_linter
secret = NULL,
authorization = NULL
) {
super$initialize()

private$hostname <- hostname
private$port <- port
Expand Down
1 change: 0 additions & 1 deletion R/data-storage-postgresql.R
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ DataStoragePostgreSQL <- R6::R6Class( # nolint object_name_linter
port = 5432,
dbname = "shiny_telemetry"
) {
super$initialize()
checkmate::assert_string(password)
checkmate::assert_string(username)
checkmate::assert_string(hostname)
Expand Down
8 changes: 0 additions & 8 deletions R/data-storage-sql-family.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,6 @@ DataStorageSQLFamily <- R6::R6Class( # nolint object_name_linter
#
# Public
public = list(

#' @description
#' Initialize the data storage class

initialize = function() {
super$initialize()
}

),
#
# Private
Expand Down
1 change: 0 additions & 1 deletion R/data-storage-sqlite.R
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ DataStorageSQLite <- R6::R6Class( # nolint object_name_linter
initialize = function(
db_path = "user_stats.sqlite"
) {
super$initialize()

logger::log_debug("path to db: {db_path}", namespace = "shiny.telemetry")
private$connect(db_path)
Expand Down
2 changes: 1 addition & 1 deletion R/data-storage.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ DataStorage <- R6::R6Class( # nolint object_name_linter
#' @description initialize data storage object common with all providers

initialize = function() {

stop(paste(class(self)[1], "is an abstract class that can't be initialized."))
},

#' @description Insert new data
Expand Down
38 changes: 0 additions & 38 deletions tests/testthat/test-data_storage.R

This file was deleted.

0 comments on commit c1ac1f6

Please sign in to comment.