diff --git a/.github/workflows/build-rpackage.yml b/.github/workflows/build-rpackage.yml deleted file mode 100644 index c5eafe37..00000000 --- a/.github/workflows/build-rpackage.yml +++ /dev/null @@ -1,115 +0,0 @@ -name: Built aaltobda binaries - -on: - push: - branches: master - paths: 'rpackage/**' - -jobs: - build-rpackage-binaries: - runs-on: ${{ matrix.config.os }} - - name: Build aaltobda ${{ matrix.config.os }} (${{ matrix.config.r }}) - - strategy: - fail-fast: false - matrix: - config: - - { os: macOS-latest, r: 'release' } - - { os: macOS-latest, r: 'oldrel' } - - { os: macOS-latest, r: '3.6' } - - { os: windows-latest, r: 'release' } - - { os: windows-latest, r: 'oldrel' } - - { os: windows-latest, r: '3.6' } - - steps: - - uses: actions/checkout@v4 - - - uses: r-lib/actions/setup-r@v2 - with: - r-version: ${{ matrix.config.r }} - - - uses: r-lib/actions/setup-r-dependencies@v2 - with: - cache-version: 2 - extra-packages: any::pkgbuild - working-directory: rpackage - - - name: Build binary packages - run: | - dir.create("build/${{ matrix.config.os }}_${{ matrix.config.r }}", - recursive = TRUE) - pkgbuild::build( - "./rpackage", - dest_path = "build/${{ matrix.config.os }}_${{ matrix.config.r }}", - binary = TRUE) - shell: Rscript {0} - - - name: Build source package - if: matrix.config.os == 'macos-latest' && matrix.config.r == 'release' - run: | - pkgbuild::build("./rpackage", dest_path = "build", binary = FALSE) - shell: Rscript {0} - - - name: Stash builds sources - uses: actions/upload-artifact@master - with: - name: aaltobda-${{ matrix.config.os }}-${{ matrix.config.r }} - path: ./build - - update-package-repo: - env: - GITHUB_PAT: ${{ secrets.GH_ACTION }} - name: Commit and push built packages - needs: build-rpackage-binaries - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - uses: actions/download-artifact@v3 - with: - path: binaries - - - name: Display structure of downloaded files - run: ls -R - working-directory: binaries - - - uses: r-lib/actions/setup-r@v2 - - - uses: r-lib/actions/setup-r-dependencies@v2 - with: - cache-version: 2 - extra-packages: any::remotes - working-directory: rpackage - - - name: Install drat - run: | - remotes::install_github("eddelbuettel/drat") - shell: Rscript {0} - - - name: Update R packages repo - run: | - new_pkgs <- list.files("binaries", recursive = T, full.names = T, - pattern = ".zip|.tar.gz|.tgz") - drat::insertPackages(new_pkgs, repodir=".") - shell: Rscript {0} - - - name: Setup Git config - env: - GITHUB_TOKEN: ${{ secrets.GH_ACTION }} - shell: bash - run: | - git config --global --add safe.directory '*' - git config --global user.name "avehtari" - git config --global user.email "aki.vehtari@aalto.fi" - git checkout master - - - name: GitHub Pages action - uses: peaceiris/actions-gh-pages@v3.6.1 - if: github.ref == 'refs/heads/master' - with: - github_token: ${{ secrets.GH_ACTION }} - publish_branch: gh-pages - keep_files: true - publish_dir: . diff --git a/.github/workflows/render.yml b/.github/workflows/render.yml index ad7327e4..484f627e 100644 --- a/.github/workflows/render.yml +++ b/.github/workflows/render.yml @@ -1,7 +1,7 @@ on: push: branches: - - master + - r-universe-aaltobda # paths: ['**.Rmd'] name: Render and Publish Website @@ -31,17 +31,12 @@ jobs: uses: r-lib/actions/setup-r@v2 with: use-public-rspm: true - extra-repositories: 'https://stan-dev.r-universe.dev' + extra-repositories: 'https://stan-dev.r-universe.dev https://avehtari.r-universe.dev' - name: Install R dependencies uses: r-lib/actions/setup-r-dependencies@v2 with: - packages: - any::rmarkdown - any::sessioninfo - any::tidyr - local::rpackage - any::cmdstanr + packages: rmarkdown, sessioninfo, tidyr, rpackage, cmdstanr, aaltobda - name: Render Main Rmarkdown Website run: rmarkdown::render_site() diff --git a/FAQ.Rmd b/FAQ.Rmd index a0a40886..a9c4e182 100644 --- a/FAQ.Rmd +++ b/FAQ.Rmd @@ -122,7 +122,7 @@ The course has its own R package `aaltobda` with data and functionality to simplify coding. `aaltobda` has been pre-installed in Aalto JupyterHub. To install the package to your own computer just run the following: -1. `install.packages("aaltobda", repos = c("https://avehtari.github.io/BDA_course_Aalto/", getOption("repos")))` +1. `install.packages("aaltobda", repos = c("https://avehtari.r-universe.dev", getOption("repos")))` If during the course there is announcement that `aaltobda` has been updated (e.g. some error has been fixed), you can get the latest @@ -244,4 +244,3 @@ Here are some great Aalto courses that are using Bayesian inference - [CS-E4895 - Gaussian Processes](https://mycourses.aalto.fi/course/view.php?id=44810) - [CS-E5795 - Computational Methods in Stochastics](https://mycourses.aalto.fi/course/info.php?id=40704) (more about MC, MCMC, HMC) - [MS-E1654 - Computational Inverse Problems](https://mycourses.aalto.fi/course/info.php?id=40592) - diff --git a/assignments/assignment6.qmd b/assignments/assignment6.qmd index 3082814c..f25d0e37 100644 --- a/assignments/assignment6.qmd +++ b/assignments/assignment6.qmd @@ -52,7 +52,7 @@ JupyterHub has all the needed packages pre-installed. The following installs and loads the `aaltobda` package: ```{r} if(!require(aaltobda)){ - install.packages("aaltobda", repos = c("https://avehtari.github.io/BDA_course_Aalto/", getOption("repos"))) + install.packages("aaltobda", repos = c("https://avehtari.r-universe.dev", getOption("repos"))) library(aaltobda) } ``` diff --git a/assignments/includes/_general_info.md b/assignments/includes/_general_info.md index 9b4ec664..5d6c2aab 100644 --- a/assignments/includes/_general_info.md +++ b/assignments/includes/_general_info.md @@ -20,7 +20,7 @@ To install the package on your own system, run the following code (upgrade=\"never\" skips question about updating other packages): ```{.r} -install.packages("aaltobda", repos = c("https://avehtari.github.io/BDA_course_Aalto/", getOption("repos"))) +install.packages("aaltobda", repos = c("https://avehtari.r-universe.dev", getOption("repos"))) ``` - Many of the exercises can be checked automatically using the R package `markmyassignment` (pre-installed in JupyterHub). @@ -71,4 +71,4 @@ install.packages("aaltobda", repos = c("https://avehtari.github.io/BDA_course_Aa If the pdf is blank, nonsense, or something like only a copy of the questions, 1) report it as problematic in Peergrade-interface to get another report to review, and 2) send a message to TAs. * Is the report anonymous? -::: \ No newline at end of file +::: diff --git a/assignments/simple_template3.qmd b/assignments/simple_template3.qmd index 0900b757..753ed718 100644 --- a/assignments/simple_template3.qmd +++ b/assignments/simple_template3.qmd @@ -51,7 +51,7 @@ set_assignment(assignment_path) The following installs and loads the `aaltobda` package: ```{r} if(!require(aaltobda)){ - install.packages("aaltobda", repos = c("https://avehtari.github.io/BDA_course_Aalto/", getOption("repos"))) + install.packages("aaltobda", repos = c("https://avehtari.r-universe.dev", getOption("repos"))) library(aaltobda) } ``` diff --git a/assignments/template2.qmd b/assignments/template2.qmd index 4fe43181..19dde0b5 100644 --- a/assignments/template2.qmd +++ b/assignments/template2.qmd @@ -60,7 +60,7 @@ The following installs the `aaltobda` package: ```{r} #| cache: true # Caching should be fine here -install.packages("aaltobda", repos = c("https://avehtari.github.io/BDA_course_Aalto/", getOption("repos"))) +install.packages("aaltobda", repos = c("https://avehtari.r-universe.dev", getOption("repos"))) ``` ::: diff --git a/assignments/template3.qmd b/assignments/template3.qmd index a37f37f5..41a0ece6 100644 --- a/assignments/template3.qmd +++ b/assignments/template3.qmd @@ -51,7 +51,7 @@ set_assignment(assignment_path) The following installs and loads the `aaltobda` package: ```{r} if(!require(aaltobda)){ - install.packages("aaltobda", repos = c("https://avehtari.github.io/BDA_course_Aalto/", getOption("repos"))) + install.packages("aaltobda", repos = c("https://avehtari.r-universe.dev", getOption("repos"))) library(aaltobda) } ``` diff --git a/assignments/template4.qmd b/assignments/template4.qmd index 952c159d..195e4e41 100644 --- a/assignments/template4.qmd +++ b/assignments/template4.qmd @@ -51,7 +51,7 @@ set_assignment(assignment_path) The following installs and loads the `aaltobda` package: ```{r} if(!require(aaltobda)){ - install.packages("aaltobda", repos = c("https://avehtari.github.io/BDA_course_Aalto/", getOption("repos"))) + install.packages("aaltobda", repos = c("https://avehtari.r-universe.dev", getOption("repos"))) library(aaltobda) } ``` diff --git a/assignments/template5.qmd b/assignments/template5.qmd index a039645b..8582b1a4 100644 --- a/assignments/template5.qmd +++ b/assignments/template5.qmd @@ -51,7 +51,7 @@ set_assignment(assignment_path) The following installs and loads the `aaltobda` package: ```{r} if(!require(aaltobda)){ - install.packages("aaltobda", repos = c("https://avehtari.github.io/BDA_course_Aalto/", getOption("repos"))) + install.packages("aaltobda", repos = c("https://avehtari.r-universe.dev", getOption("repos"))) library(aaltobda) } ``` diff --git a/assignments/template6.qmd b/assignments/template6.qmd index 16283de5..c973cbed 100644 --- a/assignments/template6.qmd +++ b/assignments/template6.qmd @@ -43,7 +43,7 @@ JupyterHub has all the needed packages pre-installed. The following installs and loads the `aaltobda` package: ```{r} if(!require(aaltobda)){ - install.packages("aaltobda", repos = c("https://avehtari.github.io/BDA_course_Aalto/", getOption("repos"))) + install.packages("aaltobda", repos = c("https://avehtari.r-universe.dev", getOption("repos"))) library(aaltobda) } ```