Repository: koheiw/proxyC
Pull request #64: Update GitHub Actions
Author: login: rcannood
Created: 2025-04-21T06:13:17Z | Merged: 2025-04-21T08:50:30Z

* Add back pkgdown action
* Update R CMD check action

Fixes #62 

Linked issue #62: Render pkgdown in github action again
I noticed that pkgdown is no longer rendered by a github action (as in #56) but instead it needs to be manually rerendered and then be committed due to commit c17031c58bb549f46386f9b7530d02665b5c4090.

@koheiw think this could be changed back into a github action again, or was there a reason for this change?
Linked issue comments: user: login: koheiw
created_at: 2025-04-21T05:25:46Z
body: Shall me make a separate branch for the website? I forgot how we created the website...

![Image](https://github.com/user-attachments/assets/dbe367ac-6dcf-43f3-be16-1271e28701cb)

author_association: OWNER
user: login: rcannood
created_at: 2025-04-21T06:15:42Z
body: Indeed! Once #64 is merged, the settings should be updated to:

![Image](https://github.com/user-attachments/assets/92512dc1-4354-4473-9db7-8ec035bddccc)
author_association: COLLABORATOR
user: login: rcannood
created_at: 2025-04-21T09:05:59Z
body: @koheiw could you check whether these settings are set correctly? 🙇 
author_association: COLLABORATOR
user: login: koheiw
created_at: 2025-04-21T11:59:13Z
body: Change now!

![Image](https://github.com/user-attachments/assets/6fd721bc-523d-4cd5-9c45-9e263686f107)
author_association: OWNER
user: login: koheiw
created_at: 2025-04-21T12:01:25Z
body: v0.5 website is up!

https://koheiw.github.io/proxyC/
author_association: OWNER
user: login: rcannood
created_at: 2025-04-21T12:16:08Z
body: Awesome, thanks! :D
author_association: COLLABORATOR

Diff:
diff --git a/.github/dependabot.yaml b/.github/dependabot.yaml
new file mode 100644
index 0000000..1230149
--- /dev/null
+++ b/.github/dependabot.yaml
@@ -0,0 +1,6 @@
+version: 2
+updates:
+  - package-ecosystem: "github-actions"
+    directory: "/"
+    schedule:
+      interval: "daily"
diff --git a/.github/workflows/check-standard.yaml b/.github/workflows/check-standard.yaml
index a6b5f0d..3c05d29 100644
--- a/.github/workflows/check-standard.yaml
+++ b/.github/workflows/check-standard.yaml
@@ -4,9 +4,10 @@ on:
   push:
     branches: [main, master]
   pull_request:
-    branches: [main, master]
 
-name: R-CMD-check
+name: R-CMD-check.yaml
+
+permissions: read-all
 
 jobs:
   R-CMD-check:
@@ -29,6 +30,8 @@ jobs:
       R_KEEP_PKG_SOURCE: yes
 
     steps:
+      - uses: actions/checkout@v4
+
       - if: matrix.config.os == 'ubuntu-latest'
         run: |
             sudo apt update
@@ -38,8 +41,6 @@ jobs:
             brew update
             brew install tbb
 
-      - uses: actions/checkout@v3
-
       - uses: r-lib/actions/setup-pandoc@v2
 
       - uses: r-lib/actions/setup-r@v2
@@ -56,3 +57,4 @@ jobs:
       - uses: r-lib/actions/check-r-package@v2
         with:
           upload-snapshots: true
+          build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'
diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml
new file mode 100644
index 0000000..03cbba1
--- /dev/null
+++ b/.github/workflows/pkgdown.yaml
@@ -0,0 +1,54 @@
+# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
+# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
+on:
+  push:
+    branches: [main, master]
+  pull_request:
+  release:
+    types: [published]
+  workflow_dispatch:
+
+name: pkgdown.yaml
+
+permissions: read-all
+
+jobs:
+  pkgdown:
+    runs-on: ubuntu-latest
+    # Only restrict concurrency for non-PR jobs
+    concurrency:
+      group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
+    env:
+      GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
+    permissions:
+      contents: write
+    steps:
+      - uses: actions/checkout@v4
+
+      - name: Set up dependencies to improve parallellism
+        run: |
+          sudo apt update
+          sudo apt install libtbb-dev
+
+      - uses: r-lib/actions/setup-pandoc@v2
+
+      - uses: r-lib/actions/setup-r@v2
+        with:
+          use-public-rspm: true
+
+      - uses: r-lib/actions/setup-r-dependencies@v2
+        with:
+          extra-packages: any::pkgdown, local::.
+          needs: website
+
+      - name: Build site
+        run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
+        shell: Rscript {0}
+
+      - name: Deploy to GitHub pages 🚀
+        if: github.event_name != 'pull_request'
+        uses: JamesIves/github-pages-deploy-action@v4
+        with:
+          clean: false
+          branch: gh-pages
+          folder: docs
diff --git a/DESCRIPTION b/DESCRIPTION
index 1892e1c..a8758c7 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -13,7 +13,7 @@ Description:
     Functions are optimised for large sparse matrices using the Armadillo and Intel TBB libraries.
     Among various built-in similarity/distance measures, computation of correlation,
     cosine similarity and Euclidean distance is particularly fast.
-URL: https://github.com/koheiw/proxyC, https://koheiw.github.io/proxyC, https://koheiw.github.io/proxyC/
+URL: https://github.com/koheiw/proxyC, https://koheiw.github.io/proxyC/
 BugReports: https://github.com/koheiw/proxyC/issues
 License: GPL-3
 Depends:
@@ -36,4 +36,4 @@ Encoding: UTF-8
 RoxygenNote: 7.3.2
 Roxygen: list(markdown = TRUE)
 VignetteBuilder: knitr
-Config/Needs/website: coop, Rfast, dist, parallelDist, distances, proxy
+Config/Needs/website: coop, Rfast, parallelDist, distances, proxy, microbenchmark, ggplot2
diff --git a/vignettes/articles/masking.Rmd b/vignettes/articles/masking.Rmd
index 4b5ee04..98842e7 100644
--- a/vignettes/articles/masking.Rmd
+++ b/vignettes/articles/masking.Rmd
@@ -18,9 +18,9 @@ knitr::opts_chunk$set(
 
 ## Example
 
-```{r}
-require(proxyC)
-require(Matrix)
+```{r, message=FALSE, warning=FALSE}
+library(proxyC)
+library(Matrix)
 
 mt1 <- rsparsematrix(100, 6, 1.0)
 colnames(mt1) <- c("a", "a", "d", "d", "e", "e")
@@ -38,9 +38,9 @@ colnames(mt2) <- c("a", "b", "c", "d", "e")
 
 With large matrices, we can measures the impact of masked similarity computation.
 
-```{r}
-require(microbenchmark)
-require(ggplot2)
+```{r, message=FALSE, warning=FALSE}
+library(microbenchmark)
+library(ggplot2)
 
 mt1 <- rsparsematrix(1000L, 2600L, 0.1)
 colnames(mt1) <- rep(letters, each = 100L)
diff --git a/vignettes/articles/timings.Rmd b/vignettes/articles/timings.Rmd
index 83c3123..b8610df 100644
--- a/vignettes/articles/timings.Rmd
+++ b/vignettes/articles/timings.Rmd
@@ -19,10 +19,10 @@ sparsity level.
 
 ## Euclidean Distance
 
-```{r}
-require(Matrix)
-require(microbenchmark)
-require(ggplot2)
+```{r, message=FALSE, warning=FALSE}
+library(Matrix)
+library(microbenchmark)
+library(ggplot2)
 
 n_rows <- 1000L
 n_cols <- 1000L


Reviews:
user: login: koheiw
state: COMMENTED
author_association: OWNER
submitted_at: 2025-04-21T06:23:22Z
user: login: koheiw
body: If you fix the TBB installation, we can merge. 
state: CHANGES_REQUESTED
author_association: OWNER
submitted_at: 2025-04-21T06:25:17Z
user: login: rcannood
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-04-21T08:19:44Z
user: login: koheiw
body: Thanks!
state: APPROVED
author_association: OWNER
submitted_at: 2025-04-21T08:44:25Z

Review comments:
diff_hunk: @@ -29,16 +30,7 @@ jobs:
       R_KEEP_PKG_SOURCE: yes
 
     steps:
-      - if: matrix.config.os == 'ubuntu-latest'
path: .github/workflows/check-standard.yaml
user: login: koheiw
body: We need to install the TBB library
created_at: 2025-04-21T06:23:21Z
author_association: OWNER
diff_hunk: @@ -29,16 +30,7 @@ jobs:
       R_KEEP_PKG_SOURCE: yes
 
     steps:
-      - if: matrix.config.os == 'ubuntu-latest'
path: .github/workflows/check-standard.yaml
user: login: rcannood
body: Should be fixed now!
created_at: 2025-04-21T08:19:44Z
author_association: COLLABORATOR

PR comments:
user: login: rcannood
created_at: 2025-04-21T06:33:11Z
body: Don't merge yet -- the pkgdown github action is still failing!

Is the `libtbb-dev` still necessary? It seems like the R CMD check action is passing without it now.
author_association: COLLABORATOR
user: login: koheiw
created_at: 2025-04-21T06:36:59Z
body: The package works without `libtbb-dev` but uses only one thread.
author_association: OWNER
user: login: rcannood
created_at: 2025-04-21T06:39:50Z
body: > The package works without `libtbb-dev` but uses only one thread.

I see, my had! I'll add it back ^^
author_association: COLLABORATOR