From 02a68f2e6b6c3dd03cfa5675e4cfc0be188a1788 Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Wed, 26 Oct 2022 18:11:01 +0200 Subject: [PATCH 01/43] START html doc generation - init the pkgdown configuration --- .Rbuildignore | 3 +++ .gitignore | 1 + _pkgdown.yml | 2 ++ 3 files changed, 6 insertions(+) create mode 100644 _pkgdown.yml diff --git a/.Rbuildignore b/.Rbuildignore index 069b3ea..2d0f97e 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -6,3 +6,6 @@ ^.*\.md$ ^doc$ ^LICENSE$ +^_pkgdown\.yml$ +^docs$ +^pkgdown$ diff --git a/.gitignore b/.gitignore index 6399fc2..6fbd2dc 100644 --- a/.gitignore +++ b/.gitignore @@ -44,3 +44,4 @@ vignettes/*.pdf # R Environment Variables .Renviron +docs diff --git a/_pkgdown.yml b/_pkgdown.yml new file mode 100644 index 0000000..ec0a740 --- /dev/null +++ b/_pkgdown.yml @@ -0,0 +1,2 @@ +template: + bootstrap: 5 From 5d6b7aa9e01199e99a077736ce850667efdfeadf Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Thu, 27 Oct 2022 06:43:24 +0200 Subject: [PATCH 02/43] update CONTRIBUTING.md --- CONTRIBUTING.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2de7168..4e2331a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -113,6 +113,20 @@ To regenerate this documentation after function comment updating, run this comma devtools::document() ``` +### Generate the HTML documentation (site) + +Generate the HTML documentation with [pkgdown](https://pkgdown.r-lib.org) + +**Note**: on Ubuntu, you may encounter errors during the installation of `pkgdown`. In particular, the installation of some dependent packages may fail: +- `systemfonts`: run `sudo apt -y install libfontconfig1-dev` (see [systemfonts#35](https://github.com/r-lib/systemfonts/issues/35#issuecomment-633560151) ) +- `textshapping`: `run sudo apt -y install libharfbuzz-dev libfribidi-dev` + +To quickly iterate when changing the site configuration or content, run +``` +pkgdown::build_site(devel = TRUE, lazy = TRUE, preview = FALSE) +``` +For more details about the available options, see https://pkgdown.r-lib.org/reference/build_site.html + ### bpmn-visualization-js update The [bpmn-visualization-js](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) worklow when a new version of this library is released. From 63536056c5feb8b2bdc9d969a6219d5749744846 Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Thu, 27 Oct 2022 07:12:50 +0200 Subject: [PATCH 03/43] add gh wf --- .github/workflows/publish-documentation.yml | 75 +++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 .github/workflows/publish-documentation.yml diff --git a/.github/workflows/publish-documentation.yml b/.github/workflows/publish-documentation.yml new file mode 100644 index 0000000..bf48b79 --- /dev/null +++ b/.github/workflows/publish-documentation.yml @@ -0,0 +1,75 @@ +name: Publish Documentation + +on: + pull_request: + # To manage 'surge-preview' action teardown, add default event types + closed event type + types: [opened, synchronize, reopened, closed] + branches: + - main + paths: + # - '.github/actions/build-setup/**/*' + - '.github/workflows/publish-documentation.yml' + - 'inst/**' + - 'man/**' + - '_pkgdown.yml' + - 'CONTRIBUTING.md' + - 'DESCRIPTION' + - '' + - '' + - 'README.md' # TODO use the right file, the repo from the repo cannot be included (wrong format, too much info) +jobs: + generate: + if: github.event.action != 'closed' # on PR closed, only teardown the surge deployment + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v3 + + - uses: r-lib/actions/setup-r@v2 +# default r version: release +# with: +# use-public-rspm: true +# r-version: ${{ matrix.config.r }} + - uses: r-lib/actions/setup-r-dependencies@v2 + with: + extra-packages: any::pkgdown, local::. + needs: website + - uses: r-lib/actions/setup-tinytex@v2 + - uses: r-lib/actions/setup-pandoc@v2 + - name: Install package + run: R CMD INSTALL . + - name: Build website + shell: Rscript {0} + run: | + pkgdown::build_site() + - name: Upload + uses: actions/upload-artifact@v3 + with: + name: documentation-${{github.sha}} + path: docs + + publish_preview: # keep unique across jobs using surge preview (preview url and PR comment id) + if: github.event_name == 'pull_request' + runs-on: ubuntu-20.04 + needs: generate # TODO test on PR closed, as 'generate' is not run in this case + permissions: + pull-requests: write # surge-preview: PR comments + steps: + - name: Download documentation + if: github.event.action != 'closed' + uses: actions/download-artifact@v3 + with: + name: documentation-${{github.sha}} + - uses: bonitasoft/actions/packages/surge-preview-tools@v1 + id: surge-preview-tools + with: + surge-token: ${{ secrets.SURGE_TOKEN }} + - name: Manage surge preview + if: steps.surge-preview-tools.outputs.can-run-surge-command == 'true' + uses: afc163/surge-preview@v1 + with: + surge_token: ${{ secrets.GITHUB_TOKEN }} + github_token: ${{ secrets.SURGE_TOKEN }} + dist: ./docs + failOnError: true + teardown: 'true' + build: echo 'already built!' From 24b494aa753922afb827e0d3ab7c1850647d88e7 Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Thu, 27 Oct 2022 08:46:03 +0200 Subject: [PATCH 04/43] update condition to trigger teardown on pr close --- .github/workflows/publish-documentation.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-documentation.yml b/.github/workflows/publish-documentation.yml index bf48b79..fc057d5 100644 --- a/.github/workflows/publish-documentation.yml +++ b/.github/workflows/publish-documentation.yml @@ -48,7 +48,7 @@ jobs: path: docs publish_preview: # keep unique across jobs using surge preview (preview url and PR comment id) - if: github.event_name == 'pull_request' + if: github.event_name == 'pull_request' && (jobs.generate.result == 'success' || jobs.generate.result == 'skipped') runs-on: ubuntu-20.04 needs: generate # TODO test on PR closed, as 'generate' is not run in this case permissions: From b1fa5e204a5259472d7981afa78be152b92e279c Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Thu, 27 Oct 2022 08:47:41 +0200 Subject: [PATCH 05/43] update wf paths --- .github/workflows/publish-documentation.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/publish-documentation.yml b/.github/workflows/publish-documentation.yml index fc057d5..8d42638 100644 --- a/.github/workflows/publish-documentation.yml +++ b/.github/workflows/publish-documentation.yml @@ -11,11 +11,10 @@ on: - '.github/workflows/publish-documentation.yml' - 'inst/**' - 'man/**' + - '.Rbuildignore' - '_pkgdown.yml' - 'CONTRIBUTING.md' - 'DESCRIPTION' - - '' - - '' - 'README.md' # TODO use the right file, the repo from the repo cannot be included (wrong format, too much info) jobs: generate: From 00eb7a5d037f4324497a97360e27f4282bd24c50 Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Thu, 27 Oct 2022 08:55:12 +0200 Subject: [PATCH 06/43] gh wf: update condition --- .github/workflows/publish-documentation.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-documentation.yml b/.github/workflows/publish-documentation.yml index 8d42638..48e89d6 100644 --- a/.github/workflows/publish-documentation.yml +++ b/.github/workflows/publish-documentation.yml @@ -47,7 +47,7 @@ jobs: path: docs publish_preview: # keep unique across jobs using surge preview (preview url and PR comment id) - if: github.event_name == 'pull_request' && (jobs.generate.result == 'success' || jobs.generate.result == 'skipped') + if: github.event_name == 'pull_request' && (needs.generate.result == 'success' || needs.generate.result == 'skipped') runs-on: ubuntu-20.04 needs: generate # TODO test on PR closed, as 'generate' is not run in this case permissions: From daa40624ca67ae5909f0fd94b8ffa6ebe631d392 Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Thu, 27 Oct 2022 08:58:32 +0200 Subject: [PATCH 07/43] wf: update comment --- .github/workflows/publish-documentation.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish-documentation.yml b/.github/workflows/publish-documentation.yml index 48e89d6..ba70dd6 100644 --- a/.github/workflows/publish-documentation.yml +++ b/.github/workflows/publish-documentation.yml @@ -46,10 +46,12 @@ jobs: name: documentation-${{github.sha}} path: docs - publish_preview: # keep unique across jobs using surge preview (preview url and PR comment id) + publish_preview: + # on PR close, the 'generate' dependent job is skipped. So, without adding extra 'if' conditions, the job would be skipped as well + # see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-not-requiring-successful-dependent-jobs if: github.event_name == 'pull_request' && (needs.generate.result == 'success' || needs.generate.result == 'skipped') runs-on: ubuntu-20.04 - needs: generate # TODO test on PR closed, as 'generate' is not run in this case + needs: generate permissions: pull-requests: write # surge-preview: PR comments steps: From 4ae781d4e4dd0ec347feffea8557f0e80c8e1fbb Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Thu, 27 Oct 2022 09:02:47 +0200 Subject: [PATCH 08/43] gh wf update condition --- .github/workflows/publish-documentation.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish-documentation.yml b/.github/workflows/publish-documentation.yml index ba70dd6..8fd85f2 100644 --- a/.github/workflows/publish-documentation.yml +++ b/.github/workflows/publish-documentation.yml @@ -49,7 +49,9 @@ jobs: publish_preview: # on PR close, the 'generate' dependent job is skipped. So, without adding extra 'if' conditions, the job would be skipped as well # see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-not-requiring-successful-dependent-jobs - if: github.event_name == 'pull_request' && (needs.generate.result == 'success' || needs.generate.result == 'skipped') + # TODO the following is NOT WORKING!! +# if: github.event_name == 'pull_request' && (needs.generate.result == 'success' || needs.generate.result == 'skipped') + if: github.event_name == 'pull_request' && always() runs-on: ubuntu-20.04 needs: generate permissions: From 7dc289c869d0418591fbb030fc4c38895940aafe Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Thu, 17 Nov 2022 16:14:24 +0100 Subject: [PATCH 09/43] wf: only manage PR use case for now --- .github/workflows/publish-documentation.yml | 70 ++++++++++++++------- 1 file changed, 47 insertions(+), 23 deletions(-) diff --git a/.github/workflows/publish-documentation.yml b/.github/workflows/publish-documentation.yml index 8fd85f2..505cdbc 100644 --- a/.github/workflows/publish-documentation.yml +++ b/.github/workflows/publish-documentation.yml @@ -17,51 +17,41 @@ on: - 'DESCRIPTION' - 'README.md' # TODO use the right file, the repo from the repo cannot be included (wrong format, too much info) jobs: - generate: - if: github.event.action != 'closed' # on PR closed, only teardown the surge deployment + # for Pull Request +# TODO manage close pr for surge teardown if: github.event.action != 'closed' + pr_preview: + # TODO test Ubuntu 22 runs-on: ubuntu-20.04 + permissions: + pull-requests: write # surge-preview: PR comments steps: - uses: actions/checkout@v3 +# TODO the following is duplicated with the R-CMD-check.yaml workflow - uses: r-lib/actions/setup-r@v2 -# default r version: release -# with: -# use-public-rspm: true -# r-version: ${{ matrix.config.r }} + # default r version: release + # with: + # use-public-rspm: true + # r-version: ${{ matrix.config.r }} - uses: r-lib/actions/setup-r-dependencies@v2 with: extra-packages: any::pkgdown, local::. needs: website - uses: r-lib/actions/setup-tinytex@v2 - uses: r-lib/actions/setup-pandoc@v2 +# end of duplication - name: Install package run: R CMD INSTALL . - name: Build website shell: Rscript {0} run: | pkgdown::build_site() +# TODO only if we cannot publish to surge - name: Upload uses: actions/upload-artifact@v3 with: name: documentation-${{github.sha}} path: docs - - publish_preview: - # on PR close, the 'generate' dependent job is skipped. So, without adding extra 'if' conditions, the job would be skipped as well - # see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-not-requiring-successful-dependent-jobs - # TODO the following is NOT WORKING!! -# if: github.event_name == 'pull_request' && (needs.generate.result == 'success' || needs.generate.result == 'skipped') - if: github.event_name == 'pull_request' && always() - runs-on: ubuntu-20.04 - needs: generate - permissions: - pull-requests: write # surge-preview: PR comments - steps: - - name: Download documentation - if: github.event.action != 'closed' - uses: actions/download-artifact@v3 - with: - name: documentation-${{github.sha}} - uses: bonitasoft/actions/packages/surge-preview-tools@v1 id: surge-preview-tools with: @@ -76,3 +66,37 @@ jobs: failOnError: true teardown: 'true' build: echo 'already built!' + +# generate: +# if: github.event.action != 'closed' # on PR closed, only teardown the surge deployment +# +# publish_preview: +# # on PR close, the 'generate' dependent job is skipped. So, without adding extra 'if' conditions, the job would be skipped as well +# # see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-not-requiring-successful-dependent-jobs +# # TODO the following is NOT WORKING!! +## if: github.event_name == 'pull_request' && (needs.generate.result == 'success' || needs.generate.result == 'skipped') +# if: github.event_name == 'pull_request' && always() +# runs-on: ubuntu-20.04 +# needs: generate +# permissions: +# pull-requests: write # surge-preview: PR comments +# steps: +# - name: Download documentation +# if: github.event.action != 'closed' +# uses: actions/download-artifact@v3 +# with: +# name: documentation-${{github.sha}} +# - uses: bonitasoft/actions/packages/surge-preview-tools@v1 +# id: surge-preview-tools +# with: +# surge-token: ${{ secrets.SURGE_TOKEN }} +# - name: Manage surge preview +# if: steps.surge-preview-tools.outputs.can-run-surge-command == 'true' +# uses: afc163/surge-preview@v1 +# with: +# surge_token: ${{ secrets.GITHUB_TOKEN }} +# github_token: ${{ secrets.SURGE_TOKEN }} +# dist: ./docs +# failOnError: true +# teardown: 'true' +# build: echo 'already built!' From 8a3f355f4c58aa594d739d87fcf37b391d48bc14 Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Thu, 17 Nov 2022 16:36:15 +0100 Subject: [PATCH 10/43] wf: bump surge-preview-tools from v1 to v2 --- .github/workflows/publish-documentation.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish-documentation.yml b/.github/workflows/publish-documentation.yml index 505cdbc..b450739 100644 --- a/.github/workflows/publish-documentation.yml +++ b/.github/workflows/publish-documentation.yml @@ -52,7 +52,7 @@ jobs: with: name: documentation-${{github.sha}} path: docs - - uses: bonitasoft/actions/packages/surge-preview-tools@v1 + - uses: bonitasoft/actions/packages/surge-preview-tools@v2 id: surge-preview-tools with: surge-token: ${{ secrets.SURGE_TOKEN }} @@ -86,7 +86,7 @@ jobs: # uses: actions/download-artifact@v3 # with: # name: documentation-${{github.sha}} -# - uses: bonitasoft/actions/packages/surge-preview-tools@v1 +# - uses: bonitasoft/actions/packages/surge-preview-tools@v2 # id: surge-preview-tools # with: # surge-token: ${{ secrets.SURGE_TOKEN }} From 9aa58366b65481ca6fab10a81d827d7e9be0e499 Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Thu, 17 Nov 2022 16:41:18 +0100 Subject: [PATCH 11/43] wf: log node environment info --- .github/workflows/publish-documentation.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/publish-documentation.yml b/.github/workflows/publish-documentation.yml index b450739..5cc6fb0 100644 --- a/.github/workflows/publish-documentation.yml +++ b/.github/workflows/publish-documentation.yml @@ -56,6 +56,11 @@ jobs: id: surge-preview-tools with: surge-token: ${{ secrets.SURGE_TOKEN }} + - name: echo node environment + run: | + node --version + npm --version + npx --version - name: Manage surge preview if: steps.surge-preview-tools.outputs.can-run-surge-command == 'true' uses: afc163/surge-preview@v1 From 22cfb38b63452a411d9fcd56bd1c7f0b6cf3773e Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Thu, 17 Nov 2022 18:45:21 +0100 Subject: [PATCH 12/43] doc: improve wording and fix typo --- CONTRIBUTING.md | 4 ++-- README.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4e2331a..b47b320 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -127,9 +127,9 @@ pkgdown::build_site(devel = TRUE, lazy = TRUE, preview = FALSE) ``` For more details about the available options, see https://pkgdown.r-lib.org/reference/build_site.html -### bpmn-visualization-js update +### bpmn-visualization TypeScript library update -The [bpmn-visualization-js](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) worklow when a new version of this library is released. +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. This generates a new Pull Request and notifies the reviewers. diff --git a/README.md b/README.md index 231034a..8a9c08a 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ This project is an R package for visualizing process execution data on BPMN diagrams, using overlays, style customization and interactions. -It is made possible by [htmlwidgets](http://www.htmlwidgets.org/), which provides an easy-to-use framework for bringing together R and the [BPMN Visualization](https://github.com/process-analytics/bpmn-visualization-js) TypeScript library. +It is made possible by [htmlwidgets](http://www.htmlwidgets.org/), which provides an easy-to-use framework for bringing together R and the [bpmn-visualization](https://github.com/process-analytics/bpmn-visualization-js) TypeScript library. ## ♻️ Usage ### Installation From 8c07dfc1f5553358f6c9c35d1c892393b97c497f Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Thu, 17 Nov 2022 18:46:38 +0100 Subject: [PATCH 13/43] doc: use 'main' branch instead of 'master' --- CONTRIBUTING.md | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b47b320..f8f420c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -8,8 +8,8 @@ All members of our community are expected to follow our [Code of Conduct](https: There are many ways to contribute: -- help people with the questions they ask on the [Github Issues](https://github.com/process-analytics/bpmn-visualization-R/issues) -- submitting bug reports and feature requests in the [Github Issues](https://github.com/process-analytics/bpmn-visualization-R/issues/new) +- help people with the questions they ask on the [GitHub Issues](https://github.com/process-analytics/bpmn-visualization-R/issues) +- submitting bug reports and feature requests in the [GitHub Issues](https://github.com/process-analytics/bpmn-visualization-R/issues/new) - improving the README & documentation - writing code which can be incorporated into `bpmn-visualization-R` itself @@ -23,12 +23,12 @@ For all contributions, please respect the following guidelines: 3. Do not commit changes to files that are irrelevant to your feature or bugfix (eg: `.gitignore`). -7. Open a [GitHub Pull Request](CONTRIBUTING.md#open-a-pull-request) with your patches. (**1** pull request = **1** feature or bug) +4. Open a [GitHub Pull Request](CONTRIBUTING.md#open-a-pull-request) with your patches. (**1** pull request = **1** feature or bug) We will review your contribution and respond as quickly as possible. Keep in mind that this is an open source project, and it may take us some time to get back to you. Your patience is very much appreciated. -8. If this is your 1st Pull Request, sign the [Contributor License Agreement](CONTRIBUTING.md#sign-the-contributor-license-agreement) +5. If this is your 1st Pull Request, sign the [Contributor License Agreement](CONTRIBUTING.md#sign-the-contributor-license-agreement) -9. Be willing to accept criticism and work on improving your code. +6. Be willing to accept criticism and work on improving your code. **Working on your first Pull Request?** You can learn how from this *free* series [How to Contribute to an Open Source Project on GitHub](https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github) @@ -45,26 +45,26 @@ git checkout -b 25-customize_overlays ### Commit in the Pull Request There is no convention for the commit message in the Pull Request. The most important part is the title of the Pull Request, because: -- Everyone must use Pull Request, no direct commit allowed on master branch +- Everyone must use Pull Request, no direct commit allowed on main branch - The commits of a Pull Request are almost always squashed - The title of the Pull Request is used as proposal for the maintainer merging the Pull Request ### Open a Pull Request -At this point, you should switch back to your master branch and make sure it's up to date with `bpmn-visualization-R` -`master` branch: +At this point, you should switch back to your main branch and make sure it's up-to-date with `bpmn-visualization-R` +`main` branch: ```sh git remote add upstream git@github.com:process-analytics/bpmn-visualization-R.git -git checkout master -git pull upstream master +git checkout main +git pull upstream main ``` -Then update your feature branch from your local copy of master, and push it! +Then update your feature branch from your local copy of main, and push it! ```sh git checkout 25-customize_overlays -git rebase master +git rebase main git push --set-upstream origin 25-customize_overlays ``` @@ -94,7 +94,7 @@ Here's the suggested workflow: ```sh git checkout 25-customize_overlays -git pull --rebase upstream master +git pull --rebase upstream main git push --force-with-lease 25-customize_overlays ``` From 3385c311425e9c64e8748923e3b708937f41b5b2 Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Thu, 17 Nov 2022 18:53:27 +0100 Subject: [PATCH 14/43] update .gitignore comment --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 6fbd2dc..b2e0e62 100644 --- a/.gitignore +++ b/.gitignore @@ -44,4 +44,6 @@ vignettes/*.pdf # R Environment Variables .Renviron + +# Generated documentation docs From 9043dcea7ef28c74e9b2b55544ee5daf96d9a530 Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Thu, 17 Nov 2022 18:55:47 +0100 Subject: [PATCH 15/43] EXTRA js file: update the license header (use block comment instead of documentation comment) The header doesn't document function, so we shouldn't use documentation block --- inst/htmlwidgets/bpmnVisualization.js | 30 +++++++++++++-------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/inst/htmlwidgets/bpmnVisualization.js b/inst/htmlwidgets/bpmnVisualization.js index c35c861..7980ffd 100644 --- a/inst/htmlwidgets/bpmnVisualization.js +++ b/inst/htmlwidgets/bpmnVisualization.js @@ -1,18 +1,18 @@ -/** - * Copyright 2021 Bonitasoft S.A. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +/* +Copyright 2021 Bonitasoft S.A. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ HTMLWidgets.widget({ name: "bpmnVisualization", From 361faa116f0c9aeaee6c02b6b00a0b78322720f8 Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Thu, 17 Nov 2022 19:09:50 +0100 Subject: [PATCH 16/43] EXTRA examples: prefix the package name when calling functions --- R/bpmnVisualization.R | 32 ++++++++++++++++---------------- man/bpmnVisualization-package.Rd | 2 +- man/display.Rd | 6 +++--- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/R/bpmnVisualization.R b/R/bpmnVisualization.R index b90a96b..4e51448 100644 --- a/R/bpmnVisualization.R +++ b/R/bpmnVisualization.R @@ -16,7 +16,7 @@ #' #' @name display #' @description Display BPMN diagram based on BPMN definition in XML format -#' +#' #' @param bpmnXML A file name or xml document or string in BPMN XML format #' @param overlays An element or a list of elements to be added to the diagram's existing elements. #' Use overlay function to create an overlay object with content and relative position. @@ -26,25 +26,25 @@ #' Use an explicit element ID for the widget (rather than an automatically #' generated one). Useful if you have other JavaScript that needs to explicitly #' discover and interact with a specific widget instance. -#' -#' @returns A \code{bpmn-visualization} Widget that will intelligently print itself into HTML in a variety of contexts +#' +#' @returns A \code{bpmn-visualization} Widget that will intelligently print itself into HTML in a variety of contexts #' including the R console, within R Markdown documents, and within Shiny output bindings. -#' -#' @examples +#' +#' @examples #' # Load the BPMN file #' bpmn_file <- system.file("examples/Order_Management.bpmn", package = "bpmnVisualization") -#' +#' #' # Display the BPMN diagram -#' display(bpmn_file, width='auto', height='auto') -#' +#' bpmnVisualization::display(bpmn_file, width='auto', height='auto') +#' #' # Display the BPMN diagram with overlays #' overlays <- list( #' create_overlay("start_event_1_1", "42"), #' create_overlay("sequence_flow_1_1", "42"), #' create_overlay("task_1_1", "9") #' ) -#' display(bpmn_file, overlays, width='auto', height='auto') -#' +#' bpmnVisualization::display(bpmn_file, overlays, width='auto', height='auto') +#' #' @seealso \code{\link{create_overlay}} to create an overlay #' #' @import htmlwidgets @@ -76,14 +76,14 @@ display <- function( #' @title Shiny output binding for the \code{bpmn-visualization} HTML widget #' #' @name bpmnVisualization-shiny-output -#' @description +#' @description #' Helper to create output function for using the \code{bpmn-visualization} HTML widget within Shiny applications and interactive Rmd documents. -#' +#' #' @param outputId output variable to read from #' @param width,height Must be a valid CSS unit (like \code{'100\%'}, #' \code{'400px'}, \code{'auto'}) or a number, which will be coerced to a #' string and have \code{'px'} appended. -#' +#' #' @returns An output function that enables the use of the \code{bpmn-visualization} widget within Shiny applications. #' #' @export @@ -102,11 +102,11 @@ bpmnVisualizationOutput <- function( } #' @title Shiny render binding for the \code{bpmn-visualization} HTML widget -#' +#' #' @rdname bpmnVisualization-shiny-render -#' @description +#' @description #' Helper to create render function for using the \code{bpmn-visualization} HTML widget within Shiny applications and interactive Rmd documents. -#' +#' #' @param expr An expression that generates a \code{bpmn-visualization} HTML widget #' @param env The environment in which to evaluate \code{expr}. #' @param quoted Is \code{expr} a quoted expression (with \code{quote()})? This diff --git a/man/bpmnVisualization-package.Rd b/man/bpmnVisualization-package.Rd index 5e434ae..46219f4 100644 --- a/man/bpmnVisualization-package.Rd +++ b/man/bpmnVisualization-package.Rd @@ -26,7 +26,7 @@ Maintainer: \packageMaintainer{bpmnVisualization} bpmn_file <- system.file("examples/Order_Management.bpmn", package = "bpmnVisualization") # Display the BPMN diagram -display(bpmn_file, width='auto', height='auto') +bpmnVisualization::display(bpmn_file, width='auto', height='auto') } } diff --git a/man/display.Rd b/man/display.Rd index 88c4d1e..e8908d5 100644 --- a/man/display.Rd +++ b/man/display.Rd @@ -28,7 +28,7 @@ generated one). Useful if you have other JavaScript that needs to explicitly discover and interact with a specific widget instance.} } \value{ -A \code{bpmn-visualization} Widget that will intelligently print itself into HTML in a variety of contexts +A \code{bpmn-visualization} Widget that will intelligently print itself into HTML in a variety of contexts including the R console, within R Markdown documents, and within Shiny output bindings. } \description{ @@ -39,7 +39,7 @@ Display BPMN diagram based on BPMN definition in XML format bpmn_file <- system.file("examples/Order_Management.bpmn", package = "bpmnVisualization") # Display the BPMN diagram -display(bpmn_file, width='auto', height='auto') +bpmnVisualization::display(bpmn_file, width='auto', height='auto') # Display the BPMN diagram with overlays overlays <- list( @@ -47,7 +47,7 @@ overlays <- list( create_overlay("sequence_flow_1_1", "42"), create_overlay("task_1_1", "9") ) -display(bpmn_file, overlays, width='auto', height='auto') +bpmnVisualization::display(bpmn_file, overlays, width='auto', height='auto') } \seealso{ From 6d759dce4dc5baa27bd90934a44dda6f1e60356e Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Fri, 18 Nov 2022 09:24:41 +0100 Subject: [PATCH 17/43] WF debug surge error --- .github/workflows/publish-documentation.yml | 94 ++++++++++++++------- 1 file changed, 65 insertions(+), 29 deletions(-) diff --git a/.github/workflows/publish-documentation.yml b/.github/workflows/publish-documentation.yml index 5cc6fb0..592926a 100644 --- a/.github/workflows/publish-documentation.yml +++ b/.github/workflows/publish-documentation.yml @@ -17,8 +17,7 @@ on: - 'DESCRIPTION' - 'README.md' # TODO use the right file, the repo from the repo cannot be included (wrong format, too much info) jobs: - # for Pull Request -# TODO manage close pr for surge teardown if: github.event.action != 'closed' + # TODO temp to debug surge deploy error pr_preview: # TODO test Ubuntu 22 runs-on: ubuntu-20.04 @@ -26,32 +25,6 @@ jobs: pull-requests: write # surge-preview: PR comments steps: - uses: actions/checkout@v3 - -# TODO the following is duplicated with the R-CMD-check.yaml workflow - - uses: r-lib/actions/setup-r@v2 - # default r version: release - # with: - # use-public-rspm: true - # r-version: ${{ matrix.config.r }} - - uses: r-lib/actions/setup-r-dependencies@v2 - with: - extra-packages: any::pkgdown, local::. - needs: website - - uses: r-lib/actions/setup-tinytex@v2 - - uses: r-lib/actions/setup-pandoc@v2 -# end of duplication - - name: Install package - run: R CMD INSTALL . - - name: Build website - shell: Rscript {0} - run: | - pkgdown::build_site() -# TODO only if we cannot publish to surge - - name: Upload - uses: actions/upload-artifact@v3 - with: - name: documentation-${{github.sha}} - path: docs - uses: bonitasoft/actions/packages/surge-preview-tools@v2 id: surge-preview-tools with: @@ -61,6 +34,13 @@ jobs: node --version npm --version npx --version + - name: Build fake demo + if: ${{ github.event.action != 'closed' }} + env: + PR_NUMBER: ${{ github.event.pull_request.number }} + run: | + mkdir docs + echo "This is a preview site for PR #${PR_NUMBER}" > docs/index.html - name: Manage surge preview if: steps.surge-preview-tools.outputs.can-run-surge-command == 'true' uses: afc163/surge-preview@v1 @@ -70,7 +50,63 @@ jobs: dist: ./docs failOnError: true teardown: 'true' - build: echo 'already built!' + build: ls -lh docs + + + + # for Pull Request +# TODO manage close pr for surge teardown if: github.event.action != 'closed' +# pr_preview: +# # TODO test Ubuntu 22 +# runs-on: ubuntu-20.04 +# permissions: +# pull-requests: write # surge-preview: PR comments +# steps: +# - uses: actions/checkout@v3 +## TODO the following is duplicated with the R-CMD-check.yaml workflow +# - uses: r-lib/actions/setup-r@v2 +# # default r version: release +# # with: +# # use-public-rspm: true +# # r-version: ${{ matrix.config.r }} +# - uses: r-lib/actions/setup-r-dependencies@v2 +# with: +# extra-packages: any::pkgdown, local::. +# needs: website +# - uses: r-lib/actions/setup-tinytex@v2 +# - uses: r-lib/actions/setup-pandoc@v2 +## end of duplication +# - name: Install package +# run: R CMD INSTALL . +# - name: Build website +# shell: Rscript {0} +# run: | +# pkgdown::build_site() +## TODO only if we cannot publish to surge +# - name: Upload +# uses: actions/upload-artifact@v3 +# with: +# name: documentation-${{github.sha}} +# path: docs +# - uses: bonitasoft/actions/packages/surge-preview-tools@v2 +# id: surge-preview-tools +# with: +# surge-token: ${{ secrets.SURGE_TOKEN }} +# - name: echo node environment +# run: | +# node --version +# npm --version +# npx --version +# - name: Manage surge preview +# if: steps.surge-preview-tools.outputs.can-run-surge-command == 'true' +# uses: afc163/surge-preview@v1 +# with: +# surge_token: ${{ secrets.GITHUB_TOKEN }} +# github_token: ${{ secrets.SURGE_TOKEN }} +# dist: ./docs +# failOnError: true +# teardown: 'true' +# build: ls -lh docs # generate: # if: github.event.action != 'closed' # on PR closed, only teardown the surge deployment From ef722c00fc5ecfdb9513fd1538ff2b32d9811f4d Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Fri, 18 Nov 2022 09:24:55 +0100 Subject: [PATCH 18/43] TMP remove the build wf --- .github/workflows/R-CMD-check.yaml | 90 ------------------------------ 1 file changed, 90 deletions(-) delete mode 100644 .github/workflows/R-CMD-check.yaml diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml deleted file mode 100644 index d9f0180..0000000 --- a/.github/workflows/R-CMD-check.yaml +++ /dev/null @@ -1,90 +0,0 @@ -# Initially created by following https://orchid00.github.io/actions_sandbox/packageci.html#set-up-package -# For help debugging build failures open an issue on the RStudio community with the 'github-actions' tag. -# https://community.rstudio.com/new-topic?category=Package%20development&tags=github-actions -on: - push: - branches: - - main - paths: - - '.github/workflows/R-CMD-check.yaml' - - 'R/**/*' - - 'inst/**/*' - - 'man/**/*' - - '.Rbuildignore' - - 'DESCRIPTION' - - 'NAMESPACE' - pull_request: - branches: - - main - paths: - - '.github/workflows/R-CMD-check.yaml' - - 'R/**/*' - - 'inst/**/*' - - 'man/**/*' - - '.Rbuildignore' - - 'DESCRIPTION' - - 'NAMESPACE' - -name: R-CMD-check - -jobs: - R-CMD-check: - runs-on: ${{ matrix.config.os }} - name: ${{ matrix.config.os }} (${{ matrix.config.r }}) - - strategy: - fail-fast: false - matrix: - config: - - {os: ubuntu-20.04, r: '3.6.3'} - - {os: ubuntu-20.04, r: '4.1.1'} - # CRAN submission required to use this R version - - {os: ubuntu-20.04, r: 'release'} - - env: - R_REMOTES_NO_ERRORS_FROM_WARNINGS: true - RSPM: https://packagemanager.rstudio.com/cran/__linux__/focal/latest - - steps: - - uses: actions/checkout@v3 - - uses: r-lib/actions/setup-r@v2 - with: - r-version: ${{ matrix.config.r }} - - uses: r-lib/actions/setup-r-dependencies@v2 - with: - extra-packages: any::rcmdcheck - needs: check - - uses: r-lib/actions/setup-pandoc@v2 - - uses: r-lib/actions/check-r-package@v2 - - -# ###################################################################################################################### -# Package submission checks -# https://cran.r-project.org/web/packages/policies.html#Submission -# Run custom build and check commands, not provided by the r-lib actions -# ###################################################################################################################### - - name: Build the source package - run: | - R CMD build . - ls -la - - name: Upload the source package - uses: actions/upload-artifact@v3 - with: - name: ${{ matrix.config.os }}-r${{ matrix.config.r }}-source-package - path: bpmnVisualization_*.tar.gz - - - # Sets up LaTeX with tinytex, for PDF generation - # not needed before as the checks on the repo sources are done with --no-manual - - uses: r-lib/actions/setup-tinytex@v2 - - - name: Check the source package - id: source_package_checks - run: R CMD check --as-cran bpmnVisualization_*.tar.gz - - - name: Upload source package check results - if: ${{ failure() && steps.source_package_checks.outcome == 'failure' }} - uses: actions/upload-artifact@v3 - with: - name: ${{ matrix.config.os }}-r${{ matrix.config.r }}-source-package-check-results - path: bpmnVisualization.Rcheck From b4dd9fbe512a1eedb05fbf8022e4ca3b1947139d Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Fri, 18 Nov 2022 10:29:16 +0100 Subject: [PATCH 19/43] Revert "TMP remove the build wf" This reverts commit ef722c00fc5ecfdb9513fd1538ff2b32d9811f4d. --- .github/workflows/R-CMD-check.yaml | 90 ++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 .github/workflows/R-CMD-check.yaml diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml new file mode 100644 index 0000000..d9f0180 --- /dev/null +++ b/.github/workflows/R-CMD-check.yaml @@ -0,0 +1,90 @@ +# Initially created by following https://orchid00.github.io/actions_sandbox/packageci.html#set-up-package +# For help debugging build failures open an issue on the RStudio community with the 'github-actions' tag. +# https://community.rstudio.com/new-topic?category=Package%20development&tags=github-actions +on: + push: + branches: + - main + paths: + - '.github/workflows/R-CMD-check.yaml' + - 'R/**/*' + - 'inst/**/*' + - 'man/**/*' + - '.Rbuildignore' + - 'DESCRIPTION' + - 'NAMESPACE' + pull_request: + branches: + - main + paths: + - '.github/workflows/R-CMD-check.yaml' + - 'R/**/*' + - 'inst/**/*' + - 'man/**/*' + - '.Rbuildignore' + - 'DESCRIPTION' + - 'NAMESPACE' + +name: R-CMD-check + +jobs: + R-CMD-check: + runs-on: ${{ matrix.config.os }} + name: ${{ matrix.config.os }} (${{ matrix.config.r }}) + + strategy: + fail-fast: false + matrix: + config: + - {os: ubuntu-20.04, r: '3.6.3'} + - {os: ubuntu-20.04, r: '4.1.1'} + # CRAN submission required to use this R version + - {os: ubuntu-20.04, r: 'release'} + + env: + R_REMOTES_NO_ERRORS_FROM_WARNINGS: true + RSPM: https://packagemanager.rstudio.com/cran/__linux__/focal/latest + + steps: + - uses: actions/checkout@v3 + - uses: r-lib/actions/setup-r@v2 + with: + r-version: ${{ matrix.config.r }} + - uses: r-lib/actions/setup-r-dependencies@v2 + with: + extra-packages: any::rcmdcheck + needs: check + - uses: r-lib/actions/setup-pandoc@v2 + - uses: r-lib/actions/check-r-package@v2 + + +# ###################################################################################################################### +# Package submission checks +# https://cran.r-project.org/web/packages/policies.html#Submission +# Run custom build and check commands, not provided by the r-lib actions +# ###################################################################################################################### + - name: Build the source package + run: | + R CMD build . + ls -la + - name: Upload the source package + uses: actions/upload-artifact@v3 + with: + name: ${{ matrix.config.os }}-r${{ matrix.config.r }}-source-package + path: bpmnVisualization_*.tar.gz + + + # Sets up LaTeX with tinytex, for PDF generation + # not needed before as the checks on the repo sources are done with --no-manual + - uses: r-lib/actions/setup-tinytex@v2 + + - name: Check the source package + id: source_package_checks + run: R CMD check --as-cran bpmnVisualization_*.tar.gz + + - name: Upload source package check results + if: ${{ failure() && steps.source_package_checks.outcome == 'failure' }} + uses: actions/upload-artifact@v3 + with: + name: ${{ matrix.config.os }}-r${{ matrix.config.r }}-source-package-check-results + path: bpmnVisualization.Rcheck From b740b93d5a7067cd15c802720491cc667a47d25f Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Fri, 18 Nov 2022 10:31:01 +0100 Subject: [PATCH 20/43] TMP disable build wf --- .github/workflows/R-CMD-check.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index d9f0180..ae2939c 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -29,6 +29,7 @@ name: R-CMD-check jobs: R-CMD-check: + if: ${{ matrix.config.os == 'unknown' }} # TMP disable the workflow run runs-on: ${{ matrix.config.os }} name: ${{ matrix.config.os }} (${{ matrix.config.r }}) From f03b019be82860a1b7efd55ab016617ba9eefbf1 Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Fri, 18 Nov 2022 11:35:07 +0100 Subject: [PATCH 21/43] WF: log surge tools outputs --- .github/workflows/publish-documentation.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/publish-documentation.yml b/.github/workflows/publish-documentation.yml index 592926a..e42a809 100644 --- a/.github/workflows/publish-documentation.yml +++ b/.github/workflows/publish-documentation.yml @@ -29,6 +29,12 @@ jobs: id: surge-preview-tools with: surge-token: ${{ secrets.SURGE_TOKEN }} + - name: Echo surge preview tools output + run: | + echo "can-run-surge-command: ${{ steps.surge-preview-tools.outputs.can-run-surge-command }}" + echo "domain-exist: ${{ steps.surge-preview-tools.outputs.domain-exist }}" + echo "preview-url: ${{ steps.surge-preview-tools.outputs.preview-url }}" + echo "surge-token-valid: ${{ steps.surge-preview-tools.outputs.surge-token-valid }}" - name: echo node environment run: | node --version From 9ebd98992c566b85c81bf82b35eb1c0998d30124 Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Fri, 18 Nov 2022 11:39:32 +0100 Subject: [PATCH 22/43] TMP: fix condition to disable the "build" wf --- .github/workflows/R-CMD-check.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index ae2939c..44385a2 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -29,7 +29,7 @@ name: R-CMD-check jobs: R-CMD-check: - if: ${{ matrix.config.os == 'unknown' }} # TMP disable the workflow run + if: ${{ runner.os == 'unknown' }} # TMP disable the workflow run runs-on: ${{ matrix.config.os }} name: ${{ matrix.config.os }} (${{ matrix.config.r }}) From 1857780c8583036f0b808425f1ec82a341a72b02 Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Fri, 18 Nov 2022 11:53:21 +0100 Subject: [PATCH 23/43] WF: dedicated wf for PR --- .../workflows/pr-preview-documentation.yml | 45 +++++++++++++++++++ .github/workflows/publish-documentation.yml | 22 ++++----- 2 files changed, 57 insertions(+), 10 deletions(-) create mode 100644 .github/workflows/pr-preview-documentation.yml diff --git a/.github/workflows/pr-preview-documentation.yml b/.github/workflows/pr-preview-documentation.yml new file mode 100644 index 0000000..8ac8a36 --- /dev/null +++ b/.github/workflows/pr-preview-documentation.yml @@ -0,0 +1,45 @@ +name: Publish Documentation Preview for Pull Request + +on: + pull_request: + # To manage 'surge-preview' action teardown, add default event types + closed event type + types: [opened, synchronize, reopened, closed] + branches: + - main + +permissions: + pull-requests: write + +jobs: + demo_preview: # the id is used by surge to generate the surge url + runs-on: ubuntu-20.04 + steps: + - uses: bonitasoft/actions/packages/surge-preview-tools@v2 + id: surge-preview-tools + with: + surge-token: ${{ secrets.SURGE_TOKEN }} + - name: Echo surge preview tools output + run: | + echo "can-run-surge-command: ${{ steps.surge-preview-tools.outputs.can-run-surge-command }}" + echo "domain-exist: ${{ steps.surge-preview-tools.outputs.domain-exist }}" + echo "preview-url: ${{ steps.surge-preview-tools.outputs.preview-url }}" + echo "surge-token-valid: ${{ steps.surge-preview-tools.outputs.surge-token-valid }}" + - name: Build fake demo + if: ${{ github.event.action != 'closed' }} + env: + PR_NUMBER: ${{ github.event.pull_request.number }} + run: | + mkdir site + echo "This is a preview site for PR #${PR_NUMBER}" > site/index.html + - name: Publish Demo preview + if: steps.surge-preview-tools.outputs.can-run-surge-command == 'true' + id: publish_demo_preview + uses: afc163/surge-preview@v1 + with: + surge_token: ${{ secrets.SURGE_TOKEN }} + github_token: ${{ secrets.GITHUB_TOKEN }} + dist: site + failOnError: true + teardown: true + build: | + ls -lh site diff --git a/.github/workflows/publish-documentation.yml b/.github/workflows/publish-documentation.yml index e42a809..1a171a9 100644 --- a/.github/workflows/publish-documentation.yml +++ b/.github/workflows/publish-documentation.yml @@ -47,16 +47,18 @@ jobs: run: | mkdir docs echo "This is a preview site for PR #${PR_NUMBER}" > docs/index.html - - name: Manage surge preview - if: steps.surge-preview-tools.outputs.can-run-surge-command == 'true' - uses: afc163/surge-preview@v1 - with: - surge_token: ${{ secrets.GITHUB_TOKEN }} - github_token: ${{ secrets.SURGE_TOKEN }} - dist: ./docs - failOnError: true - teardown: 'true' - build: ls -lh docs + - name: Echo docs content + run: ls -lh docs +# - name: Manage surge preview +# if: steps.surge-preview-tools.outputs.can-run-surge-command == 'true' +# uses: afc163/surge-preview@v1 +# with: +# surge_token: ${{ secrets.GITHUB_TOKEN }} +# github_token: ${{ secrets.SURGE_TOKEN }} +# dist: ./docs +# failOnError: true +# teardown: 'true' +# build: ls -lh docs From 965e4361f71e17b1114276af8ae90ed134a90375 Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Fri, 18 Nov 2022 11:57:44 +0100 Subject: [PATCH 24/43] WF: add checkout step --- .github/workflows/pr-preview-documentation.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pr-preview-documentation.yml b/.github/workflows/pr-preview-documentation.yml index 8ac8a36..9f7e8d4 100644 --- a/.github/workflows/pr-preview-documentation.yml +++ b/.github/workflows/pr-preview-documentation.yml @@ -14,6 +14,7 @@ jobs: demo_preview: # the id is used by surge to generate the surge url runs-on: ubuntu-20.04 steps: + - uses: actions/checkout@v3 - uses: bonitasoft/actions/packages/surge-preview-tools@v2 id: surge-preview-tools with: From a4b4efb58dd63cebc1df20aef5348d9732f4469a Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Fri, 18 Nov 2022 12:00:52 +0100 Subject: [PATCH 25/43] WF: more tests --- .github/workflows/pr-preview-documentation.yml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/pr-preview-documentation.yml b/.github/workflows/pr-preview-documentation.yml index 9f7e8d4..f518fb1 100644 --- a/.github/workflows/pr-preview-documentation.yml +++ b/.github/workflows/pr-preview-documentation.yml @@ -11,7 +11,7 @@ permissions: pull-requests: write jobs: - demo_preview: # the id is used by surge to generate the surge url + pr_preview: # the id is used by surge to generate the surge url runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v3 @@ -30,17 +30,16 @@ jobs: env: PR_NUMBER: ${{ github.event.pull_request.number }} run: | - mkdir site - echo "This is a preview site for PR #${PR_NUMBER}" > site/index.html + mkdir docs + echo "This is a preview site for PR #${PR_NUMBER}" > docs/index.html - name: Publish Demo preview if: steps.surge-preview-tools.outputs.can-run-surge-command == 'true' - id: publish_demo_preview + id: doc_preview uses: afc163/surge-preview@v1 with: surge_token: ${{ secrets.SURGE_TOKEN }} github_token: ${{ secrets.GITHUB_TOKEN }} - dist: site + dist: docs failOnError: true teardown: true - build: | - ls -lh site + build: ls -lh docs From a76b0e643e46e8172bf06b17a67e55abf1db6d9c Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Fri, 18 Nov 2022 12:05:38 +0100 Subject: [PATCH 26/43] WF: more tests --- .github/workflows/pr-preview-documentation.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr-preview-documentation.yml b/.github/workflows/pr-preview-documentation.yml index f518fb1..cf8e273 100644 --- a/.github/workflows/pr-preview-documentation.yml +++ b/.github/workflows/pr-preview-documentation.yml @@ -25,6 +25,11 @@ jobs: echo "domain-exist: ${{ steps.surge-preview-tools.outputs.domain-exist }}" echo "preview-url: ${{ steps.surge-preview-tools.outputs.preview-url }}" echo "surge-token-valid: ${{ steps.surge-preview-tools.outputs.surge-token-valid }}" + - name: echo node environment + run: | + node --version + npm --version + npx --version - name: Build fake demo if: ${{ github.event.action != 'closed' }} env: @@ -32,7 +37,9 @@ jobs: run: | mkdir docs echo "This is a preview site for PR #${PR_NUMBER}" > docs/index.html - - name: Publish Demo preview + - name: Echo docs content + run: ls -lh docs + - name: Manage surge preview if: steps.surge-preview-tools.outputs.can-run-surge-command == 'true' id: doc_preview uses: afc163/surge-preview@v1 From e8e3e11912dd4d3528a820ea29b7f5b8045124f1 Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Fri, 18 Nov 2022 12:28:31 +0100 Subject: [PATCH 27/43] WF: permissions set on job not globally --- .github/workflows/pr-preview-documentation.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pr-preview-documentation.yml b/.github/workflows/pr-preview-documentation.yml index cf8e273..fd22a90 100644 --- a/.github/workflows/pr-preview-documentation.yml +++ b/.github/workflows/pr-preview-documentation.yml @@ -7,12 +7,11 @@ on: branches: - main -permissions: - pull-requests: write - jobs: pr_preview: # the id is used by surge to generate the surge url runs-on: ubuntu-20.04 + permissions: + pull-requests: write # surge-preview: PR comments steps: - uses: actions/checkout@v3 - uses: bonitasoft/actions/packages/surge-preview-tools@v2 @@ -36,7 +35,7 @@ jobs: PR_NUMBER: ${{ github.event.pull_request.number }} run: | mkdir docs - echo "This is a preview site for PR #${PR_NUMBER}" > docs/index.html + echo "This is a preview site for PR #${PR_NUMBER} on $(date)" > docs/index.html - name: Echo docs content run: ls -lh docs - name: Manage surge preview From b3fe6de25d4bda8325fc960248e20f75cf7443db Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Fri, 18 Nov 2022 12:33:45 +0100 Subject: [PATCH 28/43] remove the temp 'pr preview' wf --- .../workflows/pr-preview-documentation.yml | 51 ------------------- .github/workflows/publish-documentation.yml | 27 +++++----- 2 files changed, 14 insertions(+), 64 deletions(-) delete mode 100644 .github/workflows/pr-preview-documentation.yml diff --git a/.github/workflows/pr-preview-documentation.yml b/.github/workflows/pr-preview-documentation.yml deleted file mode 100644 index fd22a90..0000000 --- a/.github/workflows/pr-preview-documentation.yml +++ /dev/null @@ -1,51 +0,0 @@ -name: Publish Documentation Preview for Pull Request - -on: - pull_request: - # To manage 'surge-preview' action teardown, add default event types + closed event type - types: [opened, synchronize, reopened, closed] - branches: - - main - -jobs: - pr_preview: # the id is used by surge to generate the surge url - runs-on: ubuntu-20.04 - permissions: - pull-requests: write # surge-preview: PR comments - steps: - - uses: actions/checkout@v3 - - uses: bonitasoft/actions/packages/surge-preview-tools@v2 - id: surge-preview-tools - with: - surge-token: ${{ secrets.SURGE_TOKEN }} - - name: Echo surge preview tools output - run: | - echo "can-run-surge-command: ${{ steps.surge-preview-tools.outputs.can-run-surge-command }}" - echo "domain-exist: ${{ steps.surge-preview-tools.outputs.domain-exist }}" - echo "preview-url: ${{ steps.surge-preview-tools.outputs.preview-url }}" - echo "surge-token-valid: ${{ steps.surge-preview-tools.outputs.surge-token-valid }}" - - name: echo node environment - run: | - node --version - npm --version - npx --version - - name: Build fake demo - if: ${{ github.event.action != 'closed' }} - env: - PR_NUMBER: ${{ github.event.pull_request.number }} - run: | - mkdir docs - echo "This is a preview site for PR #${PR_NUMBER} on $(date)" > docs/index.html - - name: Echo docs content - run: ls -lh docs - - name: Manage surge preview - if: steps.surge-preview-tools.outputs.can-run-surge-command == 'true' - id: doc_preview - uses: afc163/surge-preview@v1 - with: - surge_token: ${{ secrets.SURGE_TOKEN }} - github_token: ${{ secrets.GITHUB_TOKEN }} - dist: docs - failOnError: true - teardown: true - build: ls -lh docs diff --git a/.github/workflows/publish-documentation.yml b/.github/workflows/publish-documentation.yml index 1a171a9..517b1d9 100644 --- a/.github/workflows/publish-documentation.yml +++ b/.github/workflows/publish-documentation.yml @@ -16,9 +16,9 @@ on: - 'CONTRIBUTING.md' - 'DESCRIPTION' - 'README.md' # TODO use the right file, the repo from the repo cannot be included (wrong format, too much info) + jobs: - # TODO temp to debug surge deploy error - pr_preview: + pr_preview: # the id is used by surge to generate the surge url # TODO test Ubuntu 22 runs-on: ubuntu-20.04 permissions: @@ -46,19 +46,20 @@ jobs: PR_NUMBER: ${{ github.event.pull_request.number }} run: | mkdir docs - echo "This is a preview site for PR #${PR_NUMBER}" > docs/index.html + echo "This is a preview site for PR #${PR_NUMBER} on $(date)" > docs/index.html - name: Echo docs content run: ls -lh docs -# - name: Manage surge preview -# if: steps.surge-preview-tools.outputs.can-run-surge-command == 'true' -# uses: afc163/surge-preview@v1 -# with: -# surge_token: ${{ secrets.GITHUB_TOKEN }} -# github_token: ${{ secrets.SURGE_TOKEN }} -# dist: ./docs -# failOnError: true -# teardown: 'true' -# build: ls -lh docs + - name: Manage surge preview + if: steps.surge-preview-tools.outputs.can-run-surge-command == 'true' + id: doc_preview + uses: afc163/surge-preview@v1 + with: + surge_token: ${{ secrets.SURGE_TOKEN }} + github_token: ${{ secrets.GITHUB_TOKEN }} + dist: docs + failOnError: true + teardown: true + build: ls -lh docs From 70f7cc7952e49eeef37ec3b1c0dfab68fea2f51c Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Fri, 18 Nov 2022 14:02:49 +0100 Subject: [PATCH 29/43] wf: build the doc site --- .github/workflows/publish-documentation.yml | 67 +++++++++++++++------ 1 file changed, 47 insertions(+), 20 deletions(-) diff --git a/.github/workflows/publish-documentation.yml b/.github/workflows/publish-documentation.yml index 517b1d9..c497330 100644 --- a/.github/workflows/publish-documentation.yml +++ b/.github/workflows/publish-documentation.yml @@ -18,6 +18,8 @@ on: - 'README.md' # TODO use the right file, the repo from the repo cannot be included (wrong format, too much info) jobs: + # for Pull Request + # TODO manage close pr for surge teardown if: github.event.action != 'closed' pr_preview: # the id is used by surge to generate the surge url # TODO test Ubuntu 22 runs-on: ubuntu-20.04 @@ -25,30 +27,55 @@ jobs: pull-requests: write # surge-preview: PR comments steps: - uses: actions/checkout@v3 +# TODO the following is duplicated with the R-CMD-check.yaml workflow + - uses: r-lib/actions/setup-r@v2 + # default r version: release + # with: + # use-public-rspm: true + # r-version: ${{ matrix.config.r }} + - uses: r-lib/actions/setup-r-dependencies@v2 + with: + extra-packages: any::pkgdown, local::. + needs: website + - uses: r-lib/actions/setup-tinytex@v2 + - uses: r-lib/actions/setup-pandoc@v2 +# end of duplication + - name: Install package + run: R CMD INSTALL . + - name: Build website + shell: Rscript {0} + run: | + pkgdown::build_site() +# TODO only if we cannot publish to surge or always? + - name: Upload + uses: actions/upload-artifact@v3 + with: + name: documentation-${{github.sha}} + path: docs - uses: bonitasoft/actions/packages/surge-preview-tools@v2 id: surge-preview-tools with: surge-token: ${{ secrets.SURGE_TOKEN }} - - name: Echo surge preview tools output - run: | - echo "can-run-surge-command: ${{ steps.surge-preview-tools.outputs.can-run-surge-command }}" - echo "domain-exist: ${{ steps.surge-preview-tools.outputs.domain-exist }}" - echo "preview-url: ${{ steps.surge-preview-tools.outputs.preview-url }}" - echo "surge-token-valid: ${{ steps.surge-preview-tools.outputs.surge-token-valid }}" - - name: echo node environment - run: | - node --version - npm --version - npx --version - - name: Build fake demo - if: ${{ github.event.action != 'closed' }} - env: - PR_NUMBER: ${{ github.event.pull_request.number }} - run: | - mkdir docs - echo "This is a preview site for PR #${PR_NUMBER} on $(date)" > docs/index.html - - name: Echo docs content - run: ls -lh docs +# - name: Echo surge preview tools output +# run: | +# echo "can-run-surge-command: ${{ steps.surge-preview-tools.outputs.can-run-surge-command }}" +# echo "domain-exist: ${{ steps.surge-preview-tools.outputs.domain-exist }}" +# echo "preview-url: ${{ steps.surge-preview-tools.outputs.preview-url }}" +# echo "surge-token-valid: ${{ steps.surge-preview-tools.outputs.surge-token-valid }}" +# - name: echo node environment +# run: | +# node --version +# npm --version +# npx --version +# - name: Build fake demo +# if: ${{ github.event.action != 'closed' }} +# env: +# PR_NUMBER: ${{ github.event.pull_request.number }} +# run: | +# mkdir docs +# echo "This is a preview site for PR #${PR_NUMBER} on $(date)" > docs/index.html +# - name: Echo docs content +# run: ls -lh docs - name: Manage surge preview if: steps.surge-preview-tools.outputs.can-run-surge-command == 'true' id: doc_preview From bb747867f92b6444c15abb665e167ef053cc351e Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Fri, 18 Nov 2022 14:17:44 +0100 Subject: [PATCH 30/43] wf: manage teardown + run on ubuntu 22 + remove commented configuration --- .github/workflows/publish-documentation.yml | 138 +++----------------- 1 file changed, 17 insertions(+), 121 deletions(-) diff --git a/.github/workflows/publish-documentation.yml b/.github/workflows/publish-documentation.yml index c497330..5d0a468 100644 --- a/.github/workflows/publish-documentation.yml +++ b/.github/workflows/publish-documentation.yml @@ -19,35 +19,41 @@ on: jobs: # for Pull Request - # TODO manage close pr for surge teardown if: github.event.action != 'closed' pr_preview: # the id is used by surge to generate the surge url - # TODO test Ubuntu 22 - runs-on: ubuntu-20.04 + if: github.event_name == 'pull_request' + runs-on: ubuntu-22.04 permissions: pull-requests: write # surge-preview: PR comments steps: - uses: actions/checkout@v3 -# TODO the following is duplicated with the R-CMD-check.yaml workflow + if: github.event.action != 'closed' +# TODO the following is duplicated with the R-CMD-check.yaml workflow. Only the setup-r (r-version) setup-r-dependencies inputs change - uses: r-lib/actions/setup-r@v2 - # default r version: release - # with: - # use-public-rspm: true - # r-version: ${{ matrix.config.r }} + if: github.event.action != 'closed' + with: + use-public-rspm: true + r-version: release - uses: r-lib/actions/setup-r-dependencies@v2 + if: github.event.action != 'closed' with: extra-packages: any::pkgdown, local::. needs: website - uses: r-lib/actions/setup-tinytex@v2 + if: github.event.action != 'closed' - uses: r-lib/actions/setup-pandoc@v2 + if: github.event.action != 'closed' # end of duplication - name: Install package + if: github.event.action != 'closed' run: R CMD INSTALL . - - name: Build website + - name: Build documentation website + if: github.event.action != 'closed' shell: Rscript {0} run: | pkgdown::build_site() -# TODO only if we cannot publish to surge or always? - - name: Upload + # Always upload the website for local browsing and when it cannot be deployed to surge + - name: Upload documentation + if: github.event.action != 'closed' uses: actions/upload-artifact@v3 with: name: documentation-${{github.sha}} @@ -56,26 +62,6 @@ jobs: id: surge-preview-tools with: surge-token: ${{ secrets.SURGE_TOKEN }} -# - name: Echo surge preview tools output -# run: | -# echo "can-run-surge-command: ${{ steps.surge-preview-tools.outputs.can-run-surge-command }}" -# echo "domain-exist: ${{ steps.surge-preview-tools.outputs.domain-exist }}" -# echo "preview-url: ${{ steps.surge-preview-tools.outputs.preview-url }}" -# echo "surge-token-valid: ${{ steps.surge-preview-tools.outputs.surge-token-valid }}" -# - name: echo node environment -# run: | -# node --version -# npm --version -# npx --version -# - name: Build fake demo -# if: ${{ github.event.action != 'closed' }} -# env: -# PR_NUMBER: ${{ github.event.pull_request.number }} -# run: | -# mkdir docs -# echo "This is a preview site for PR #${PR_NUMBER} on $(date)" > docs/index.html -# - name: Echo docs content -# run: ls -lh docs - name: Manage surge preview if: steps.surge-preview-tools.outputs.can-run-surge-command == 'true' id: doc_preview @@ -87,93 +73,3 @@ jobs: failOnError: true teardown: true build: ls -lh docs - - - - # for Pull Request -# TODO manage close pr for surge teardown if: github.event.action != 'closed' -# pr_preview: -# # TODO test Ubuntu 22 -# runs-on: ubuntu-20.04 -# permissions: -# pull-requests: write # surge-preview: PR comments -# steps: -# - uses: actions/checkout@v3 -## TODO the following is duplicated with the R-CMD-check.yaml workflow -# - uses: r-lib/actions/setup-r@v2 -# # default r version: release -# # with: -# # use-public-rspm: true -# # r-version: ${{ matrix.config.r }} -# - uses: r-lib/actions/setup-r-dependencies@v2 -# with: -# extra-packages: any::pkgdown, local::. -# needs: website -# - uses: r-lib/actions/setup-tinytex@v2 -# - uses: r-lib/actions/setup-pandoc@v2 -## end of duplication -# - name: Install package -# run: R CMD INSTALL . -# - name: Build website -# shell: Rscript {0} -# run: | -# pkgdown::build_site() -## TODO only if we cannot publish to surge -# - name: Upload -# uses: actions/upload-artifact@v3 -# with: -# name: documentation-${{github.sha}} -# path: docs -# - uses: bonitasoft/actions/packages/surge-preview-tools@v2 -# id: surge-preview-tools -# with: -# surge-token: ${{ secrets.SURGE_TOKEN }} -# - name: echo node environment -# run: | -# node --version -# npm --version -# npx --version -# - name: Manage surge preview -# if: steps.surge-preview-tools.outputs.can-run-surge-command == 'true' -# uses: afc163/surge-preview@v1 -# with: -# surge_token: ${{ secrets.GITHUB_TOKEN }} -# github_token: ${{ secrets.SURGE_TOKEN }} -# dist: ./docs -# failOnError: true -# teardown: 'true' -# build: ls -lh docs - -# generate: -# if: github.event.action != 'closed' # on PR closed, only teardown the surge deployment -# -# publish_preview: -# # on PR close, the 'generate' dependent job is skipped. So, without adding extra 'if' conditions, the job would be skipped as well -# # see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-not-requiring-successful-dependent-jobs -# # TODO the following is NOT WORKING!! -## if: github.event_name == 'pull_request' && (needs.generate.result == 'success' || needs.generate.result == 'skipped') -# if: github.event_name == 'pull_request' && always() -# runs-on: ubuntu-20.04 -# needs: generate -# permissions: -# pull-requests: write # surge-preview: PR comments -# steps: -# - name: Download documentation -# if: github.event.action != 'closed' -# uses: actions/download-artifact@v3 -# with: -# name: documentation-${{github.sha}} -# - uses: bonitasoft/actions/packages/surge-preview-tools@v2 -# id: surge-preview-tools -# with: -# surge-token: ${{ secrets.SURGE_TOKEN }} -# - name: Manage surge preview -# if: steps.surge-preview-tools.outputs.can-run-surge-command == 'true' -# uses: afc163/surge-preview@v1 -# with: -# surge_token: ${{ secrets.GITHUB_TOKEN }} -# github_token: ${{ secrets.SURGE_TOKEN }} -# dist: ./docs -# failOnError: true -# teardown: 'true' -# build: echo 'already built!' From d5bd5d2089f512f45a2998df797cbafcb4b6dd08 Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Mon, 21 Nov 2022 17:03:13 +0100 Subject: [PATCH 31/43] wf: introduce a 'build-setup' action to remove duplication between workflows --- .github/actions/build-setup/action.yml | 30 +++++++++++++++++++++ .github/workflows/R-CMD-check.yaml | 18 ++++--------- .github/workflows/publish-documentation.yml | 19 ++++--------- 3 files changed, 40 insertions(+), 27 deletions(-) create mode 100644 .github/actions/build-setup/action.yml diff --git a/.github/actions/build-setup/action.yml b/.github/actions/build-setup/action.yml new file mode 100644 index 0000000..73b80fb --- /dev/null +++ b/.github/actions/build-setup/action.yml @@ -0,0 +1,30 @@ +name: 'Build Setup' +description: 'Setup R and install dependencies' +inputs: + dependencies-extra-packages: + description: '`extra-packages` input for the `setup-r-dependencies` action.' + required: true + dependencies-needs: + description: '`needs` input for the `setup-r-dependencies` action.' + required: true + r-version: + description: 'The R version to use.' + required: true +runs: + using: 'composite' + steps: +# build + - uses: r-lib/actions/setup-r@v2 + with: + r-version: ${{ inputs.r-version }} + use-public-rspm: true + - uses: r-lib/actions/setup-r-dependencies@v2 + with: + extra-packages: ${{ inputs.dependencies-extra-packages }} + needs: ${{ inputs.dependencies-needs }} + # to generate documentation + - uses: r-lib/actions/setup-pandoc@v2 + # Sets up LaTeX with tinytex, for PDF generation + - uses: r-lib/actions/setup-tinytex@v2 + + diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index 44385a2..b6b3eae 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -6,6 +6,7 @@ on: branches: - main paths: + - '.github/actions/build-setup/**/*' - '.github/workflows/R-CMD-check.yaml' - 'R/**/*' - 'inst/**/*' @@ -17,6 +18,7 @@ on: branches: - main paths: + - '.github/actions/build-setup/**/*' - '.github/workflows/R-CMD-check.yaml' - 'R/**/*' - 'inst/**/*' @@ -29,7 +31,6 @@ name: R-CMD-check jobs: R-CMD-check: - if: ${{ runner.os == 'unknown' }} # TMP disable the workflow run runs-on: ${{ matrix.config.os }} name: ${{ matrix.config.os }} (${{ matrix.config.r }}) @@ -48,14 +49,11 @@ jobs: steps: - uses: actions/checkout@v3 - - uses: r-lib/actions/setup-r@v2 + - uses: ./.github/actions/build-setup with: + dependencies-extra-packages: any::rcmdcheck + dependencies-needs: check r-version: ${{ matrix.config.r }} - - uses: r-lib/actions/setup-r-dependencies@v2 - with: - extra-packages: any::rcmdcheck - needs: check - - uses: r-lib/actions/setup-pandoc@v2 - uses: r-lib/actions/check-r-package@v2 @@ -73,12 +71,6 @@ jobs: with: name: ${{ matrix.config.os }}-r${{ matrix.config.r }}-source-package path: bpmnVisualization_*.tar.gz - - - # Sets up LaTeX with tinytex, for PDF generation - # not needed before as the checks on the repo sources are done with --no-manual - - uses: r-lib/actions/setup-tinytex@v2 - - name: Check the source package id: source_package_checks run: R CMD check --as-cran bpmnVisualization_*.tar.gz diff --git a/.github/workflows/publish-documentation.yml b/.github/workflows/publish-documentation.yml index 5d0a468..96938cf 100644 --- a/.github/workflows/publish-documentation.yml +++ b/.github/workflows/publish-documentation.yml @@ -7,7 +7,7 @@ on: branches: - main paths: - # - '.github/actions/build-setup/**/*' + - '.github/actions/build-setup/**/*' - '.github/workflows/publish-documentation.yml' - 'inst/**' - 'man/**' @@ -27,22 +27,13 @@ jobs: steps: - uses: actions/checkout@v3 if: github.event.action != 'closed' -# TODO the following is duplicated with the R-CMD-check.yaml workflow. Only the setup-r (r-version) setup-r-dependencies inputs change - - uses: r-lib/actions/setup-r@v2 + - uses: ./.github/actions/build-setup if: github.event.action != 'closed' with: - use-public-rspm: true + dependencies-extra-packages: any::pkgdown, local::. + dependencies-needs: website r-version: release - - uses: r-lib/actions/setup-r-dependencies@v2 - if: github.event.action != 'closed' - with: - extra-packages: any::pkgdown, local::. - needs: website - - uses: r-lib/actions/setup-tinytex@v2 - if: github.event.action != 'closed' - - uses: r-lib/actions/setup-pandoc@v2 - if: github.event.action != 'closed' -# end of duplication + # TODO find how to install package in the R script to have a single R step - name: Install package if: github.event.action != 'closed' run: R CMD INSTALL . From 955a4bf2b881977d512b0a5795bf828bc1769dc2 Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Mon, 21 Nov 2022 17:10:53 +0100 Subject: [PATCH 32/43] EXTRA wip news menu entry --- _pkgdown.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/_pkgdown.yml b/_pkgdown.yml index ec0a740..263492f 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -1,2 +1,13 @@ template: bootstrap: 5 + +# TODO create the News menu entry, but also a reference to the news/index.html page that is not generated (because we don't have a NEWS.md file) +news: + releases: + # 0.2.1 + # 0.2.0 + # 0.1.2 + - text: "Version 0.1.1" + href: https://github.com/process-analytics/bpmn-visualization-R/releases/tag/v0.1.1 + - text: "Version 0.1.0" + href: https://github.com/process-analytics/bpmn-visualization-R/releases/tag/v0.1.0 From eff0fe9fc8fa1c68ed533ec48dafe474bf88c9dc Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Mon, 21 Nov 2022 17:18:19 +0100 Subject: [PATCH 33/43] Attempt doc wf: do not run R CMD install, to see if it is required --- .github/workflows/publish-documentation.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish-documentation.yml b/.github/workflows/publish-documentation.yml index 96938cf..c79f014 100644 --- a/.github/workflows/publish-documentation.yml +++ b/.github/workflows/publish-documentation.yml @@ -34,9 +34,9 @@ jobs: dependencies-needs: website r-version: release # TODO find how to install package in the R script to have a single R step - - name: Install package - if: github.event.action != 'closed' - run: R CMD INSTALL . +# - name: Install package +# if: github.event.action != 'closed' +# run: R CMD INSTALL . - name: Build documentation website if: github.event.action != 'closed' shell: Rscript {0} From 0ece7c5f847432074cb6caddd169086ac2786f64 Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Mon, 21 Nov 2022 17:40:53 +0100 Subject: [PATCH 34/43] EXTRA: configure the site title --- _pkgdown.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/_pkgdown.yml b/_pkgdown.yml index 263492f..8fd8a05 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -1,6 +1,10 @@ template: bootstrap: 5 +home: + # shorten the title of the DESCRIPTION file + title: Visualize Process Execution Data on BPMN Diagrams + # TODO create the News menu entry, but also a reference to the news/index.html page that is not generated (because we don't have a NEWS.md file) news: releases: From d9e98342badd73e743a8287e8a68324fcc69d64c Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Mon, 21 Nov 2022 17:43:58 +0100 Subject: [PATCH 35/43] Revert "EXTRA examples: prefix the package name when calling functions" This reverts commit 361faa116f0c9aeaee6c02b6b00a0b78322720f8. --- R/bpmnVisualization.R | 32 ++++++++++++++++---------------- man/bpmnVisualization-package.Rd | 2 +- man/display.Rd | 6 +++--- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/R/bpmnVisualization.R b/R/bpmnVisualization.R index 4e51448..b90a96b 100644 --- a/R/bpmnVisualization.R +++ b/R/bpmnVisualization.R @@ -16,7 +16,7 @@ #' #' @name display #' @description Display BPMN diagram based on BPMN definition in XML format -#' +#' #' @param bpmnXML A file name or xml document or string in BPMN XML format #' @param overlays An element or a list of elements to be added to the diagram's existing elements. #' Use overlay function to create an overlay object with content and relative position. @@ -26,25 +26,25 @@ #' Use an explicit element ID for the widget (rather than an automatically #' generated one). Useful if you have other JavaScript that needs to explicitly #' discover and interact with a specific widget instance. -#' -#' @returns A \code{bpmn-visualization} Widget that will intelligently print itself into HTML in a variety of contexts +#' +#' @returns A \code{bpmn-visualization} Widget that will intelligently print itself into HTML in a variety of contexts #' including the R console, within R Markdown documents, and within Shiny output bindings. -#' -#' @examples +#' +#' @examples #' # Load the BPMN file #' bpmn_file <- system.file("examples/Order_Management.bpmn", package = "bpmnVisualization") -#' +#' #' # Display the BPMN diagram -#' bpmnVisualization::display(bpmn_file, width='auto', height='auto') -#' +#' display(bpmn_file, width='auto', height='auto') +#' #' # Display the BPMN diagram with overlays #' overlays <- list( #' create_overlay("start_event_1_1", "42"), #' create_overlay("sequence_flow_1_1", "42"), #' create_overlay("task_1_1", "9") #' ) -#' bpmnVisualization::display(bpmn_file, overlays, width='auto', height='auto') -#' +#' display(bpmn_file, overlays, width='auto', height='auto') +#' #' @seealso \code{\link{create_overlay}} to create an overlay #' #' @import htmlwidgets @@ -76,14 +76,14 @@ display <- function( #' @title Shiny output binding for the \code{bpmn-visualization} HTML widget #' #' @name bpmnVisualization-shiny-output -#' @description +#' @description #' Helper to create output function for using the \code{bpmn-visualization} HTML widget within Shiny applications and interactive Rmd documents. -#' +#' #' @param outputId output variable to read from #' @param width,height Must be a valid CSS unit (like \code{'100\%'}, #' \code{'400px'}, \code{'auto'}) or a number, which will be coerced to a #' string and have \code{'px'} appended. -#' +#' #' @returns An output function that enables the use of the \code{bpmn-visualization} widget within Shiny applications. #' #' @export @@ -102,11 +102,11 @@ bpmnVisualizationOutput <- function( } #' @title Shiny render binding for the \code{bpmn-visualization} HTML widget -#' +#' #' @rdname bpmnVisualization-shiny-render -#' @description +#' @description #' Helper to create render function for using the \code{bpmn-visualization} HTML widget within Shiny applications and interactive Rmd documents. -#' +#' #' @param expr An expression that generates a \code{bpmn-visualization} HTML widget #' @param env The environment in which to evaluate \code{expr}. #' @param quoted Is \code{expr} a quoted expression (with \code{quote()})? This diff --git a/man/bpmnVisualization-package.Rd b/man/bpmnVisualization-package.Rd index 46219f4..5e434ae 100644 --- a/man/bpmnVisualization-package.Rd +++ b/man/bpmnVisualization-package.Rd @@ -26,7 +26,7 @@ Maintainer: \packageMaintainer{bpmnVisualization} bpmn_file <- system.file("examples/Order_Management.bpmn", package = "bpmnVisualization") # Display the BPMN diagram -bpmnVisualization::display(bpmn_file, width='auto', height='auto') +display(bpmn_file, width='auto', height='auto') } } diff --git a/man/display.Rd b/man/display.Rd index e8908d5..88c4d1e 100644 --- a/man/display.Rd +++ b/man/display.Rd @@ -28,7 +28,7 @@ generated one). Useful if you have other JavaScript that needs to explicitly discover and interact with a specific widget instance.} } \value{ -A \code{bpmn-visualization} Widget that will intelligently print itself into HTML in a variety of contexts +A \code{bpmn-visualization} Widget that will intelligently print itself into HTML in a variety of contexts including the R console, within R Markdown documents, and within Shiny output bindings. } \description{ @@ -39,7 +39,7 @@ Display BPMN diagram based on BPMN definition in XML format bpmn_file <- system.file("examples/Order_Management.bpmn", package = "bpmnVisualization") # Display the BPMN diagram -bpmnVisualization::display(bpmn_file, width='auto', height='auto') +display(bpmn_file, width='auto', height='auto') # Display the BPMN diagram with overlays overlays <- list( @@ -47,7 +47,7 @@ overlays <- list( create_overlay("sequence_flow_1_1", "42"), create_overlay("task_1_1", "9") ) -bpmnVisualization::display(bpmn_file, overlays, width='auto', height='auto') +display(bpmn_file, overlays, width='auto', height='auto') } \seealso{ From d0e9a997f8bbd1433346d927f69e0cb5d5b1576e Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Mon, 21 Nov 2022 17:43:58 +0100 Subject: [PATCH 36/43] Revert "EXTRA js file: update the license header (use block comment instead of documentation comment)" This reverts commit 9043dcea7ef28c74e9b2b55544ee5daf96d9a530. --- inst/htmlwidgets/bpmnVisualization.js | 30 +++++++++++++-------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/inst/htmlwidgets/bpmnVisualization.js b/inst/htmlwidgets/bpmnVisualization.js index 7980ffd..c35c861 100644 --- a/inst/htmlwidgets/bpmnVisualization.js +++ b/inst/htmlwidgets/bpmnVisualization.js @@ -1,18 +1,18 @@ -/* -Copyright 2021 Bonitasoft S.A. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ +/** + * Copyright 2021 Bonitasoft S.A. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ HTMLWidgets.widget({ name: "bpmnVisualization", From 63df75ba21f48db95583409d3a9b0bc17c40bc05 Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Mon, 21 Nov 2022 17:50:12 +0100 Subject: [PATCH 37/43] Revert "doc: improve wording and fix typo" This reverts commit 22cfb38b63452a411d9fcd56bd1c7f0b6cf3773e. --- CONTRIBUTING.md | 4 ++-- README.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f8f420c..f1d99bd 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -127,9 +127,9 @@ pkgdown::build_site(devel = TRUE, lazy = TRUE, preview = FALSE) ``` For more details about the available options, see https://pkgdown.r-lib.org/reference/build_site.html -### bpmn-visualization TypeScript library update +### bpmn-visualization-js update -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. +The [bpmn-visualization-js](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) worklow when a new version of this library is released. This generates a new Pull Request and notifies the reviewers. diff --git a/README.md b/README.md index 8a9c08a..231034a 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ This project is an R package for visualizing process execution data on BPMN diagrams, using overlays, style customization and interactions. -It is made possible by [htmlwidgets](http://www.htmlwidgets.org/), which provides an easy-to-use framework for bringing together R and the [bpmn-visualization](https://github.com/process-analytics/bpmn-visualization-js) TypeScript library. +It is made possible by [htmlwidgets](http://www.htmlwidgets.org/), which provides an easy-to-use framework for bringing together R and the [BPMN Visualization](https://github.com/process-analytics/bpmn-visualization-js) TypeScript library. ## ♻️ Usage ### Installation From f6a6e8c0fd2cc84c2980fd55e68a672118114927 Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Mon, 21 Nov 2022 17:50:27 +0100 Subject: [PATCH 38/43] Revert "doc: use 'main' branch instead of 'master'" This reverts commit 8c07dfc1f5553358f6c9c35d1c892393b97c497f. --- CONTRIBUTING.md | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f1d99bd..4e2331a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -8,8 +8,8 @@ All members of our community are expected to follow our [Code of Conduct](https: There are many ways to contribute: -- help people with the questions they ask on the [GitHub Issues](https://github.com/process-analytics/bpmn-visualization-R/issues) -- submitting bug reports and feature requests in the [GitHub Issues](https://github.com/process-analytics/bpmn-visualization-R/issues/new) +- help people with the questions they ask on the [Github Issues](https://github.com/process-analytics/bpmn-visualization-R/issues) +- submitting bug reports and feature requests in the [Github Issues](https://github.com/process-analytics/bpmn-visualization-R/issues/new) - improving the README & documentation - writing code which can be incorporated into `bpmn-visualization-R` itself @@ -23,12 +23,12 @@ For all contributions, please respect the following guidelines: 3. Do not commit changes to files that are irrelevant to your feature or bugfix (eg: `.gitignore`). -4. Open a [GitHub Pull Request](CONTRIBUTING.md#open-a-pull-request) with your patches. (**1** pull request = **1** feature or bug) +7. Open a [GitHub Pull Request](CONTRIBUTING.md#open-a-pull-request) with your patches. (**1** pull request = **1** feature or bug) We will review your contribution and respond as quickly as possible. Keep in mind that this is an open source project, and it may take us some time to get back to you. Your patience is very much appreciated. -5. If this is your 1st Pull Request, sign the [Contributor License Agreement](CONTRIBUTING.md#sign-the-contributor-license-agreement) +8. If this is your 1st Pull Request, sign the [Contributor License Agreement](CONTRIBUTING.md#sign-the-contributor-license-agreement) -6. Be willing to accept criticism and work on improving your code. +9. Be willing to accept criticism and work on improving your code. **Working on your first Pull Request?** You can learn how from this *free* series [How to Contribute to an Open Source Project on GitHub](https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github) @@ -45,26 +45,26 @@ git checkout -b 25-customize_overlays ### Commit in the Pull Request There is no convention for the commit message in the Pull Request. The most important part is the title of the Pull Request, because: -- Everyone must use Pull Request, no direct commit allowed on main branch +- Everyone must use Pull Request, no direct commit allowed on master branch - The commits of a Pull Request are almost always squashed - The title of the Pull Request is used as proposal for the maintainer merging the Pull Request ### Open a Pull Request -At this point, you should switch back to your main branch and make sure it's up-to-date with `bpmn-visualization-R` -`main` branch: +At this point, you should switch back to your master branch and make sure it's up to date with `bpmn-visualization-R` +`master` branch: ```sh git remote add upstream git@github.com:process-analytics/bpmn-visualization-R.git -git checkout main -git pull upstream main +git checkout master +git pull upstream master ``` -Then update your feature branch from your local copy of main, and push it! +Then update your feature branch from your local copy of master, and push it! ```sh git checkout 25-customize_overlays -git rebase main +git rebase master git push --set-upstream origin 25-customize_overlays ``` @@ -94,7 +94,7 @@ Here's the suggested workflow: ```sh git checkout 25-customize_overlays -git pull --rebase upstream main +git pull --rebase upstream master git push --force-with-lease 25-customize_overlays ``` From f936c8f55bd1dd8bdd1f70e2b435812914eaf63f Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Mon, 21 Nov 2022 18:04:37 +0100 Subject: [PATCH 39/43] revert pkgdown.yml customization --- _pkgdown.yml | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 _pkgdown.yml diff --git a/_pkgdown.yml b/_pkgdown.yml deleted file mode 100644 index 8fd8a05..0000000 --- a/_pkgdown.yml +++ /dev/null @@ -1,17 +0,0 @@ -template: - bootstrap: 5 - -home: - # shorten the title of the DESCRIPTION file - title: Visualize Process Execution Data on BPMN Diagrams - -# TODO create the News menu entry, but also a reference to the news/index.html page that is not generated (because we don't have a NEWS.md file) -news: - releases: - # 0.2.1 - # 0.2.0 - # 0.1.2 - - text: "Version 0.1.1" - href: https://github.com/process-analytics/bpmn-visualization-R/releases/tag/v0.1.1 - - text: "Version 0.1.0" - href: https://github.com/process-analytics/bpmn-visualization-R/releases/tag/v0.1.0 From 2b148fa7e3048335aa58c8d47205d7a8edd92f36 Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Tue, 22 Nov 2022 10:14:47 +0100 Subject: [PATCH 40/43] wf: remove commented configuration --- .github/workflows/publish-documentation.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/publish-documentation.yml b/.github/workflows/publish-documentation.yml index c79f014..ed2fdea 100644 --- a/.github/workflows/publish-documentation.yml +++ b/.github/workflows/publish-documentation.yml @@ -33,10 +33,6 @@ jobs: dependencies-extra-packages: any::pkgdown, local::. dependencies-needs: website r-version: release - # TODO find how to install package in the R script to have a single R step -# - name: Install package -# if: github.event.action != 'closed' -# run: R CMD INSTALL . - name: Build documentation website if: github.event.action != 'closed' shell: Rscript {0} From 62ef031fa3d2d51f29b617553009ff35d9761fae Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Tue, 22 Nov 2022 14:26:22 +0100 Subject: [PATCH 41/43] improve doc paragraph in the contributing guide MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Souchet Céline <4921914+csouchet@users.noreply.github.com> --- CONTRIBUTING.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f8f420c..45b0356 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -121,11 +121,11 @@ Generate the HTML documentation with [pkgdown](https://pkgdown.r-lib.org) - `systemfonts`: run `sudo apt -y install libfontconfig1-dev` (see [systemfonts#35](https://github.com/r-lib/systemfonts/issues/35#issuecomment-633560151) ) - `textshapping`: `run sudo apt -y install libharfbuzz-dev libfribidi-dev` -To quickly iterate when changing the site configuration or content, run +Once `pkgdown` is installed, you can generate the HTML documentation quickly with this command: ``` pkgdown::build_site(devel = TRUE, lazy = TRUE, preview = FALSE) ``` -For more details about the available options, see https://pkgdown.r-lib.org/reference/build_site.html +For more details about the available options, see [the official documentation](https://pkgdown.r-lib.org/reference/build_site.html). ### bpmn-visualization TypeScript library update From 0a30bcae737b25d85e8597450b589c6d0019d665 Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Tue, 22 Nov 2022 14:27:15 +0100 Subject: [PATCH 42/43] wf: remove extra comment --- .github/actions/build-setup/action.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/actions/build-setup/action.yml b/.github/actions/build-setup/action.yml index 73b80fb..3d972e7 100644 --- a/.github/actions/build-setup/action.yml +++ b/.github/actions/build-setup/action.yml @@ -13,7 +13,6 @@ inputs: runs: using: 'composite' steps: -# build - uses: r-lib/actions/setup-r@v2 with: r-version: ${{ inputs.r-version }} From 66b312f383f5b6cab681abd8fb270892e1f2fecc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Souchet=20C=C3=A9line?= <4921914+csouchet@users.noreply.github.com> Date: Tue, 22 Nov 2022 14:37:20 +0100 Subject: [PATCH 43/43] Update CONTRIBUTING.md Co-authored-by: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> --- CONTRIBUTING.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 45b0356..51a407f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -115,7 +115,9 @@ devtools::document() ### Generate the HTML documentation (site) -Generate the HTML documentation with [pkgdown](https://pkgdown.r-lib.org) +The HTML documentation is generated with [pkgdown](https://pkgdown.r-lib.org). + +If you need to test locally changes in the configuration or content of this documentation, install `pkgdown` following the [official documentation](https://pkgdown.r-lib.org/#installation). **Note**: on Ubuntu, you may encounter errors during the installation of `pkgdown`. In particular, the installation of some dependent packages may fail: - `systemfonts`: run `sudo apt -y install libfontconfig1-dev` (see [systemfonts#35](https://github.com/r-lib/systemfonts/issues/35#issuecomment-633560151) )