|
| 1 | +# INSTRUCTIONS for installing R, Carpentries, and previewing Sandpaper for multi OS (Linux, Windows and Mac) |
| 2 | + |
| 3 | +## Steps in Ubuntu 22.04 x64 |
| 4 | +1. Create new repo: https://github.com/HealthBioscienceIDEAS/Medical-Image-Registration-Short-Course |
| 5 | +2. Clone repo `git clone https://github.com/HealthBioscienceIDEAS/Medical-Image-Registration-Short-Course` |
| 6 | +3. install R (if you haven't done already) [:link:](https://cran.r-project.org/bin/linux/ubuntu/) |
| 7 | +``` |
| 8 | +sudo apt-get install r-cran-xml |
| 9 | +sudo apt-get install libxml2-dev |
| 10 | +sudo apt install libgit2-dev |
| 11 | +sudo apt install r-cran-curl |
| 12 | +
|
| 13 | +``` |
| 14 | +4. Open R and run the following to install dependencies |
| 15 | +``` |
| 16 | +options(repos = c( |
| 17 | + carpentries = "https://carpentries.r-universe.dev/", |
| 18 | + CRAN = "https://cran.rstudio.com/" |
| 19 | +)) |
| 20 | +install.packages(c("remotes"), dep =TRUE) |
| 21 | +``` |
| 22 | + |
| 23 | +5. In R, run |
| 24 | +``` |
| 25 | +remotes::install_github("HealthBioscienceIDEAS/sandpaper", dependencies = TRUE) |
| 26 | +# this one is taking some 20mins the fist time as it seems is building various packages |
| 27 | +# Terminal logs |
| 28 | +Downloading GitHub repo HealthBioscienceIDEAS/sandpaper@HEAD |
| 29 | +These packages have more recent versions available. |
| 30 | +It is recommended to update all of them. |
| 31 | +Which would you like to update? |
| 32 | +
|
| 33 | +1: All |
| 34 | +2: CRAN packages only |
| 35 | +3: None |
| 36 | +4: pegboard (0.7.5 -> a32a7836d...) [GitHub] |
| 37 | +5: varnish (1.0.2 -> 56d594d27...) [GitHub] |
| 38 | +6: curl (4.3.2 -> 5.2.1 ) [CRAN] |
| 39 | +7: httr (1.4.2 -> 1.4.7 ) [CRAN] |
| 40 | +8: gh (1.3.0 -> 1.4.1 ) [CRAN] |
| 41 | +9: covr (3.5.1 -> 3.6.4 ) [CRAN] |
| 42 | +
|
| 43 | +Enter one or more numbers, or an empty line to skip updates: 1 |
| 44 | +
|
| 45 | +The downloaded source packages are in |
| 46 | + ‘/tmp/Rtmpn94NAu/downloaded_packages’ |
| 47 | +Downloading GitHub repo carpentries/pegboard@HEAD |
| 48 | +These packages have more recent versions available. |
| 49 | +It is recommended to update all of them. |
| 50 | +Which would you like to update? |
| 51 | +
|
| 52 | +1: All |
| 53 | +2: CRAN packages only |
| 54 | +3: None |
| 55 | +4: tinkr (0.2.0.9000 -> be564d524...) [GitHub] |
| 56 | +
|
| 57 | +Enter one or more numbers, or an empty line to skip updates: 1 |
| 58 | +
|
| 59 | +── R CMD build ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── |
| 60 | +✔ checking for file ‘/tmp/Rtmpn94NAu/remotes50ddb31b7ca85/HealthBioscienceIDEAS-sandpaper-fb14e02/DESCRIPTION’ ... |
| 61 | +─ preparing ‘sandpaper’: |
| 62 | +✔ checking DESCRIPTION meta-information ... |
| 63 | +─ checking for LF line-endings in source and make files and shell scripts (420ms) |
| 64 | +─ checking for empty or unneeded directories |
| 65 | + Omitted ‘LazyData’ from DESCRIPTION |
| 66 | +─ building ‘sandpaper_0.16.4.tar.gz’ |
| 67 | + |
| 68 | +Installing package into ‘/home/mxochicale/R/x86_64-pc-linux-gnu-library/4.4’ |
| 69 | +(as ‘lib’ is unspecified) |
| 70 | +* installing *source* package ‘sandpaper’ ... |
| 71 | +** using staged installation |
| 72 | +** R |
| 73 | +** inst |
| 74 | +** byte-compile and prepare package for lazy loading |
| 75 | +** help |
| 76 | +*** installing help indices |
| 77 | +*** copying figures |
| 78 | +** building package indices |
| 79 | +** installing vignettes |
| 80 | +** testing if installed package can be loaded from temporary location |
| 81 | +** testing if installed package can be loaded from final location |
| 82 | +** testing if installed package keeps a record of temporary installation path |
| 83 | +* DONE (sandpaper) |
| 84 | +Warning message: |
| 85 | +In i.p(...) : installation of package ‘curl’ had non-zero exit status |
| 86 | +
|
| 87 | +``` |
| 88 | + |
| 89 | +6. In R, run |
| 90 | +``` |
| 91 | +sandpaper::create_lesson("~/Desktop/medical-registration/Medical-Image-Registration-Short-Course") |
| 92 | +## LOGS |
| 93 | +
|
| 94 | +> sandpaper::create_lesson("~/Desktop/medical-registration/Medical-Image-Registration-Short-Course") |
| 95 | +No personal access token (PAT) available.gistration/Medical-Image-Registration-Short-Course... |
| 96 | +Obtain a PAT from here: |
| 97 | +https://github.com/settings/tokens |
| 98 | +For more on what to do with the PAT, see ?gh_whoami. |
| 99 | +ℹ No schedule set, using Rmd files in episodes/ directory. |
| 100 | +→ To remove this message, define your schedule in config.yaml or use `set_episodes()` to generate it. |
| 101 | +─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── |
| 102 | +ℹ To save this configuration, use |
| 103 | +
|
| 104 | +set_episodes(path = path, order = ep, write = TRUE) |
| 105 | +• Edit '/home/mxochicale/Desktop/medical-registration/Medical-Image-Registration-Short-Course/episodes/introduction.Rmd' |
| 106 | +✔ First episode created in /home/mxochicale/Desktop/medical-registration/Medical-Image-Registration-Short-Course/episodes/introduction.Rmd |
| 107 | +ℹ Workflows up-to-date! |
| 108 | +✔ Lesson successfully created in ~/Desktop/medical-registration/Medical-Image-Registration-Short-Course |
| 109 | +✔ Setting active project to '/home/mxochicale/Desktop/medical-registration/Medical-Image-Registration-Short-Course' |
| 110 | +✔ Changing working directory to '/home/mxochicale/Desktop/medical-registration/Medical-Image-Registration-Short-Course/' |
| 111 | +~/Desktop/medical-registration/Medical-Image-Registration-Short-Course |
| 112 | +> |
| 113 | +``` |
| 114 | + |
| 115 | +7. Setting up config file in sandpaper template: |
| 116 | +``` |
| 117 | +carpentry: 'IDEAS' |
| 118 | +title: ''Medical-Image-Registration-Short-Course' |
| 119 | +created: '2024-05-13' |
| 120 | +source: 'https://github.com/HealthBioscienceIDEAS/Medical-Image-Registration-Short-Course' |
| 121 | +varnish: 'HealthBioscienceIDEAS/varnish@IDEAS' |
| 122 | +sandpaper: 'HealthBioscienceIDEAS/sandpaper@IDEAS' |
| 123 | +``` |
| 124 | + |
| 125 | +8. Set up GitHub Pages |
| 126 | +* Go go [pages](https://github.com/HealthBioscienceIDEAS/Medical-Image-Registration-Short-Course/settings/pages) and select gh-pages branch with `/root` and click save |
| 127 | +* Pass CI [actions](https://github.com/HealthBioscienceIDEAS/Medical-Image-Registration-Short-Course/actions/runs/9064118161) |
| 128 | +* :tada: you have created: https://healthbioscienceideas.github.io/Medical-Image-Registration-Short-Course/ |
| 129 | + |
| 130 | + |
| 131 | +## Steps on Windows |
| 132 | + |
| 133 | +### **INSTRUCTIONS for installing R, Carpentries, and Sandpaper on Windows:** |
| 134 | + |
| 135 | +1. Create new repo: https://github.com/HealthBioscienceIDEAS/Medical-Image-Registration-Short-Course |
| 136 | + |
| 137 | +2. Clone repo `git clone https://github.com/HealthBioscienceIDEAS/Medical-Image-Registration-Short-Course` |
| 138 | + |
| 139 | +3. Installing R using the following: https://cran.r-project.org/bin/windows/base/ |
| 140 | + |
| 141 | +4. Using the default settings during the installation of **RGUi 4.x.x** |
| 142 | + |
| 143 | +5. From RGui Console, enter the following command: |
| 144 | +``` |
| 145 | +options(repos = c( |
| 146 | +carpentries = "https://carpentries.r-universe.dev/", |
| 147 | +CRAN = "https://cran.rstudio.com/" |
| 148 | +)) |
| 149 | +install.packages(c("remotes"), dep =TRUE) |
| 150 | +``` |
| 151 | + |
| 152 | +6. Enter the following command: |
| 153 | +`remotes::install_github("HealthBioscienceIDEAS/sandpaper", dependencies = TRUE) |
| 154 | +` |
| 155 | +7. Change path from RGUi to the GitHub folder of the medical image registration course. This is done from the Menu list by picking 'File' then 'Change Dir..' |
| 156 | + |
| 157 | +8. Run the following command to start sandpaper: |
| 158 | +`sandpaper::build_lesson() |
| 159 | +` |
| 160 | +9. You may notice some package not installed called _**Pandoc**_ after running the sandpaper command. If so, install Pandoc then run _step 8_ again. |
| 161 | +Pandoc installation: https://pandoc.org/installing.html |
| 162 | + |
| 163 | + |
| 164 | + |
| 165 | +## Steps in MAC |
| 166 | +Packages via homebrew: freetype, fribidi, harfbuzz, libpng, git2. |
| 167 | + |
| 168 | + |
| 169 | +## Previewing eposides in any OS platform |
| 170 | +1. Using your terminal clone repo |
| 171 | +``` |
| 172 | +git clone git@github.com:HealthBioscienceIDEAS/Medical-Image-Registration-Short-Course.git |
| 173 | +``` |
| 174 | + |
| 175 | +2. Checkout `feature-branch-name`. |
| 176 | +``` |
| 177 | +git checkout feature-branch-name |
| 178 | +``` |
| 179 | + |
| 180 | +3. Run `sandpaper::build_lesson()` in R which will launch your internet browser with the episode |
| 181 | +``` |
| 182 | +R |
| 183 | +sandpaper::build_lesson() |
| 184 | +``` |
| 185 | + |
0 commit comments