Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/actions/smoke-test/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ runs:
steps:
- name: Checkout main
id: checkout_release
uses: actions/checkout@v3
uses: actions/checkout@v7

- name: Build template
id: build_template
Expand Down
25 changes: 3 additions & 22 deletions src/r-ver/NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,12 @@ The images used in this template support installation of system dependencies
via the [`pak::pak()`](https://pak.r-lib.org/reference/pak.html) function,
so the R packages can be installed with `devcontainer.json` like below.

```json
```jsonc
{
"image": "ghcr.io/rocker-org/devcontainer/r-ver:4",
"features": {
"ghcr.io/rocker-org/devcontainer-features/r-packages:1": {
"packages": "cli,rlang",
"installSystemRequirements": true
"ghcr.io/rocker-org/devcontainer-features/r-packages:2": {
"packages": "cli,rlang"
}
}
}
Expand Down Expand Up @@ -65,24 +64,6 @@ can be used to install and configure RStudio Server.
}
```

## Use [Jupyter](https://jupyter.org/)

[The `ghcr.io/rocker-org/devcontainer-features/r-rig` Feature](https://github.com/rocker-org/devcontainer-features/tree/main/src/r-rig)
can be used to install `jupyterlab` and `IRkernel`.
(Remember to set `"version": "none"` for not to install another R)

```json
{
"image": "ghcr.io/rocker-org/devcontainer/r-ver:4",
"features": {
"ghcr.io/rocker-org/devcontainer-features/r-rig:1": {
"version": "none",
"installJupyterlab": true
}
}
}
```

## Make R console history persistent

Normally the R console history is lost when we recreate the container,
Expand Down
5 changes: 2 additions & 3 deletions src/r-ver/devcontainer-template.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "r-ver",
"version": "1.1.2",
"version": "1.1.3",
"name": "R (rocker/r-ver base)",
"description": "A container-based development environment for the R language. Includes many commonly used R packages.",
"documentationURL": "https://github.com/rocker-org/devcontainer-templates/tree/main/src/r-ver",
Expand All @@ -12,8 +12,7 @@
"description": "R version:",
"proposals": [
"4",
"4.4",
"4.3"
"4.6"
],
"default": "4"
},
Expand Down
13 changes: 4 additions & 9 deletions src/r2u/.devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,12 @@
// Features to add to the dev container. More info: https://containers.dev/features.
"features": {
// A Feature to configure R on Ubuntu. More info: https://github.com/rocker-org/devcontainer-features/tree/main/src/r-apt.
"ghcr.io/rocker-org/devcontainer-features/r-apt:0": {
"ghcr.io/rocker-org/devcontainer-features/r-apt:1": {
"vscodeRSupport": "full",
"installDevTools": true,
"installRMarkdown": true,
"installRadian": true,
"installVscDebugger": true,
"installBspm": true,
"arfVersion": "latest"
}
},

Expand All @@ -28,13 +27,9 @@
"customizations": {
// Settings for VS Code.
"vscode": {
"extensions": [
"RDebugger.r-debugger"
],
"settings": {
"r.rterm.linux": "/usr/local/bin/radian",
"r.bracketedPaste": true,
"r.plot.useHttpgd": true
"r.consolePath": "arf",
"r.bracketedPaste": true
}
}
},
Expand Down
28 changes: 2 additions & 26 deletions src/r2u/NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,38 +16,16 @@ can be used to install and configure RStudio Server.

```jsonc
"features": {
"ghcr.io/rocker-org/devcontainer-features/r-apt:0": {
"ghcr.io/rocker-org/devcontainer-features/r-apt:1": {
"vscodeRSupport": "full",
"installDevTools": true,
"installRMarkdown": true,
"installRadian": true,
"installVscDebugger": true,
"installBspm": true,
},
"ghcr.io/rocker-org/devcontainer-features/rstudio-server:latest": {} // This line
}
```

## Use [Jupyter](https://jupyter.org/)

The `InstallJupyterlab` option of
[the `ghcr.io/rocker-org/devcontainer-features/r-apt` Feature](https://github.com/rocker-org/devcontainer-features/tree/main/src/r-apt)
can be used to install `jupyterlab` and `IRkernel`.

Only add `"installJupyterlab": true` to `devcontainer.json` like below.

```jsonc
"ghcr.io/rocker-org/devcontainer-features/r-apt:0": {
"vscodeRSupport": "full",
"installDevTools": true,
"installRMarkdown": true,
"installRadian": true,
"installVscDebugger": true,
"installBspm": true,
"installJupyterlab": true // This line
}
```

## Make R console history persistent

Normally the R console history is lost when we recreate the container,
Expand All @@ -56,12 +34,10 @@ but we can preserve the history with

```jsonc
"features": {
"ghcr.io/rocker-org/devcontainer-features/r-apt:0": {
"ghcr.io/rocker-org/devcontainer-features/r-apt:1": {
"vscodeRSupport": "full",
"installDevTools": true,
"installRMarkdown": true,
"installRadian": true,
"installVscDebugger": true,
"installBspm": true,
},
"ghcr.io/rocker-org/devcontainer-features/r-history:0": {} // This line
Expand Down
5 changes: 3 additions & 2 deletions src/r2u/devcontainer-template.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "r2u",
"version": "0.3.1",
"version": "1.0.0",
"name": "R (r2u and bspm configured)",
"description": "Install R on Ubuntu and set r2u and bspm.",
"documentationURL": "https://github.com/rocker-org/devcontainer-templates/tree/main/src/r2u",
Expand All @@ -11,10 +11,11 @@
"type": "string",
"description": "Ubuntu version:",
"proposals": [
"resolute",
"noble",
"jammy"
],
"default": "noble"
"default": "resolute"
}
},
"platforms": [
Expand Down
3 changes: 1 addition & 2 deletions test/r-ver/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@ cd "$(dirname "$0")" || exit
source test-utils.sh

check "R" R --version
check "radian" radian --version
check "arf" arf --version
check "languageserver" R -q -e 'packageVersion("languageserver")'
check "httpgd" R -q -e 'packageVersion("httpgd")'
check "rmarkdown" R -q -e 'packageVersion("rmarkdown")'
check "devtools" R -q -e 'packageVersion("devtools")'
check "pak" R -q -e 'packageVersion("pak")'
check "renv" R -q -e 'packageVersion("renv")'
check "vscDebugger" R -q -e 'packageVersion("vscDebugger")'

# Report result
reportResults
5 changes: 2 additions & 3 deletions test/r2u/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@ cd "$(dirname "$0")" || exit
source test-utils.sh

check "R" R --version
check "radian" radian --version
check "arf" arf --version
check "languageserver" R -q -e 'packageVersion("languageserver")'
check "httpgd" R -q -e 'packageVersion("httpgd")'
check "jgd" R -q -e 'packageVersion("jgd")'
check "rmarkdown" R -q -e 'packageVersion("rmarkdown")'
check "devtools" R -q -e 'packageVersion("devtools")'
check "pak" R -q -e 'packageVersion("pak")'
check "vscDebugger" R -q -e 'packageVersion("vscDebugger")'

# Report result
reportResults
Loading