Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 0.3 release #186

Merged
merged 99 commits into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
99 commits
Select commit Hold shift + click to select a range
82300f7
docs: added rsync connection limit troubleshoot page to docs
StarTrooper08 Jul 4, 2024
4f4ea35
Merge pull request #152 from r-devel/update/troubleshoot-docs
iaine Jul 5, 2024
b227388
update: gitpod yml config for r-dev-env setup
StarTrooper08 Jul 15, 2024
bea8ae2
update: dockerfile for gitpod env setup
StarTrooper08 Jul 15, 2024
091e5e0
update: refractor to localscript to work with both environments codes…
StarTrooper08 Jul 15, 2024
9adf493
update: refractor to which_r script to work with both environments co…
StarTrooper08 Jul 15, 2024
7cc3870
update: refractor to set_build_r script to work with both environment…
StarTrooper08 Jul 15, 2024
dea0fcf
update: refractor to set_build_r script to work with both environment…
StarTrooper08 Jul 15, 2024
c7187d4
update: added work_dir env to dockerfile to setup r-dev-env, which le…
StarTrooper08 Jul 15, 2024
82b0e71
workflow: github actions ci/cd to build docker image for gitpod works…
StarTrooper08 Jul 18, 2024
75438fd
Merge pull request #162 from r-devel/actions/gitpod-docker-image
hturner Jul 18, 2024
c369fa9
update: standardize environments var and env var removed from dockerfile
StarTrooper08 Jul 22, 2024
650ad83
update: export environment vars
StarTrooper08 Jul 22, 2024
e0ee191
update: export environment vars
StarTrooper08 Jul 22, 2024
1b0dbf3
update: gitpod yml config
StarTrooper08 Jul 22, 2024
cc5bcf3
update: environment var shifted to welcome msg script
StarTrooper08 Jul 22, 2024
9d52bdf
update: bash used instead of source in gitpod yml
StarTrooper08 Jul 22, 2024
8dab14d
update: final changes after successful testing for codespace setup
StarTrooper08 Jul 23, 2024
f06d14b
update: final changes after successful testing for codespace setup
StarTrooper08 Jul 23, 2024
05d4257
testing: gitpod setup
StarTrooper08 Jul 23, 2024
0aa6558
testing: gitpod setup
StarTrooper08 Jul 23, 2024
90cf39c
testing: gitpod setup
StarTrooper08 Jul 23, 2024
abb31c5
testing: gitpod setup
StarTrooper08 Jul 23, 2024
3e62f50
testing: gitpod setup
StarTrooper08 Jul 23, 2024
5e03666
testing: gitpod setup
StarTrooper08 Jul 23, 2024
f1a6541
testing: gitpod setup
StarTrooper08 Jul 23, 2024
a6d4dca
testing: gitpod setup
StarTrooper08 Jul 23, 2024
a61044e
testing: gitpod setup
StarTrooper08 Jul 23, 2024
dd42435
testing: gitpod setup correction
StarTrooper08 Jul 23, 2024
7f3df94
testing: gitpod setup
StarTrooper08 Jul 23, 2024
20df557
update: final changes after successful testing for gitpod setup
StarTrooper08 Jul 23, 2024
9126b4e
docs: valgrind usage and added valgrind instrumentation flag in build…
StarTrooper08 Jul 24, 2024
e9f7c07
tidy welcome_msg script
hturner Jul 26, 2024
f35f0ea
simplify localscript
hturner Jul 26, 2024
510cedf
No need to run set_build_r when first defined
hturner Jul 26, 2024
822cfc2
put env var exports back in welcome message
hturner Jul 26, 2024
f6d8922
remove old code designed for scripts not functions
hturner Jul 26, 2024
b366b8a
add newline at end of set_build_r script
hturner Jul 26, 2024
530afd9
Merge pull request #163 from r-devel/docs/valgrind
hturner Jul 26, 2024
f403681
update: copying vscode settings from devcontainer json to vscode sett…
StarTrooper08 Jul 28, 2024
28d50ee
update: copying vscode settings from devcontainer json to vscode sett…
StarTrooper08 Jul 28, 2024
bbc5a20
update: cleaned devcontainer json to let jq work properly
StarTrooper08 Jul 28, 2024
e6cc582
update: which_r script simplified
StarTrooper08 Jul 28, 2024
20d0800
update: which_r script simplified
StarTrooper08 Jul 28, 2024
606fe30
docs: restructured the docs
StarTrooper08 Jul 31, 2024
cfc0b33
docs: moved file to respective new sub directory
StarTrooper08 Jul 31, 2024
947085f
docs: added gitpod docs images
StarTrooper08 Jul 31, 2024
80c092c
docs: update to gitpod docs
StarTrooper08 Jul 31, 2024
3bdee59
Merge pull request #158 from r-devel/update/common-env-setup
hturner Aug 2, 2024
bdfc5d7
docs: mention for 15GB free storage for codespace
StarTrooper08 Aug 2, 2024
327dbe3
docs: managing and retaining codespaces
StarTrooper08 Aug 5, 2024
af7378d
docker: gitpod docker image build
StarTrooper08 Aug 6, 2024
e3de415
Merge pull request #168 from r-devel/docker/gitpod-image
hturner Aug 6, 2024
6efc7fe
docker: build gitpod docker image
StarTrooper08 Aug 8, 2024
a462d9e
Merge pull request #170 from r-devel/gitpod-build-image
StarTrooper08 Aug 8, 2024
ebe2a6c
docker: build gitpod docker image
StarTrooper08 Aug 8, 2024
ec5b996
Merge pull request #171 from r-devel/gitpod-build-image
StarTrooper08 Aug 8, 2024
edc1c9d
workflow: workflow and script to optimize docs images/assets #161 #167
StarTrooper08 Aug 9, 2024
d4baab1
docs: seperated gitpod docs(start, stop & restart), updated codespace…
StarTrooper08 Aug 9, 2024
5824cd0
docs: updated docs structure for gitpod and added gitpod workspace ma…
StarTrooper08 Aug 9, 2024
b0aa637
Merge pull request #172 from r-devel/optimize-docs
iaine Aug 13, 2024
21de0a8
updating localsetup
StarTrooper08 Aug 15, 2024
496f122
updating localsetup
StarTrooper08 Aug 15, 2024
631b342
rm: removed docker compose file
StarTrooper08 Aug 15, 2024
e7116f6
feat: update to localsetup for creating files inside devcontainer
StarTrooper08 Aug 15, 2024
9e4d807
update: readme index
StarTrooper08 Aug 16, 2024
79f2664
Merge pull request #174 from r-devel/local-setup
iaine Aug 16, 2024
b034456
update: readme index placeholder for gitpod liveshare alternative
StarTrooper08 Aug 16, 2024
876c88d
Merge pull request #175 from r-devel/index/readme
iaine Aug 16, 2024
9135f21
gitpod liveshare alternative empty file
StarTrooper08 Aug 16, 2024
b9de320
Merge pull request #165 from r-devel/docs/gitpod-update
iaine Aug 16, 2024
75232ef
fix: optimize docs images workflow fix
StarTrooper08 Aug 16, 2024
c2c21fb
fix: optimize docs images workflow fix
StarTrooper08 Aug 16, 2024
f6c0c2a
Merge pull request #177 from r-devel/fix/optimize
iaine Aug 16, 2024
31d9bf5
docs: gitpod live share
StarTrooper08 Aug 16, 2024
d149190
docs: gitpod live share
StarTrooper08 Aug 16, 2024
a1223c0
Merge branch 'devel' into docs/gitpod-update
iaine Aug 16, 2024
bedf755
Merge pull request #178 from r-devel/docs/gitpod-update
iaine Aug 16, 2024
a26dfd9
Update optimize-docs-images.yml
iaine Aug 23, 2024
83bc0b4
Merge pull request #179 from iaine/optimise-workflow-yml
iaine Aug 23, 2024
7cd3bf1
updated citation file
StarTrooper08 Aug 29, 2024
e3354ce
version file updated
StarTrooper08 Aug 29, 2024
d723b23
update: changed image tag from devel to main in devcontainer.json
StarTrooper08 Aug 29, 2024
52529ad
updated news.md file
StarTrooper08 Aug 29, 2024
6a750d1
improved the script to optimized docs image slightly and maintain the…
StarTrooper08 Aug 29, 2024
52193d0
Merge pull request #182 from r-devel/optimize/docs
iaine Aug 30, 2024
be7e396
Merge pull request #183 from r-devel/release/0.3v
iaine Aug 30, 2024
fcf2b53
Update INDEX.md
hturner Sep 4, 2024
e4227f0
improve indenting in Building R tutorial
hturner Sep 4, 2024
ed41ac4
fix links and indentation in docs
hturner Sep 4, 2024
5283e4a
use $WORK_DIR/.vscode/settings.json in codespace too
hturner Sep 4, 2024
5730bb0
install valgrind on top of gitpod/workspace-full
hturner Sep 4, 2024
0f277d7
Merge pull request #187 from r-devel/update/gitpod_Dockerfile
hturner Sep 4, 2024
86296e8
update "Stopping and Restarting" section names
hturner Sep 4, 2024
3e9b9d1
simplify Gitpod creation docs; make it point to main
hturner Sep 4, 2024
f3c47d4
Merge branch 'devel' of github.com:r-devel/r-dev-env into devel
hturner Sep 4, 2024
45c6d9e
fix indentation on troubleshooting page
hturner Sep 4, 2024
a64bf5a
update NEWS and citation
hturner Sep 4, 2024
7650b12
Merge branch 'main' into devel
hturner Sep 4, 2024
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
64 changes: 25 additions & 39 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,45 +1,31 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/cpp
{
"name": "R-Dev-Env",
"image": "ghcr.io/r-devel/r-dev-env:main",
"hostRequirements": {
"cpus": 4
},

"customizations": {
"vscode": {
"settings": {
"r.lsp.diagnostics": false,
"r.plot.useHttpgd": true,
"r.rpath.linux": "/usr/bin/R",
"r.rterm.linux": "/usr/bin/R",
"terminal.integrated.sendKeybindingsToShell": true,
"svn.multipleFolders.enabled": true,
"name": "R-Dev-Env",
"image": "ghcr.io/r-devel/r-dev-env:main",
"hostRequirements": {
"cpus": 4
},
"customizations": {
"vscode": {
"settings": {
"r.lsp.diagnostics": false,
"r.plot.useHttpgd": true,
"r.rpath.linux": "/usr/bin/R",
"r.rterm.linux": "/usr/bin/R",
"terminal.integrated.sendKeybindingsToShell": true,
"svn.multipleFolders.enabled": true,
"workbench.editorAssociations": {
"*.md": "vscode.markdown.preview.editor"
},
"workbench.welcomePage.walkthroughs.openOnInstall": false
},
"extensions": [
"REditorSupport.r",
"mads-hartmann.bash-ide-vscode",
"johnstoncode.svn-scm",
"ms-vscode.cpptools",
"MS-vsliveshare.vsliveshare"
]
}

},
"postCreateCommand":"cat /workspaces/r-dev-env/scripts/welcome_msg.sh >> ~/.bashrc && cat /workspaces/r-dev-env/scripts/set_build_r.sh >> ~/.bashrc && bash /workspaces/r-dev-env/scripts/localscript.sh"
// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "gcc -v",
// Configure tool-specific properties.
// "customizations": {},
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
},
"extensions": [
"REditorSupport.r",
"mads-hartmann.bash-ide-vscode",
"johnstoncode.svn-scm",
"ms-vscode.cpptools",
"MS-vsliveshare.vsliveshare"
]
}
},
"postCreateCommand": "chown -R vscode:vscode /workspaces/r-dev-env && sh /workspaces/r-dev-env/scripts/localscript.sh"
}
69 changes: 69 additions & 0 deletions .github/workflows/build-gitpod-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Build and publish Gitpod Docker image

on:
workflow_dispatch:
pull_request:
branches: ["main","devel"]
types: [closed]
paths:
- '.github/workflows/build-gitpod-image.yml'
- '.gitpod.Dockerfile'
- '.gitpod.yml'
- 'reinstall-cmake.sh'
- 'VERSION'


env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
build-and-push-image:
if: ${{github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true}}
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Extract version number
run: |
VER=$(cat VERSION)
echo "VERSION=$VER" >> $GITHUB_ENV

- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ github.repository }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{ env.VERSION }}
type=sha

- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
file: .gitpod.Dockerfile
push: true
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:gitpod.${{ github.ref_name }}
build-args: |
CONTAINER_VERSION=${{ env.VERSION }}
labels: ${{ steps.meta.outputs.labels }}
44 changes: 44 additions & 0 deletions .github/workflows/optimize-docs-images.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Optimize Docs Images

on:
pull_request:
branches: ["main","devel"]
types: [closed]
paths:
- 'docs/assets/**'

jobs:
optimize-images:
if: ${{github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true}}
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Setup R
uses: r-lib/actions/setup-r@v2

- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y libmagick++-dev libcurl4-openssl-dev

- name: Install R packages
run: |
R -e 'install.packages(c("magick"), repos = "https://cloud.r-project.org/")'

- name: Optimize images
run: |
Rscript ./scripts/optimize.R

- name: Commit and push optimized images
if: github.ref == 'refs/heads/devel' && github.event_name == 'push'
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git add docs/assets
git commit -m 'Optimize docs images'
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34 changes: 34 additions & 0 deletions .gitpod.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
FROM gitpod/workspace-full:latest

USER root

ARG REINSTALL_CMAKE_VERSION_FROM_SOURCE="none"

# Optionally install the cmake for vcpkg
COPY ./reinstall-cmake.sh /tmp/

RUN if [ "${REINSTALL_CMAKE_VERSION_FROM_SOURCE}" != "none" ]; then \
chmod +x /tmp/reinstall-cmake.sh && /tmp/reinstall-cmake.sh ${REINSTALL_CMAKE_VERSION_FROM_SOURCE}; \
fi \
&& rm -f /tmp/reinstall-cmake.sh

RUN sed -i.bak "/^#.*deb-src.*universe$/s/^# //g" /etc/apt/sources.list \
&& echo "deb https://cloud.r-project.org/bin/linux/ubuntu jammy-cran40/" >> /etc/apt/sources.list \
&& wget -qO- https://cloud.r-project.org/bin/linux/ubuntu/marutter_pubkey.asc | sudo tee -a /etc/apt/trusted.gpg.d/cran_ubuntu_key.asc \
&& apt update \
&& apt -y install subversion \
&& apt -y build-dep r-base-dev \
&& apt -y install r-base-dev \
&& apt -y install valgrind \
&& Rscript -e "install.packages('languageserver', repos='https://cran.rstudio.com')" \
&& Rscript -e "install.packages('httpgd', repos='https://cran.rstudio.com')"

RUN apt install -y shellcheck
RUN apt install -y ccache
RUN apt install -y rsync
#RUN /usr/sbin/update-ccache-symlinks
#RUN echo 'export PATH="/usr/lib/ccache:$PATH"' | tee -a /home/vscode/.bashrc


ARG CONTAINER_VERSION
ENV CONTAINER_VERSION ${CONTAINER_VERSION}
13 changes: 13 additions & 0 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
image: ghcr.io/r-devel/r-dev-env:gitpod.devel

tasks:
- name: Initial Setup for R-dev-env Gitpod Workspace
before: |
bash /workspace/r-dev-env/scripts/localscript.sh
source ~/.bashrc


vscode:
extensions:
- REditorSupport.r
- johnstoncode.svn-scm
35 changes: 20 additions & 15 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: Shirdhankar
given-names: Atharva
- family-names: Turner
given-names: Heather
- family-names: Tripp
given-names: James
- family-name: Emsley
given-names: Iain
title: "R Development Container"
version: 0.2.0
doi:
date-released: 28-06-2024
cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: Shirdhankar
given-names: Atharva
- family-names: Turner
given-names: Heather
- family-names: Tripp
given-names: James
- family-name: Emsley
given-names: Iain
- family-names: Crespo
given-names: Lorena
- family-names: Campitelli
given-names: Elio

title: "R Development Container"
version: 0.3.0
doi:
date-released: 04-09-2024
4 changes: 1 addition & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ RUN apt install -y ccache
#RUN echo 'export PATH="/usr/lib/ccache:$PATH"' | tee -a /home/vscode/.bashrc


ENV BUILDDIR="/workspaces/r-dev-env/build/r-devel"
ENV TOP_SRCDIR="/workspaces/r-dev-env/svn/r-devel"
ENV PATCHDIR='/workspaces/r-dev-env/patches'

ARG CONTAINER_VERSION
ENV CONTAINER_VERSION ${CONTAINER_VERSION}
27 changes: 21 additions & 6 deletions INDEX.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,27 @@
If you haven't seen them yet, you can find the
[R Dev Container Docs](https://contributor.r-project.org/r-dev-env/) online.

This index links to underlying markdown files for key sections of the docs, so you can preview them right here in VS Code.

## Working with the container

The links below give more information on using the container via GitHub Codespaces or Gitpod Workspaces.
Take a moment to review how to stop and restart your container, so you can continue your work.
If you are collaborating with others, you may want to use Live Share so that you can share the same workspace.

### Github Codespace

- [Stopping and Restarting Codespace](docs/container_setup/github_codespace/codespacestartstop.md)
- [Collaborating with Live Share](docs/container_setup/github_codespace/live_share.md)

### Gitpod Workspace

- [Stopping and Restarting Codespace](docs/container_setup/gitpod_workspace/workspacestop_and_restart.md)
- [Collaborating with Live Share](docs/container_setup/gitpod_workspace/live_share.md)

## Tutorials

You can also preview the tutorials right here in VSCode, making them easier to work through.
Learn how to use the container with these mini tutorials.
If you have used R in VSCode before, you can skip Tutorial 1.
Tutorials 2 and 3 are the minimum to get started with R development.
You can run through these in about 30 minutes.
Expand All @@ -19,9 +37,6 @@ You can refer to the remaining sections as needed!
6. [Multiple R versions](docs/tutorials/multi_r_compilation.md)
7. [SVN Help](docs/tutorials/svn_help.md)

## Other Docs
## Further docs

- [Restarting And Stopping Codespace](docs/container_setup/codespacestartstop.md)
- [Collaborating with Live Share]((docs/container_setup/live_share.md))
- [Using R Dev Container Locally](docs/container_setup/localsetup.md)
- [Useful Resources](docs/resources.md)
See the [full documentation](https://contributor.r-project.org/r-dev-env/) for background information on this project, how to contribute to the [documentation](docs/contributor_guide/contributing_to_docs.md) or the [codebase](docs/contributor_guide/contributing_to_codebase.md), [external resources](docs/resources.md) and [troubleshooting](docs/troubleshoot.md).
10 changes: 10 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
## R Development Container 0.3

- Implemented Gitpod setup with GitHub Actions workflow to build Docker images for the Gitpod workspace.
- Improved `which_r` script with version choice validation and updated both `which_r` and `set_build_r` scripts for enhanced functionality.
- Resolved local setup permission issues to ensure smoother operation within the devcontainer environment on Linux.
- Restructured documentation to incorporate Gitpod alternative setup.
- Implemented a workflow to optimize images so that documentation files are more lightweight.



## R Development Container 0.2

- Documentation split into set of markdown files. These are used to create the documentation website https://contributor.r-project.org/r-dev-env/ and the user-focused pages can be accessed directly within the codespace, linked from an index that opens when the codespace first starts. New documentation pages/topics:
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.2.0
0.3.0
Binary file added docs/assets/gitpod1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/gitpod2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/gitpod3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/gitpod4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/gitpod5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/gitpod6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/manage_codespace.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/manage_workspace.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 0 additions & 31 deletions docs/container_setup/codespacestartstop.md

This file was deleted.

Loading
Loading