Skip to content

Commit 5b40c65

Browse files
authored
Merge pull request #103 from Appsilon/fix-check
Prepare package for CRAN submission
2 parents aff82a2 + 4311723 commit 5b40c65

File tree

9 files changed

+72
-41
lines changed

9 files changed

+72
-41
lines changed

DESCRIPTION

Lines changed: 52 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,61 @@
11
Package: shiny.telemetry
22
Type: Package
3-
Title: Shiny app usability logs and statistics
4-
Version: 0.0.9009
5-
Author: Appsilon Data Science <dev@appsilondatascience.com>
6-
Maintainer: Appsilon Data Science <dev@appsilondatascience.com>
7-
Description: Easy way for logging users activity and adding statistics panel to your Shiny app.
3+
Title: Shiny App Usage Telemetry
4+
Version: 0.1.0
5+
Authors@R:
6+
c(
7+
person("Kamil", "Żyła", role = c("aut", "cre"), email = "opensource+kamil@appsilon.com"),
8+
person("André", "Veríssimo", role = "aut", email = "andre.verissimo@appsilon.com"),
9+
person("Krystian", "Igras", role = "aut", email = "krystian8207@gmail.com"),
10+
person("Recle", "Vibal", role = "aut", email = "recle.vibal@appsilon.com"),
11+
person("Appsilon Sp. z o.o.", role = "cph", email = "opensource@appsilon.com")
12+
)
13+
Description:
14+
Enables instrumentation of 'Shiny' apps for tracking user session events
15+
such as input changes, browser type, and session duration.
16+
These events can be sent to any of the available storage backends
17+
and analyzed using the included 'Shiny' app to gain insights about app usage and adoption.
818
License: LGPL-3
919
Encoding: UTF-8
1020
LazyData: true
1121
Suggests:
12-
plumber,
13-
box,
14-
stringr,
15-
here,
16-
testthat (>= 3.0.0),
17-
mockery,
18-
withr,
19-
lintr,
20-
spelling,
21-
rcmdcheck,
22-
RPostgreSQL,
23-
RMariaDB,
24-
timevis,
25-
RColorBrewer,
26-
plotly,
27-
DT,
28-
shinyjs,
29-
scales,
30-
semantic.dashboard (>= 0.1.1),
31-
shiny.semantic (>= 0.2.0),
32-
config
33-
Imports: purrr,
34-
tidyr,
35-
dplyr,
36-
odbc,
37-
jsonlite,
38-
logger,
39-
R6,
40-
RSQLite,
41-
rlang,
42-
checkmate,
43-
glue,
44-
shiny,
45-
httr2,
46-
digest,
47-
lubridate
22+
box,
23+
config,
24+
DT,
25+
here,
26+
lintr,
27+
mockery,
28+
plotly,
29+
plumber,
30+
rcmdcheck,
31+
RColorBrewer,
32+
RMariaDB,
33+
RPostgreSQL,
34+
scales,
35+
semantic.dashboard (>= 0.1.1),
36+
shiny.semantic (>= 0.2.0),
37+
shinyjs,
38+
spelling,
39+
stringr,
40+
testthat (>= 3.1.7),
41+
timevis,
42+
withr
43+
Imports:
44+
checkmate,
45+
digest,
46+
dplyr (>= 1.1.0),
47+
glue,
48+
httr2,
49+
jsonlite,
50+
logger,
51+
lubridate,
52+
odbc,
53+
purrr,
54+
R6,
55+
rlang,
56+
RSQLite,
57+
shiny,
58+
tidyr
4859
RoxygenNote: 7.2.3
4960
Config/testthat/edition: 3
5061
Language: en-US

R/data-storage-log-file.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#' @export
88
#'
99
#' @examples
10+
#' \dontrun{
1011
#' data_storage <- DataStorageLogFile$new(
1112
#' log_file_path = tempfile(pattern = "user_stats", fileext = ".txt")
1213
#' )
@@ -22,6 +23,7 @@
2223
#'
2324
#' data_storage$read_event_data()
2425
#' data_storage$read_event_data(Sys.Date() - 1, Sys.Date() + 1)
26+
#' }
2527
DataStorageLogFile <- R6::R6Class( # nolint object_name_linter
2628
classname = "DataStorageLogFile",
2729
inherit = DataStorage,

R/data-storage-sqlite.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#' @export
88
#'
99
#' @examples
10+
#' \dontrun{
1011
#' data_storage <- DataStorageSQLite$new(
1112
#' db_path = tempfile(pattern = "user_stats", fileext = ".sqlite")
1213
#' )
@@ -22,6 +23,7 @@
2223
#'
2324
#' data_storage$read_event_data()
2425
#' data_storage$read_event_data(Sys.Date() - 1, Sys.Date() + 1)
26+
#' }
2527
DataStorageSQLite <- R6::R6Class( # nolint object_name_linter
2628
classname = "DataStorageSQLite",
2729
inherit = DataStorageSQLFamily,

R/telemetry.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#' @seealso [shiny.telemetry::DataStorage] which this function wraps.
2020
#' @export
2121
#' @examples
22+
#' \dontrun{
2223
#' telemetry <- Telemetry$new(
2324
#' data_storage = DataStorageLogFile$new(
2425
#' log_file_path = tempfile(pattern = "user_stats", fileext = ".txt")
@@ -55,6 +56,7 @@
5556
#' telemetry$log_custom_event("a_button", list(custom_field = 23), session = session)
5657
#'
5758
#' telemetry$data_storage$read_event_data("2020-01-01", "2025-01-01")
59+
#' }
5860
Telemetry <- R6::R6Class( # nolint object_name_linter
5961
classname = "Telemetry",
6062
public = list(

man/DataStorageLogFile.Rd

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/DataStorageSQLite.Rd

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/Telemetry.Rd

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/testthat/test-data_storage-plumber.R

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ logger::log_threshold(logger::FATAL, namespace = "shiny.telemetry")
1414
Sys.setenv(R_CONFIG_ACTIVE = "test")
1515

1616
test_that("[Plumber] DataStorage should be able to insert and read", {
17+
skip_on_cran()
18+
1719
db_path <- tempfile(pattern = "events", fileext = ".sqlite")
1820

1921
old_env <- capture_evironment_variables(
@@ -78,6 +80,8 @@ test_that("[Plumber] DataStorage should be able to insert and read", {
7880
})
7981

8082
test_that("Plumber API works", {
83+
skip_on_cran()
84+
8185
db_path <- tempfile(pattern = "events", fileext = ".sqlite")
8286

8387
old_env <- capture_evironment_variables(
@@ -138,6 +142,8 @@ test_that("Plumber API works", {
138142

139143

140144
test_that("Plumber API token only accepts valid messages", {
145+
skip_on_cran()
146+
141147
db_path <- tempfile(pattern = "events", fileext = ".sqlite")
142148

143149
old_env <- capture_evironment_variables(

tests/testthat/test-telemetry-integration-plumber.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Test that performs integration checks on how Telemetry class works with a
22
# valid data storage provider.
33
test_that("[Plumber] Telemetry writes and reads events (integration)", {
4+
skip_on_cran()
5+
46
db_path <- tempfile(pattern = "events", fileext = ".sqlite")
57

68
old_env <- capture_evironment_variables(

0 commit comments

Comments
 (0)