Skip to content

Commit f23bf01

Browse files
authored
[DOC] Prefix function calls with the package name in examples (#149)
Explicitly states that functions belong to the package and ensures that there will be no ambiguity with a function of the same name from another package. Also remove extra trailing space in the source files producing the man files. Fix the paths configuration in the documentation GitHub workflows. They didn't consider file changes, but only directory changes.
1 parent 74be8ad commit f23bf01

File tree

5 files changed

+24
-23
lines changed

5 files changed

+24
-23
lines changed

.github/workflows/publish-documentation-pr-preview.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ on:
1111
- '.github/actions/build-documentation-site/**/*'
1212
- '.github/actions/build-setup/**/*'
1313
- '.github/workflows/publish-documentation-pr-preview.yml'
14-
- 'inst/**'
15-
- 'man/**'
14+
- 'inst/**/*'
15+
- 'man/**/*'
1616
- '.Rbuildignore'
1717
- '_pkgdown.yml'
1818
- 'CONTRIBUTING.md'

.github/workflows/publish-documentation.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ on:
99
- '.github/actions/build-documentation-site/**/*'
1010
- '.github/actions/build-setup/**/*'
1111
- '.github/workflows/publish-documentation.yml'
12-
- 'inst/**'
13-
- 'man/**'
12+
- 'inst/**/*'
13+
- 'man/**/*'
1414
- '.Rbuildignore'
1515
- '_pkgdown.yml'
1616
- 'CONTRIBUTING.md'

R/bpmnVisualization.R

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#'
1717
#' @name display
1818
#' @description Display BPMN diagram based on BPMN definition in XML format
19-
#'
19+
#'
2020
#' @param bpmnXML A file name or xml document or string in BPMN XML format
2121
#' @param overlays An element or a list of elements to be added to the diagram's existing elements.
2222
#' Use overlay function to create an overlay object with content and relative position.
@@ -26,25 +26,25 @@
2626
#' Use an explicit element ID for the widget (rather than an automatically
2727
#' generated one). Useful if you have other JavaScript that needs to explicitly
2828
#' discover and interact with a specific widget instance.
29-
#'
30-
#' @returns A \code{bpmn-visualization} Widget that will intelligently print itself into HTML in a variety of contexts
29+
#'
30+
#' @returns A \code{bpmn-visualization} Widget that will intelligently print itself into HTML in a variety of contexts
3131
#' including the R console, within R Markdown documents, and within Shiny output bindings.
32-
#'
33-
#' @examples
32+
#'
33+
#' @examples
3434
#' # Load the BPMN file
3535
#' bpmn_file <- system.file("examples/Order_Management.bpmn", package = "bpmnVisualization")
36-
#'
36+
#'
3737
#' # Display the BPMN diagram
38-
#' display(bpmn_file, width='auto', height='auto')
39-
#'
38+
#' bpmnVisualization::display(bpmn_file, width='auto', height='auto')
39+
#'
4040
#' # Display the BPMN diagram with overlays
4141
#' overlays <- list(
4242
#' create_overlay("start_event_1_1", "42"),
4343
#' create_overlay("sequence_flow_1_1", "42"),
4444
#' create_overlay("task_1_1", "9")
4545
#' )
46-
#' display(bpmn_file, overlays, width='auto', height='auto')
47-
#'
46+
#' bpmnVisualization::display(bpmn_file, overlays, width='auto', height='auto')
47+
#'
4848
#' @seealso \code{\link{create_overlay}} to create an overlay
4949
#'
5050
#' @import htmlwidgets
@@ -76,14 +76,14 @@ display <- function(
7676
#' @title Shiny output binding for the \code{bpmn-visualization} HTML widget
7777
#'
7878
#' @name bpmnVisualization-shiny-output
79-
#' @description
79+
#' @description
8080
#' Helper to create output function for using the \code{bpmn-visualization} HTML widget within Shiny applications and interactive Rmd documents.
81-
#'
81+
#'
8282
#' @param outputId output variable to read from
8383
#' @param width,height Must be a valid CSS unit (like \code{'100\%'},
8484
#' \code{'400px'}, \code{'auto'}) or a number, which will be coerced to a
8585
#' string and have \code{'px'} appended.
86-
#'
86+
#'
8787
#' @returns An output function that enables the use of the \code{bpmn-visualization} widget within Shiny applications.
8888
#'
8989
#' @export
@@ -102,11 +102,11 @@ bpmnVisualizationOutput <- function(
102102
}
103103

104104
#' @title Shiny render binding for the \code{bpmn-visualization} HTML widget
105-
#'
105+
#'
106106
#' @rdname bpmnVisualization-shiny-render
107-
#' @description
107+
#' @description
108108
#' Helper to create render function for using the \code{bpmn-visualization} HTML widget within Shiny applications and interactive Rmd documents.
109-
#'
109+
#'
110110
#' @param expr An expression that generates a \code{bpmn-visualization} HTML widget
111111
#' @param env The environment in which to evaluate \code{expr}.
112112
#' @param quoted Is \code{expr} a quoted expression (with \code{quote()})? This

man/bpmnVisualization-package.Rd

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

man/display.Rd

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

0 commit comments

Comments
 (0)