Skip to content

Commit 9922a45

Browse files
authored
[REFACTOR] Rename the package as bpmnVisualizationR (#172)
⚠️⚠️ ⚠️ This is a breaking change. ⚠️⚠️⚠️ Users of the package must: - reinstall it from scratch - remove the old `bpmnVisualization` package - update usage of the package functions if they prefix them by the name of the package
1 parent 31a3fc3 commit 9922a45

20 files changed

+151
-153
lines changed

.github/workflows/update_bpmn_visualization_version.yml renamed to .github/workflows/update-bpmn-visualization-version.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Update BPMN Visualization version
1+
name: Update the version of the bpmn-visualization TypeScript library
22
on:
33
repository_dispatch:
44
types: [ update_bpmn_visualization_version ]
@@ -15,33 +15,33 @@ jobs:
1515
VERSION: ${{ github.event.client_payload.version || github.event.inputs.version }}
1616
steps:
1717
- uses: actions/checkout@v3
18-
- name: Get old bpmn-visualization version
18+
- name: Get the old version of bpmn-visualization
1919
id: lookupOldBPMNVisuVersion
2020
uses: mikefarah/yq@v4.30.5
2121
with:
22-
cmd: yq '.dependencies[] | select(.name == "bpmn-visualization") | .version' inst/htmlwidgets/bpmnVisualization.yaml
22+
cmd: yq '.dependencies[] | select(.name == "bpmn-visualization") | .version' inst/htmlwidgets/bpmnVisualizationR.yaml
2323
- run: echo "OLD_VERSION=${{ steps.lookupOldBPMNVisuVersion.outputs.result }}" >> $GITHUB_ENV
24-
- name: Delete old bpmn-visualization js lib file
24+
- name: Delete the old bpmn-visualization
2525
run: rm inst/htmlwidgets/lib/bpmn-visualization/bpmn-visualization.min.js
26-
- name: Download bpmn-visualization ${{ env.VERSION }}
26+
- name: Download bpmn-visualization@${{ env.VERSION }}
2727
uses: carlosperate/download-file-action@v2
2828
with:
2929
file-url: 'https://cdn.jsdelivr.net/npm/bpmn-visualization@${{ env.VERSION }}/dist/bpmn-visualization.min.js'
3030
location: 'inst/htmlwidgets/lib/bpmn-visualization'
31-
- name: Update bpmn-visualization version in YAML file
31+
- name: Update the bpmn-visualization version in the YAML file
3232
run: |
33-
sed -i -E 's/version: ".*"/version: "${{ env.VERSION }}"/' inst/htmlwidgets/bpmnVisualization.yaml
33+
sed -i -E 's/version: ".*"/version: "${{ env.VERSION }}"/' inst/htmlwidgets/bpmnVisualizationR.yaml
3434
- name: Create Pull Request
3535
uses: peter-evans/create-pull-request@v4.2.3
3636
with:
3737
token: ${{ secrets.GH_RELEASE_TOKEN }}
38-
commit-message: "[INFRA] Bump bpmn-visualization JS lib from ${{ env.OLD_VERSION }} to ${{ env.VERSION }}"
38+
commit-message: "[INFRA] Bump bpmn-visualization from ${{ env.OLD_VERSION }} to ${{ env.VERSION }}"
3939
committer: "process-analytics-bot <62586190+process-analytics-bot@users.noreply.github.com>"
4040
author: "process-analytics-bot <62586190+process-analytics-bot@users.noreply.github.com>"
4141
branch: "infra/bump_bpmn_visualization_from_${{ env.OLD_VERSION }}_to_${{ env.VERSION }}"
4242
delete-branch: true
4343
base: "main"
44-
title: "[INFRA] Bump bpmn-visualization JS lib from ${{ env.OLD_VERSION }} to ${{ env.VERSION }}"
44+
title: "[INFRA] Bump bpmn-visualization from ${{ env.OLD_VERSION }} to ${{ env.VERSION }}"
4545
body: "bpmn-visualization is updated from https://cdn.jsdelivr.net/npm/bpmn-visualization@${{ env.VERSION }}/dist/bpmn-visualization.min.js."
4646
labels: "dependencies"
4747
team-reviewers: pa-collaborators

CONTRIBUTING.md

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Contributing
22

3-
You are here to help on `bpmn-visualization-R`? Awesome, feel welcome and read the following guidelines in order to know how to contribute, to ask questions and to make `bpmn-visualization-R` such a great tool.
3+
You are here to help on `bpmnVisualizationR`? Awesome, feel welcome and read the following guidelines in order to know how to contribute, to ask questions and to make `bpmnVisualizationR` such a great tool.
44

55
All members of our community are expected to follow our [Code of Conduct](https://github.com/process-analytics/.github/blob/main/CODE_OF_CONDUCT.md). Please make sure you are welcoming and friendly in all of our spaces.
66

@@ -11,7 +11,7 @@ There are many ways to contribute:
1111
- help people with the questions they ask on the [GitHub Issues](https://github.com/process-analytics/bpmn-visualization-R/issues)
1212
- submitting bug reports and feature requests in the [GitHub Issues](https://github.com/process-analytics/bpmn-visualization-R/issues/new)
1313
- improving the README & documentation
14-
- writing code which can be incorporated into `bpmn-visualization-R` itself
14+
- writing code which can be incorporated into `bpmnVisualizationR` itself
1515

1616
### Code and documentation changes guidelines
1717

@@ -34,7 +34,7 @@ For all contributions, please respect the following guidelines:
3434

3535
### Fork & create a branch
3636

37-
[Fork bpmn-visualization-R](https://help.github.com/articles/fork-a-repo) and create a branch with a descriptive name.
37+
[Fork the bpmn-visualization-R repository](https://help.github.com/articles/fork-a-repo) and create a branch with a descriptive name.
3838

3939
A good branch name would be (where issue #25 is the ticket you're working on): **25-customize_overlays**
4040

@@ -45,34 +45,32 @@ git checkout -b 25-customize_overlays
4545
### Commit in the Pull Request
4646
There is no convention for the commit message in the Pull Request.
4747
The most important part is the title of the Pull Request, because:
48-
- Everyone must use Pull Request, no direct commit allowed on main branch
49-
- The commits of a Pull Request are almost always squashed
50-
- The title of the Pull Request is used as proposal for the maintainer merging the Pull Request
48+
- Everyone must use Pull Request, no direct commit allowed on the `main` branch.
49+
- The commits of a Pull Request are almost always squashed.
50+
- The title of the Pull Request is used as proposal for the maintainer merging the Pull Request.
5151

5252
### Open a Pull Request
5353

54-
At this point, you should switch back to your main branch and make sure it's up-to-date with `bpmn-visualization-R`
55-
`main` branch:
54+
At this point, you should switch back to your own branch and make sure it's up-to-date with the `main` branch of the `bpmn-visualization-R` repository:
5655

5756
```sh
5857
git remote add upstream git@github.com:process-analytics/bpmn-visualization-R.git
5958
git checkout main
6059
git pull upstream main
6160
```
6261

63-
Then update your feature branch from your local copy of main, and push it!
62+
Then update your feature branch from your local copy of the `main` branch, and push it!
6463

6564
```sh
6665
git checkout 25-customize_overlays
6766
git rebase main
6867
git push --set-upstream origin 25-customize_overlays
6968
```
7069

71-
Finally, go to GitHub and [make a Pull Request](https://help.github.com/articles/creating-a-pull-request) with labels :smile:
70+
Finally, go to GitHub and [make a Pull Request](https://help.github.com/articles/creating-a-pull-request) with labels 😄
7271
For the title, follow the directives of the Pull Request template.
73-
Add a screenshot of the rendering of your examples/bpmn-file.
7472

75-
:warning: We care about quality. So your PR won't be merged until all tests pass.
73+
⚠️ We care about quality. So your PR won't be merged until all tests pass.
7674

7775
### Sign the Contributor License Agreement
7876

@@ -88,7 +86,7 @@ You only need to sign the CLA once or when the CLA terms have changed.
8886

8987
### Keeping your Pull Request updated
9088

91-
If a maintainer asks you to [rebase](http://git-scm.com/book/en/Git-Branching-Rebasing) your PR, they're saying that a lot of code has changed, and that you need to update your branch so it's easier to merge.
89+
If a maintainer asks you to [rebase](http://git-scm.com/book/en/Git-Branching-Rebasing) your PR, they're saying that a lot of code has changed, and that you need to update your branch, so it's easier to merge.
9290

9391
Here's the suggested workflow:
9492

@@ -129,16 +127,16 @@ pkgdown::build_site(devel = TRUE, lazy = TRUE, preview = FALSE)
129127
```
130128
For more details about the available options, see [the official documentation](https://pkgdown.r-lib.org/reference/build_site.html).
131129

132-
### bpmn-visualization TypeScript library update
130+
### Update of the `bpmn-visualization` TypeScript library
133131

134-
The [bpmn-visualization](https://github.com/process-analytics/bpmn-visualization-js) dependency is automatically updated by the [Update bpmn-visualization version](.github/workflows/update_bpmn_visualization_version.yml) workflow when a new version of this library is released.
132+
The [`bpmn-visualization`](https://github.com/process-analytics/bpmn-visualization-js) dependency is automatically updated by the [Update bpmn-visualization version](.github/workflows/update-bpmn-visualization-version.yml) workflow when a new version of this library is released.
135133

136134
This generates a new Pull Request and notifies the reviewers.
137135

138136
___
139137
⚠️⚠️⚠️ _**Manual procedure - Only if the job does NOT work!**_ ⚠️⚠️⚠️
140138

141139
- Change [bpmn-visualization.min.js](inst/htmlwidgets/lib/bpmn-visualization/bpmn-visualization.min.js). The file can be retrieved from [jsdelivr](https://www.jsdelivr.com/package/npm/bpmn-visualization) or [unpkg](https://unpkg.com/browse/bpmn-visualization/).
142-
- Update the version of `bpmn-visualization` in [bpmnVisualization.yaml](inst/htmlwidgets/bpmnVisualization.yaml)
140+
- Update the version of `bpmn-visualization` TypeScript library in [bpmnVisualizationR.yaml](inst/htmlwidgets/bpmnVisualizationR.yaml)
143141
___
144142

DESCRIPTION

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
Package: bpmnVisualization
1+
Package: bpmnVisualizationR
22
Type: Package
33
Title: Visualize Process Execution Data on BPMN Diagrams
44
Version: 0.2.2.9000
55
Authors@R: c(person("Celine", "Souchet", role = c("aut", "cre"), email = "process.analytics.dev+CRAN@gmail.com"),
66
person("Thomas", "Bouffard", role = "aut"))
7-
Description: To visualize the execution data of the processes on BPMN (Business Process Model and Notation) diagrams, using overlays, style customization and interactions, with BPMN Visualization.
7+
Description: To visualize the execution data of the processes on BPMN (Business Process Model and Notation) diagrams, using overlays, style customization and interactions, with the bpmn-visualization TypeScript library.
88
License: Apache License (== 2)
99
Copyright: Bonitasoft S.A.
10-
URL: https://process-analytics.github.io/bpmn-visualization-R/, https://github.com/process-analytics/bpmn-visualization-R
10+
URL: https://process-analytics.github.io/bpmn-visualization-R, https://github.com/process-analytics/bpmn-visualization-R
1111
BugReports: https://github.com/process-analytics/bpmn-visualization-R/issues
1212
Encoding: UTF-8
1313
LazyData: true
14-
RoxygenNote: 7.2.1
14+
RoxygenNote: 7.2.3
1515
Imports:
1616
htmlwidgets,
1717
rlang,

MAINTAINERS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ ___
132132

133133
You can use this template:
134134

135-
> 📣 bpmn-visualization R package {version} is out! 🎉
135+
> 📣 bpmnVisualizationR {version} is out! 🎉
136136
>
137137
> ===> some short description here <===
138138
>
@@ -146,7 +146,7 @@ Channel: [news](https://discord.com/channels/1011911769607913562/102432915903349
146146

147147
You can use this template:
148148

149-
> 📣 bpmn-visualization R package {version} is out! 🎉
149+
> 📣 bpmnVisualizationR {version} is out! 🎉
150150
>
151151
> ===> some short description here <===
152152
>

NAMESPACE

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Generated by roxygen2: do not edit by hand
22

3-
export(bpmnVisualizationOutput)
3+
export(bpmnVisualizationROutput)
44
export(create_overlay)
55
export(display)
6-
export(renderBpmnVisualization)
6+
export(renderBpmnVisualizationR)
77
import(htmlwidgets)
88
import(xml2)
Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -27,23 +27,23 @@
2727
#' generated one). Useful if you have other JavaScript that needs to explicitly
2828
#' discover and interact with a specific widget instance.
2929
#'
30-
#' @returns A \code{bpmn-visualization} Widget that will intelligently print itself into HTML in a variety of contexts
30+
#' @returns A \code{bpmnVisualizationR} 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.
3232
#'
3333
#' @examples
3434
#' # Load the BPMN file
35-
#' bpmn_file <- system.file("examples/Order_Management.bpmn", package = "bpmnVisualization")
35+
#' bpmn_file <- system.file("examples/Order_Management.bpmn", package = "bpmnVisualizationR")
3636
#'
3737
#' # Display the BPMN diagram
38-
#' bpmnVisualization::display(bpmn_file, width='auto', height='auto')
38+
#' bpmnVisualizationR::display(bpmn_file, width='auto', height='auto')
3939
#'
4040
#' # Display the BPMN diagram with overlays
4141
#' overlays <- list(
42-
#' create_overlay("start_event_1_1", "42"),
43-
#' create_overlay("sequence_flow_1_1", "42"),
44-
#' create_overlay("task_1_1", "9")
42+
#' bpmnVisualizationR::create_overlay("start_event_1_1", "42"),
43+
#' bpmnVisualizationR::create_overlay("sequence_flow_1_1", "42"),
44+
#' bpmnVisualizationR::create_overlay("task_1_1", "9")
4545
#' )
46-
#' bpmnVisualization::display(bpmn_file, overlays, width='auto', height='auto')
46+
#' bpmnVisualizationR::display(bpmn_file, overlays, width='auto', height='auto')
4747
#'
4848
#' @seealso \code{\link{create_overlay}} to create an overlay
4949
#'
@@ -64,58 +64,58 @@ display <- function(
6464
)
6565
# create widget
6666
htmlwidgets::createWidget(
67-
name = "bpmnVisualization",
67+
name = "bpmnVisualizationR",
6868
x,
6969
width = width,
7070
height = height,
71-
package = "bpmnVisualization",
71+
package = "bpmnVisualizationR",
7272
elementId = elementId
7373
)
7474
}
7575

76-
#' @title Shiny output binding for the \code{bpmn-visualization} HTML widget
76+
#' @title Shiny output binding for the \code{bpmnVisualizationR} HTML widget
7777
#'
78-
#' @name bpmnVisualization-shiny-output
78+
#' @name bpmnVisualizationR-shiny-output
7979
#' @description
80-
#' Helper to create output function for using the \code{bpmn-visualization} HTML widget within Shiny applications and interactive Rmd documents.
80+
#' Helper to create output function for using the \code{bpmnVisualizationR} HTML widget within Shiny applications and interactive Rmd documents.
8181
#'
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.
8686
#'
87-
#' @returns An output function that enables the use of the \code{bpmn-visualization} widget within Shiny applications.
87+
#' @returns An output function that enables the use of the \code{bpmnVisualizationR} widget within Shiny applications.
8888
#'
8989
#' @export
90-
bpmnVisualizationOutput <- function(
90+
bpmnVisualizationROutput <- function(
9191
outputId,
9292
width = "100%",
9393
height = "400px"
9494
) {
9595
htmlwidgets::shinyWidgetOutput(
9696
outputId,
97-
"bpmnVisualization",
97+
"bpmnVisualizationR",
9898
width,
9999
height,
100-
package = "bpmnVisualization"
100+
package = "bpmnVisualizationR"
101101
)
102102
}
103103

104-
#' @title Shiny render binding for the \code{bpmn-visualization} HTML widget
104+
#' @title Shiny render binding for the \code{bpmnVisualizationR} HTML widget
105105
#'
106-
#' @rdname bpmnVisualization-shiny-render
106+
#' @rdname bpmnVisualizationR-shiny-render
107107
#' @description
108-
#' Helper to create render function for using the \code{bpmn-visualization} HTML widget within Shiny applications and interactive Rmd documents.
108+
#' Helper to create render function for using the \code{bpmnVisualizationR} HTML widget within Shiny applications and interactive Rmd documents.
109109
#'
110-
#' @param expr An expression that generates a \code{bpmn-visualization} HTML widget
110+
#' @param expr An expression that generates a \code{bpmnVisualizationR} 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
113113
#' is useful if you want to save an expression in a variable.
114114
#'
115-
#' @returns A render function that enables the use of the \code{bpmn-visualization} widget within Shiny applications.
115+
#' @returns A render function that enables the use of the \code{bpmnVisualizationR} widget within Shiny applications.
116116
#'
117117
#' @export
118-
renderBpmnVisualization <- function(
118+
renderBpmnVisualizationR <- function(
119119
expr,
120120
env = parent.frame(),
121121
quoted = FALSE
@@ -127,7 +127,7 @@ renderBpmnVisualization <- function(
127127
} # force quoted
128128
htmlwidgets::shinyRenderWidget(
129129
expr,
130-
bpmnVisualizationOutput,
130+
bpmnVisualizationROutput,
131131
env,
132132
quoted = TRUE
133133
)

0 commit comments

Comments
 (0)