Skip to content
This repository was archived by the owner on Jun 9, 2023. It is now read-only.

Commit b4daf67

Browse files
committed
Documentation and more CI configuration changes
1 parent e51a016 commit b4daf67

13 files changed

+508
-381
lines changed

.circleci/config.yml

-14
This file was deleted.

.travis.yml

+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
language: R
44
sudo: false
55
cache: packages
6+
warnings_are_errors: false
7+
r_check_args: #--as-cran
68

79
# Run on both linux and OS X
810
os:

DESCRIPTION

+9-7
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,26 @@
11
Package: Mapper
22
Type: Package
3-
Title: Open source implementation of the Mapper algorithm often used in Topological Data Analysis
3+
Title: Open source implementation of the Mapper algorithm often used in Topological Data Analysis
44
Version: 0.1.0
5-
Authors@R: c(person("Matt", "Piekenbrock", email = "[email protected]", role = c("aut", "ctb", "cph")),
5+
Authors@R: c(person("Matt", "Piekenbrock", email = "[email protected]", role = c("aut", "cre", "cph")),
66
person("Daniel", "Muellner", role = c("ctb","cph")),
77
person("Gurjeet","Singh", role = c("ctb","cph")))
88
Author: Matt Piekenbrock [aut, cre, ctb],
99
Daniel Muellner [ctb, cph],
1010
Gurjeet Singh [ctb, cph]
1111
Maintainer: Matt Piekenbrock <[email protected]>
12-
Description: Open source implementation of the Mapper algorithm often used in Topological Data Analysis
12+
Description: This package interfaces an open source implementation of the Mapper algorithm often used in Topological Data Analysis.
1313
Imports: Rcpp, DT, htmlwidgets, methods, parallelDist, shiny
1414
LinkingTo: Rcpp
15-
License: GPL-3
16-
Suggests: network,
15+
License: file LICENSE
16+
BugReports: https://github.com/peekxc/mapper
17+
Suggests:
18+
network,
1719
testthat,
1820
igraph,
1921
knitr
20-
Copyright: The Mapper construction was originally developed by Gurjeet Singh, Facundo Memoli, and Gunnar Carlsson.
21-
Some of the code was inspired from direct translation from the Python Mapper library, copyright by Daniel Muellner and Aravindakshan Babu.
22+
Copyright: The Mapper construction was originally developed by Gurjeet Singh, Facundo Mémoli, and Gunnar Carlsson.
23+
Some of the code was inspired by source scripts in the Python Mapper library, copyright by Daniel Müellner and Aravindakshan Babu.
2224
All other code is copyright by Matt Piekenbrock.
2325
Encoding: UTF-8
2426
LazyData: true

NAMESPACE

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ export()
55
export(cutoff_first_bin)
66
export(dashboard)
77
export(mapper)
8-
export(multiscale)
98
exportClasses(FixedRectangularCover)
109
exportClasses(MapperRef)
1110
exportClasses(RestrainedRectangularCover)

R/dashboard.R

+27-27
Original file line numberDiff line numberDiff line change
@@ -19,33 +19,33 @@ dashboard <- function(mapper_obj, X = mapper_obj$X, node_color_f = "default"){
1919

2020
## Make sure shorthand 'M' is defined
2121
if (!"MapperRef" %in% class(mapper_obj)){ stop("'dashboard' must take as input a mapper reference object.") }
22-
M <- mapper_obj
23-
G <- Mapper::grapher(M)
24-
if (is(X, "dist")){ X <- data.frame(index=1:attr(M$X, "Size")) }
25-
else { X <- as.data.frame(X) }
26-
27-
## Get the UI components
28-
ui_file <- system.file(file.path("dashboard", "ui.R"), package = "Mapper")
29-
source(file = ui_file, local = TRUE)
30-
31-
## Node color functions
32-
if (missing(node_color_f) || node_color_f == "default"){
33-
if (is(X, "dist")){ stop("Default color functions cannot be applied when 'X' is given as a dist object.") }
34-
if (is.null(colnames(X))) { colnames(X) <- paste0("dim", 1:dim(X)[2]) }
35-
color_funcs <- new.env(parent = .BaseNamespaceEnv)
36-
color_file <- system.file(file.path("dashboard", "components", "default_color_functions.R"), package = "Mapper")
37-
source(color_file, local = color_funcs)
38-
sapply(colnames(X), function(dim_name){ color_funcs[[dim_name]] <- make_Dim_f(dim_name) })
39-
} else {
40-
color_funcs <- node_color_f
41-
}
42-
43-
## Get the server components
44-
server_file <- system.file(file.path("dashboard", "server.R"), package = "Mapper")
45-
source(file = server_file, local = TRUE)
46-
47-
## Return the shiny app
48-
shiny::shinyApp(ui = ui, server = server)
22+
# M <- mapper_obj
23+
# G <- Mapper::grapher(M)
24+
# if (is(X, "dist")){ X <- data.frame(index=1:attr(M$X, "Size")) }
25+
# else { X <- as.data.frame(X) }
26+
#
27+
# ## Get the UI components
28+
# ui_file <- system.file(file.path("dashboard", "ui.R"), package = "Mapper")
29+
# source(file = ui_file, local = TRUE)
30+
#
31+
# ## Node color functions
32+
# if (missing(node_color_f) || node_color_f == "default"){
33+
# if (is(X, "dist")){ stop("Default color functions cannot be applied when 'X' is given as a dist object.") }
34+
# if (is.null(colnames(X))) { colnames(X) <- paste0("dim", 1:dim(X)[2]) }
35+
# color_funcs <- new.env(parent = .BaseNamespaceEnv)
36+
# color_file <- system.file(file.path("dashboard", "components", "default_color_functions.R"), package = "Mapper")
37+
# source(color_file, local = color_funcs)
38+
# sapply(colnames(X), function(dim_name){ color_funcs[[dim_name]] <- make_Dim_f(dim_name) })
39+
# } else {
40+
# color_funcs <- node_color_f
41+
# }
42+
#
43+
# ## Get the server components
44+
# server_file <- system.file(file.path("dashboard", "server.R"), package = "Mapper")
45+
# source(file = server_file, local = TRUE)
46+
#
47+
# ## Return the shiny app
48+
# shiny::shinyApp(ui = ui, server = server)
4949
}
5050

5151
## Auxillary function to make a closure for each dimension of X

R/mapper.R

+3-1
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,10 @@ mapper <- function(X, filter_values, cover_type = "fixed rectangular", return_re
113113
}
114114

115115
#' S3 method for default printing
116+
#' @param x Mapper object.
117+
#' @param ... unused.
116118
#' @export
117-
print.Mapper <- function(x){
119+
print.Mapper <- function(x, ...){
118120
writeLines(attr(x, ".summary"))
119121
}
120122

0 commit comments

Comments
 (0)