Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CRAN v0.5.2 released #33

Merged
merged 94 commits into from
Sep 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
94 commits
Select commit Hold shift + click to select a range
0df604a
logging package documentation fix
cb4ds Feb 22, 2019
7a9b65d
ready for initial submission
cb4ds Feb 25, 2019
3fa39f1
merge initial changes to cran branch
cb4ds Feb 25, 2019
f021559
backwards compatability update for test
cb4ds Feb 25, 2019
0e93dae
added rhub OS
cb4ds Feb 25, 2019
2d05b13
update to put package names in single quotes per cran submission feed…
cb4ds Mar 4, 2019
752ca42
tests and vignettes create items in tempdir per cran feedback
cb4ds Mar 4, 2019
a46d176
added example executable code into the help per cran feedback
cb4ds Mar 4, 2019
f0fc33b
readying for next submission
cb4ds Mar 4, 2019
dccfe80
fixes for other platforms and tempdir usage
cb4ds Mar 5, 2019
ef7f31e
ready for resubmission 0.4.1
cb4ds Mar 5, 2019
25cc2a5
remove httr import
Apr 3, 2019
a2f788b
remove httr import (#4)
ginberg Apr 29, 2019
ccbcfdb
spelling/grammar updates and capitalization consistency
cb4ds Apr 29, 2019
d720486
ready for cran submission
cb4ds Apr 29, 2019
cd777c2
Merge branch 'master' into cran
cb4ds Apr 30, 2019
7bc04d2
enhance openxlsx handling to allow user to save workbooks
cb4ds Jul 16, 2019
a8f6b5f
Merge branch 'cran' of github.com:cb4ds/periscope into cran
cb4ds Jul 16, 2019
7fd9909
bugfix
cb4ds Jul 17, 2019
45f9b1c
dev version bump
cb4ds Jul 17, 2019
8056d09
ready for CRAN submission
cb4ds Jul 25, 2019
0c9991b
Merge branch 'master' into cran
cb4ds Jul 25, 2019
d9c3e52
Merge branch 'master' into cran
cb4ds Jul 25, 2019
6ffcff4
Merge remote-tracking branch 'upstream/cran' into cran
ginberg Aug 5, 2019
7892e1d
downloadable table: add support for displaying rownames
Aug 8, 2019
9e39376
simplify
Aug 8, 2019
e576537
remove column name for rownames column
Aug 8, 2019
5c54b3a
update version number
Aug 8, 2019
2672468
Downloadable table rownames (#7)
ginberg Aug 8, 2019
1c03fd2
documentation updates to include gallery
cb4ds Aug 28, 2019
781bd92
docs - another link location
cb4ds Aug 28, 2019
7cfa6ae
updates tested version
cb4ds Aug 29, 2019
50d76c9
NEWS update
cb4ds Aug 29, 2019
4e58c06
Merge branch 'master' into cran
cb4ds Aug 29, 2019
cc6606d
bugfix - dynamically created tables didn't hide/show the download but…
cb4ds Sep 17, 2019
deac310
Merge branch 'cran' of github.com:cb4ds/periscope into cran
cb4ds Sep 17, 2019
aebe7ec
test fix
cb4ds Sep 17, 2019
77656b8
v0.4.5 cran release prepped
cb4ds Sep 20, 2019
afc8668
Merge branch 'master' into cran
cb4ds Sep 20, 2019
a5844a7
work with both `list` and `named list` objects. Both have type 'list'
schloerke Sep 25, 2019
9cc4986
bugfix, update of tests for html 0.4.0 release (pr merged for testing)
cb4ds Sep 25, 2019
90eb0e3
updated versions under test
cb4ds Sep 25, 2019
5a4ef8b
master merge
cb4ds Sep 25, 2019
9f5271b
merge upstream
Sep 26, 2019
5b1f948
add option to add rownames to downloadable xlsx file
Sep 26, 2019
d68e4ef
fix item not found
Sep 26, 2019
0e49cec
refactor
Sep 26, 2019
2129dd6
downloadFile xlsx rownames (#11)
ginberg Oct 18, 2019
84f7cac
Merge remote-tracking branch 'upstream/cran' into cran
Nov 8, 2019
b692abf
downloadableTable selection of rows (#14)
ginberg Nov 11, 2019
eb0ca20
Merge remote-tracking branch 'upstream/cran' into cran
ginberg Nov 12, 2019
3b9707a
fix single select
Nov 15, 2019
324695e
fix single select (#15)
ginberg Nov 15, 2019
9b4bfa4
Merge remote-tracking branch 'upstream/cran' into cran
Nov 19, 2019
5d2d605
shinydashboardPlus integration (#13)
ginberg Nov 25, 2019
050e6c0
releasing 0.4.7 to CRAN
cb4ds Dec 10, 2019
4974521
Merge branch 'master' into cran
cb4ds Dec 10, 2019
a2d6bf9
Merge branch 'master' into cran
cb4ds Dec 10, 2019
b195089
Merge remote-tracking branch 'upstream/cran' into cran
ginberg Jan 6, 2020
16203bb
adding code coverage for ui data (#17)
kar-agg-gen Jan 10, 2020
1445179
Merge remote-tracking branch 'upstream/cran' into cran
ginberg Jan 13, 2020
a27da4a
add right sidebar function
Jan 14, 2020
5221974
add convert template
Jan 14, 2020
5645fcb
update add_right_sidebar
Jan 15, 2020
df01d57
reset button toggle (#18)
ginberg Jan 25, 2020
4124c28
merge for PR #19
cb4ds Jan 25, 2020
d077449
downloadFile: add option to show/hide rownames (#20)
ginberg Jan 25, 2020
1648980
push version
cb4ds Jan 25, 2020
897a0e7
test updates, optional sidebar tabs (#21)
ginberg Feb 12, 2020
64ece3a
readying for CRAN submission
cb4ds Feb 12, 2020
16a7281
comments for cran sub
cb4ds Feb 12, 2020
2838969
spelling
cb4ds Feb 12, 2020
7e63c72
Merge branch 'master' into cran
cb4ds Feb 12, 2020
9905753
merge fix
cb4ds Feb 12, 2020
926c81f
mergeback from master
cb4ds Feb 12, 2020
b5d9fe8
left sidebar parameter (#23)
ginberg Mar 23, 2020
9561d1e
ready to submit to CRAN
cb4ds Mar 27, 2020
f61376c
fixed typo in readme
cb4ds Mar 28, 2020
3be8e6b
update comments for resubmission
cb4ds Mar 31, 2020
6527c3e
merge master
cb4ds May 18, 2020
02c4f30
release readiness
cb4ds May 18, 2020
a0cef73
Merge branch 'master' into cran
cb4ds May 19, 2020
01b683e
0.4.10-1 - missed a file.
cb4ds May 19, 2020
e6f5722
cran comments
cb4ds May 19, 2020
10e1cc5
logging and style updates (#29)
ginberg Jun 10, 2020
6155272
documentation updates
cb4ds Jul 3, 2020
672726e
documentation updates w/r/t logging package
cb4ds Jul 3, 2020
091e125
spelling fixes
cb4ds Jul 3, 2020
33e7005
ready for submission
cb4ds Jul 3, 2020
5b48b7c
Merge branch 'master' into cran
cb4ds Jul 3, 2020
cdd49fb
move of openxlsx to suggested (#32)
cb4ds Sep 18, 2020
7e736b3
ready for cran submission
cb4ds Sep 18, 2020
b7032e4
resubmission prep
cb4ds Sep 21, 2020
e943984
Merge branch 'master' into cran
cb4ds Sep 22, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: periscope
Type: Package
Title: Enterprise Streamlined 'Shiny' Application Framework
Version: 0.5.1
Version: 0.5.2
Authors@R: c(
person("Constance", "Brett", email="connie@aggregate-genius.com", role = c("aut", "cre")),
person("Isaac", "Neuhaus", role = "aut", comment = "canvasXpress JavaScript Library Maintainer"),
Expand All @@ -12,7 +12,7 @@ Description: An enterprise-targeted scalable and UI-standardized 'shiny' framewo
including a variety of developer convenience functions with the goal of both
streamlining robust application development while assisting with creating a
consistent user experience regardless of application or developer.
URL: https://github.com/cb4ds/periscope.git, http://periscopeapps.org:3838, https://www.canvasxpress.org
URL: https://github.com/cb4ds/periscope, http://periscopeapps.org:3838, https://www.canvasxpress.org
BugReports: https://github.com/cb4ds/periscope/issues
Repository: BRAN
License: GPL-3
Expand All @@ -28,12 +28,14 @@ Imports:
shinyBS (>= 0.61),
lubridate (>= 1.6),
DT (>= 0.2),
openxlsx (>= 3.0),
writexl (>= 1.3),
ggplot2 (>= 2.2),
methods
RoxygenNote: 7.1.0
methods,
utils
RoxygenNote: 7.1.1
Suggests:
knitr,
rmarkdown,
testthat
testthat,
openxlsx (>= 3.0)
VignetteBuilder: knitr
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#Revisions and Change Log

### v0.5.2
* Moved openxlsx to suggested
* Added tests

### v0.5.1
* Added support for other color schemes in the dashboard
* Replaced CRAN-archived logging package functionality
Expand Down
10 changes: 8 additions & 2 deletions R/convert_template.R
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,12 @@ add_right_sidebar <- function(location) {
usersep <- .Platform$file.sep

files_updated <- c()
# replace ui by ui_plus (take car of resetbutton!)
# replace ui by ui_plus (take care of resetbutton!)
ui_content <- gsub(" ", "", readLines(con = paste(location, ui_filename, sep = usersep)))
# update ui if needed
if (!any(grepl("fw_create_right_sidebar", ui_content))) {
reset_button <- TRUE
reset_button <- TRUE
new_ui_content <- ui_content
if (any(grepl("resetbutton=FALSE", ui_content))) {
reset_button <- FALSE
}
Expand All @@ -108,6 +109,11 @@ add_right_sidebar <- function(location) {
if (!reset_button) {
new_ui_content <- gsub(create_left_sidebar_closed_expr, no_reset_button_closed_expr, new_ui_content)
}
} else {
new_ui_content <- readLines(con = system.file("fw_templ", ui_plus_no_sidebar_filename, package = "periscope"))
if (!reset_button) {
new_ui_content <- gsub(create_left_sidebar_closed_expr, no_reset_button_closed_expr, new_ui_content)
}
}
writeLines(new_ui_content, con = paste(location, ui_filename, sep = usersep))

Expand Down
19 changes: 11 additions & 8 deletions R/downloadFile.R
Original file line number Diff line number Diff line change
Expand Up @@ -209,14 +209,17 @@ downloadFile <- function(input, output, session, logger,
}
# excel file
else if (type == "xlsx") {
if ((class(data) == "Workbook") && ("openxlsx" %in% attributes(class(data)))) {
openxlsx::saveWorkbook(data, file)
}
else {
show_rownames <- attr(data, "show_rownames")
openxlsx::write.xlsx(data, file,
asTable = TRUE,
row.names = !is.null(show_rownames) && show_rownames)
if ("openxlsx" %in% utils::installed.packages()) {
if ((class(data) == "Workbook") && ("openxlsx" %in% attributes(class(data)))) {
openxlsx::saveWorkbook(data, file)
} else {
show_rownames <- attr(data, "show_rownames")
openxlsx::write.xlsx(data, file,
asTable = TRUE,
row.names = !is.null(show_rownames) && show_rownames)
}
} else {
writexl::write_xlsx(data, file)
}
}
# text file processing
Expand Down
15 changes: 11 additions & 4 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
## Comments from Maintainer

Added functionality, testing and resolved the use of the archived logging package.
UPDATE 9/20: removed .git from DESCRIPTION file to resolve note appearing on some servers

Moved openxlsx to suggested and added tests.

There is a NOTE on some servers 'unable to verify current time' while checking for future file timestamps (a devtools check). There seems to be an issue with the world time server which is not something I can resolve in this package and I prefer not to silence the check in the package. WinBuilder check did not have the issue but R-Hub Ubuntu reports this, and it appears to have happened before. Pls. see references below:

* https://stat.ethz.ch/pipermail/r-package-devel/2019q1/003577.html
* https://stackoverflow.com/questions/63613301/r-cmd-check-note-unable-to-verify-current-time

---

Expand All @@ -11,13 +18,13 @@ RStudio Server Pro (Ubuntu 18.04.2)

* R 3.5.3
* R 3.6.3
* R 4.0.1
* R 4.0.2

Travis-CI (Ubuntu 16.04.6)

* R 3.6.3
* R 4.0.0
* R devel (2020-07-03 r78773)
* R 4.0.2
* R devel (2020-09-16 r79221)

WinBuilder

Expand Down
1 change: 1 addition & 0 deletions tests/testthat/sample_app/program/fxn/plots.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ library(lattice)
data(mtcars)
mtcars$cyl <- factor(mtcars$cyl, levels = c(4,6,8),
labels = c("4cyl", "6cyl", "8cyl"))
attr(mtcars, "show_rownames") <- TRUE


# -- plotting functions
Expand Down
14 changes: 14 additions & 0 deletions tests/testthat/sample_app_both_sidebar/global.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# -------------------------------------------------
# -- FRAMEWORK global.R --
# -------------------------------------------------
# NOTEs: --
# Program code goes in "program" directory files --
# -------------------------------------------------
# ***** DO NOT EDIT THIS FILE ***** --
# -------------------------------------------------

library(periscope)
library(shinyBS)


source(paste("program", "global.R", sep = .Platform$file.sep), local = TRUE)
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*
*/
!.gitignore
58 changes: 58 additions & 0 deletions tests/testthat/sample_app_both_sidebar/program/fxn/plots.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
library(ggplot2)
library(lattice)


# -- data for plots
data(mtcars)
mtcars$cyl <- factor(mtcars$cyl, levels = c(4,6,8),
labels = c("4cyl", "6cyl", "8cyl"))
attr(mtcars, "show_rownames") <- TRUE


# -- plotting functions

plot2ggplot <- function() {
plot <- ggplot(data = mtcars, aes(x = wt, y = mpg)) +
geom_point(aes(color = cyl)) +
theme(legend.justification = c(1, 1),
legend.position = c(1, 1),
legend.title = element_blank()) +
ggtitle("GGPlot Example w/Hover") +
xlab("wt") +
ylab("mpg")
return(plot)
}


plot2ggplot_data <- function() {
return(mtcars)
}


plot3lattice <- function() {
plot <- xyplot(mpg ~ wt , data = mtcars,
pch = 1, groups = factor(cyl),
auto.key = list(corner = c(1, 1)),
main = "Lattice Example")
return(plot)
}

plot3lattice_data <- function() {
return(mtcars)
}


plot_htmlwidget <- function(report_modus = FALSE) {
venn <- data.frame(A = 57, B = 12, C = 67, D = 72, AB = 4,
AC = 67, AD = 25, BC = 67, BD = 27, CD = 38,
ABC = 69, ABD = 28, ACD = 52, BCD = 46, ABCD = 3)

htmlwidget <- canvasXpress(vennData = venn,
graphType = 'Venn',
vennGroups = 4,
vennLegend = list(A = "List1", B = "List2", C = "List3", D = "List4"),
title = "CanvasXpress Example",
disableToolbar = report_modus,
disableTouchToolbar = report_modus)
return(htmlwidget)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
library(dplyr)

df <- read.csv("program/data/example.csv",
strip.white = T,
comment.char = "#")


load_data1 <- function() {
ldf <- df %>%
filter(substr(Geographic.Area, 1, 1) == ".") %>%
mutate(Geographic.Area = substring(Geographic.Area, 2))

as.data.frame(ldf)
}


load_data2 <- function() {
ldf <- df %>%
filter(substr(Geographic.Area, 1, 1) != ".")

as.data.frame(ldf)
}

load_data3 <- function() {
ldf <- df %>%
select(1:3)

as.data.frame(ldf)
}
26 changes: 26 additions & 0 deletions tests/testthat/sample_app_both_sidebar/program/global.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# ----------------------------------------
# -- PROGRAM global.R --
# ----------------------------------------
# USE: Global variables and functions
#
# NOTEs:
# - All variables/functions here are
# globally scoped and will be available
# to server, UI and session scopes
# ----------------------------------------

# -- IMPORTS --
library(canvasXpress)

# -- Setup your Application --
set_app_parameters(title = "Sample Title (click for an info pop-up)",
titleinfo = HTML("<h3>Application Information Pop-Up</h3>",
"<p>This pop-up can contain any valid html
code.</p><p>If you prefer to have the title
link to any valid url location by providing
a character string to the titleinfo
parameter in <i>set_app_parameters(...)
</i> in program/global.R file.</p>"),
loglevel = "DEBUG",
app_version = "1.0.0")
# -- PROGRAM --
41 changes: 41 additions & 0 deletions tests/testthat/sample_app_both_sidebar/program/server_global.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# ----------------------------------------
# -- PROGRAM server_global.R --
# ----------------------------------------
# USE: Server-specific variables and
# functions for the main reactive
# shiny server functionality. All
# code in this file will be put into
# the framework outside the call to
# shinyServer(function(input, output, session)
# in server.R
#
# NOTEs:
# - All variables/functions here are
# SERVER scoped and are available
# across all user sessions, but not to
# the UI.
#
# - For user session-scoped items
# put var/fxns in server_local.R
#
# FRAMEWORK VARIABLES
# none
# ----------------------------------------

# -- IMPORTS --


# -- VARIABLES --
sg_example_data <- read.csv("program/data/example.csv",
comment.char = c("#"),
stringsAsFactors = F)
#note - since this is an example, the dataset provided is a reference
# dataset. This file is being read in server_global.R, where you
# should only load data that will be available to ALL users/sessions.
# ** IMPORTANT **
# Do not read user-specific data in this file or global.R, use
# server-local.R for user-specific (i.e. session-specific) data!

# -- FUNCTIONS --


Loading