From c4d0232a592dab7e058291b922dcaf90ffa3b95f Mon Sep 17 00:00:00 2001 From: avinab-neogy Date: Tue, 26 Aug 2025 22:16:44 +0530 Subject: [PATCH 1/5] corrected the formatting of localsetup.md --- .../container_setup/local_setup/localsetup.md | 52 +++++++++++-------- docs/css/custom.css | 37 +++++++++++++ 2 files changed, 68 insertions(+), 21 deletions(-) create mode 100644 docs/css/custom.css diff --git a/docs/container_setup/local_setup/localsetup.md b/docs/container_setup/local_setup/localsetup.md index ac535ed6a..593785290 100644 --- a/docs/container_setup/local_setup/localsetup.md +++ b/docs/container_setup/local_setup/localsetup.md @@ -17,48 +17,58 @@ prerequisites installed. 1. Clone the [R Dev Container Github repo](https://github.com/r-devel/r-dev-env/) + 2. In a terminal, change directory to r-dev-env -```bash -cd r-dev-env -``` + ```bash + cd r-dev-env + ``` 3. Restart VSCode in the `r-dev-env` directory with the command: -```bash -code . -``` + ```bash + code . + ``` 4. Checkout the main branch and pull the latest changes -```bash -git checkout main -git pull -``` + ```bash + git checkout main + git pull + ``` -The main branch provides the stable release. If you require an in-development -feature, use the devel branch instead. + The main branch provides the stable release. If you require an in-development + feature, use the devel branch instead. 5. After this step please be sure that your docker engine is started. If you have installed Docker Desktop just open the Docker Desktop app the engine starts automatically and if you are using just docker engine make sure to start it with the following command -```bash -systemctl start docker -``` + ```bash + systemctl start docker + ``` 6. We can see pop-up at the bottom right of the VSCode editor which says reopen -in Dev Container. Click on `Reopen in DevContainer` button. ![start -localsetup](../../assets/rdev13.png) +in Dev Container. +Click on `Reopen in Container` button. + ![startlocalsetup](../../assets/rdev13.png) + 7. After clicking on that button we will see our container is getting ready. It will take some time. So till that time you can have coffee :) ![start localsetup](../../assets/rdev24.png) + 8. We can also test whether the dev container is working or not by just printing -the environment variables mentioned in the welcome message on the terminal. And -there we go!!! We have setup our R Dev Container locally. ![start -localsetup](../../assets/rdev25.png) +the environment variables mentioned in the welcome message on the terminal. + + ```console + $ echo $BUILDDIR + /workspaces/r-dev-env/bin/R + ``` + + And there we go!!! We have setup our R Dev Container locally. ![start + localsetup](../../assets/rdev25.png) 9. The container will be closed when you close VSCode. To reopen the container, - open the `r-dev-env` directory in VSCode. + open the `r-dev-env` directory in VSCode. \ No newline at end of file diff --git a/docs/css/custom.css b/docs/css/custom.css new file mode 100644 index 000000000..825d50f14 --- /dev/null +++ b/docs/css/custom.css @@ -0,0 +1,37 @@ +/* customise CSS for bash code chunks and bash sessions ("console") */ + +/* .gp = Generic Prompt (e.g., shell prompt like $ or >) */ +/* default: var(--md-code-hl-generic-color); */ +/* prompts treated as normal code in bash code chunks */ +.language-console.highlight code span.gp{ + color: #7aa2cd; +} + +/* .go = Generic output: output from a command */ +/* default: var(--md-code-hl-generic-color); */ +.language-console.highlight code span.go, +.language-bash.highlight code span.go { + color: var(--md-code-hl-generic-color); +} + +/* .nb = Built-in name like print, echo */ +/* default: var(--md-code-hl-constant-color); */ +.language-console.highlight code span.nb, +.language-bash.highlight code span.nb { + color: var(--md-code-hl-constant-color); +} + +/* .nv = Named variables like $BUILDDIR */ +/* default: var(--md-code-hl-variable-color); */ +/* use same as normal text: var(--md-code-fg-color); */ +.language-console.highlight code span.nv, +.language-bash.highlight code span.nv { + color: var(--md-code-fg-color); +} + +/* .c1 = Built-in name like print, echo */ +/* default: var(--md-code-hl-comment-color); */ +.language-console.highlight code span.c1, +.language-bash.highlight code span.c1 { + color: var(--md-code-hl-comment-color); +} \ No newline at end of file From 350318b27dbc38b28586eeab564da29562eaf0f9 Mon Sep 17 00:00:00 2001 From: avinab-neogy Date: Tue, 26 Aug 2025 22:27:00 +0530 Subject: [PATCH 2/5] corrected linter issues --- docs/container_setup/local_setup/localsetup.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/docs/container_setup/local_setup/localsetup.md b/docs/container_setup/local_setup/localsetup.md index 593785290..f5f45bcd3 100644 --- a/docs/container_setup/local_setup/localsetup.md +++ b/docs/container_setup/local_setup/localsetup.md @@ -1,11 +1,12 @@ -!!! note Local setup is not recommended on macOS or Windows as the Docker +!!! note + Local setup is not recommended on macOS or Windows as the Docker container will work via a Virtual Machine and building R will take far longer (e.g. a full build may take 1 hour vs 10 minutes!). We can also use this codespace locally. For that we need to have some prerequisites installed. -#### > Prerequisites +#### Prerequisites 1. Docker Engine or Docker Desktop. You can find the docker desktop install instructions on [Docker Desktop @@ -13,7 +14,7 @@ prerequisites installed. 2. VSCode Editor. You can download and install from [VSCode website](https://code.visualstudio.com/download). -#### > Steps to run R Development Container locally +#### Steps to run R Development Container locally 1. Clone the [R Dev Container Github repo](https://github.com/r-devel/r-dev-env/) @@ -53,8 +54,8 @@ prerequisites installed. in Dev Container. Click on `Reopen in Container` button. - ![startlocalsetup](../../assets/rdev13.png) - + ![startlocalsetup](../../assets/rdev13.png) + 7. After clicking on that button we will see our container is getting ready. It will take some time. So till that time you can have coffee :) ![start localsetup](../../assets/rdev24.png) @@ -71,4 +72,4 @@ the environment variables mentioned in the welcome message on the terminal. localsetup](../../assets/rdev25.png) 9. The container will be closed when you close VSCode. To reopen the container, - open the `r-dev-env` directory in VSCode. \ No newline at end of file + open the `r-dev-env` directory in VSCode. From 577bec3eb45edd8e9c0f142cdcb8c7fc1b731d0b Mon Sep 17 00:00:00 2001 From: avinab-neogy Date: Tue, 26 Aug 2025 22:44:11 +0530 Subject: [PATCH 3/5] updated mkdocs.yml to use custom.css --- mkdocs.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mkdocs.yml b/mkdocs.yml index 9a2772b15..019d50510 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -58,6 +58,9 @@ theme: primary: indigo accent: blue +extra_css: + - css/custom.css + plugins: - social - search @@ -71,6 +74,8 @@ extra: markdown_extensions: - pymdownx.highlight: + use_pygments: true + pygments_lang_class: true anchor_linenums: true - pymdownx.inlinehilite - pymdownx.snippets From 67dd0f0fdad2ce773035a7854517bd500695121f Mon Sep 17 00:00:00 2001 From: avinab-neogy Date: Tue, 26 Aug 2025 22:51:05 +0530 Subject: [PATCH 4/5] updated running_r to include the codeblock from the screenshot --- docs/tutorials/running_r.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/tutorials/running_r.md b/docs/tutorials/running_r.md index da412e063..31395b40a 100644 --- a/docs/tutorials/running_r.md +++ b/docs/tutorials/running_r.md @@ -31,4 +31,8 @@ Click on the `R:(not attached)` link to launch an R terminal. 3) You can then send code from the `.R` file to the R terminal by pressing `cmd/ctrl + enter`. +```R +hist(rnorm(1000)) +``` + ![alt text](../assets/rdev5.png) From 052b0781202796e7ec9f34d1807e844465a1cbea Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 26 Aug 2025 17:26:02 +0000 Subject: [PATCH 5/5] [pre-commit.ci] Fixing issues with pre-commit --- docs/css/custom.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/css/custom.css b/docs/css/custom.css index 825d50f14..c13331e66 100644 --- a/docs/css/custom.css +++ b/docs/css/custom.css @@ -34,4 +34,4 @@ .language-console.highlight code span.c1, .language-bash.highlight code span.c1 { color: var(--md-code-hl-comment-color); -} \ No newline at end of file +}