Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
199 commits
Select commit Hold shift + click to select a range
13978b1
also link filtered for demo purposes
sjspielman Nov 12, 2025
654d2e7
remove space so the link is a link
sjspielman Nov 12, 2025
574c5a6
add alpha=1 to guide override
sjspielman Nov 12, 2025
c119d39
add a little sentence about patient diagnoses to help us remember tha…
sjspielman Nov 12, 2025
398da1d
typos and formatting in gsea
allyhawkins Nov 13, 2025
f01b271
backticks for AUCell and SCE
allyhawkins Nov 13, 2025
0e8e3d3
Merge pull request #868 from AlexsLemonade/allyhawkins/pathway-typos
allyhawkins Nov 13, 2025
c4b4082
Update scRNA-seq-advanced/02-dataset_integration.Rmd
sjspielman Nov 13, 2025
7454d23
Merge branch 'master' into sjspielman/856-scadvanced-updates
sjspielman Nov 13, 2025
e0d21f5
Merge pull request #865 from AlexsLemonade/sjspielman/856-scadvanced-…
sjspielman Nov 13, 2025
ad068f5
reformat multi-line functions in intro
jashapiro Nov 18, 2025
d7bc902
Formatting for differential expression
jashapiro Nov 18, 2025
aae36f1
less live path typing
sjspielman Nov 18, 2025
5384e6a
Merge pull request #870 from AlexsLemonade/jashapiro/sc-advanced-changes
jashapiro Nov 18, 2025
4184775
Merge branch 'master' into sjspielman/863-dont-make-me-type
sjspielman Nov 18, 2025
9311c72
remove non-detected genes
allyhawkins Nov 18, 2025
1f4ec21
Merge pull request #872 from AlexsLemonade/allyhawkins/aucell-remove-…
allyhawkins Nov 18, 2025
83d364c
Merge branch 'master' into sjspielman/863-dont-make-me-type
sjspielman Nov 18, 2025
5d21965
rip out glue::glue
Nov 18, 2025
334f51c
updated merging preamble and sectioning, opened with checking genes
Nov 18, 2025
27fe546
sections for exploring coldata names and assays/reddims
Nov 18, 2025
2281386
rowdata section and function update
Nov 18, 2025
2c97955
Merge pull request #871 from AlexsLemonade/sjspielman/863-dont-make-m…
sjspielman Nov 18, 2025
6dce13f
≈=Merge branch 'master' into sjspielman/integration-update
Nov 18, 2025
8547ac2
formatting updates
Nov 18, 2025
55569dd
update the technical merge diagram
sjspielman Nov 18, 2025
41f3672
wording
sjspielman Nov 18, 2025
b043ffe
spelling
sjspielman Nov 18, 2025
fc09cc6
Apply suggestions from code review
sjspielman Nov 19, 2025
3357a69
responded to merge section reviews
Nov 19, 2025
c88dc48
PCA and UMAP simplified
Nov 19, 2025
f309fa4
missed spots of merged_umap
Nov 19, 2025
84d89eb
Apply suggestions from code review
sjspielman Nov 20, 2025
cde10f3
Apply suggestions from code review
sjspielman Nov 20, 2025
74c245b
Apply suggestions from code review
sjspielman Nov 20, 2025
8813590
clean up deprecated comments, move up in function
Nov 20, 2025
f900ff0
parallel headers
sjspielman Nov 20, 2025
ab4ac11
one more
sjspielman Nov 20, 2025
0ca6cfb
moar headers
sjspielman Nov 20, 2025
a7433ac
back up export
sjspielman Nov 20, 2025
02c0f50
hands
sjspielman Nov 20, 2025
e48af16
Merge pull request #873 from AlexsLemonade/sjspielman/integration-update
sjspielman Nov 20, 2025
ae92db6
Live and rendered notebooks
sjspielman Nov 20, 2025
5e71783
Merge pull request #875 from AlexsLemonade/auto_render_live
sjspielman Nov 24, 2025
77d8ff9
2025-dec release
sjspielman Nov 24, 2025
35e547b
Copy exercises from exercise-notebook-answers
sjspielman Nov 24, 2025
852288d
Merge pull request #877 from AlexsLemonade/auto_copy_exercises
sjspielman Nov 24, 2025
da6e6ff
Merge branch 'master' into sjspielman/2025-dec-current-modules
sjspielman Nov 24, 2025
7fa4261
Merge pull request #876 from AlexsLemonade/sjspielman/2025-dec-curren…
sjspielman Nov 25, 2025
19d3dce
december not dec
sjspielman Nov 25, 2025
e0bd616
Merge pull request #878 from AlexsLemonade/sjspielman/dec-is-not-dece…
sjspielman Nov 25, 2025
1c3d618
update syntax
sjspielman Nov 25, 2025
47834f0
Update .github/workflows/build-docker.yml
sjspielman Nov 25, 2025
b1a3a77
Merge branch 'master' into sjspielman/879-jq-syntax
sjspielman Nov 25, 2025
32c7657
Merge pull request #880 from AlexsLemonade/sjspielman/879-jq-syntax
sjspielman Nov 25, 2025
7d7374e
remove old renv environment
sjspielman Jan 21, 2026
2880ab9
bump renv
sjspielman Jan 21, 2026
bae48ff
restore the .Rprofile file now that we're bumped
sjspielman Jan 21, 2026
3e8aaf4
verions to json
sjspielman Jan 21, 2026
7db65b4
psm
sjspielman Jan 21, 2026
fbbcfa6
3.19 -> 3.22
sjspielman Jan 21, 2026
f5f4e94
remove the temp fix for Rsamtools, to see if it works now
sjspielman Jan 21, 2026
36b0b51
Apply suggestions from code review
sjspielman Jan 21, 2026
ddc3090
Apply suggestions from code review
sjspielman Jan 22, 2026
743a922
Merge pull request #884 from AlexsLemonade/sjspielman/869-bump-to-r4.…
sjspielman Jan 22, 2026
3a2e4d9
bump renv
jashapiro Jan 28, 2026
3ff1afb
Update snapshot
jashapiro Jan 29, 2026
e8da342
Merge pull request #889 from AlexsLemonade/jashapiro/renv117
jashapiro Jan 29, 2026
fd00552
Make lockfile consistent
jashapiro Jan 29, 2026
786f6cc
Try to create a dual-platform build
jashapiro Jan 29, 2026
3057a54
Merge pull request #890 from AlexsLemonade/jashapiro/multi-arch-docker
jashapiro Jan 30, 2026
e1676bb
remove platform flags now that we have multi-platform builds
jashapiro Jan 30, 2026
6cea2a5
Merge pull request #891 from AlexsLemonade/jashapiro/no-platform
jashapiro Jan 30, 2026
8b88b37
snapshot tximeta 1.28.3
sjspielman Feb 9, 2026
f31f72b
add scrapper to dependencies
sjspielman Feb 9, 2026
b04d684
snapshot scrapper and its dependencies
sjspielman Feb 9, 2026
e8d71d8
new line
sjspielman Feb 9, 2026
adc92e5
Merge pull request #905 from AlexsLemonade/sjspielman/895-899-tximeta…
sjspielman Feb 10, 2026
b8f67c3
scRNA-seq celltype notebook: update from restrict -> test.genes, incl…
sjspielman Feb 3, 2026
4652281
some spacing while we're here
sjspielman Feb 11, 2026
16c114b
update irlba record
sjspielman Feb 11, 2026
603abb2
try adding libsqlite3-dev to docker install
sjspielman Feb 11, 2026
a8d7304
move to r section
sjspielman Feb 11, 2026
e4ef513
take it back out, seems like it's already there
sjspielman Feb 11, 2026
a59d30d
try for standalone install
sjspielman Feb 11, 2026
77f71b9
revert a59d30d
sjspielman Feb 11, 2026
3bb8287
renv update
sjspielman Feb 11, 2026
3973df7
Apply suggestions from code review
sjspielman Feb 11, 2026
6b74ab9
Apply suggestion from @sjspielman
sjspielman Feb 11, 2026
3e9d40a
Merge pull request #908 from AlexsLemonade/sjspielman/bump-irlba
sjspielman Feb 12, 2026
5ce695a
Merge branch 'master' into sjspielman/897-update-singler-bioc3.22
sjspielman Feb 12, 2026
e8952da
advanced GSEA notebook: spacing in general, and update the msigdbr ar…
sjspielman Feb 3, 2026
0a6ee2b
fix typo and one more wording spot
sjspielman Feb 12, 2026
686bcdd
advanced AUCell notebook: spacing all around, update AUCell to use a …
sjspielman Feb 3, 2026
015fb8f
advanced aucell util: update plot_recovery_curve function to use list…
sjspielman Feb 3, 2026
17fba61
fix typo
sjspielman Feb 12, 2026
265a4d3
comment out unfixed notebooks with TODO linking #911
sjspielman Feb 12, 2026
a76a419
#902: update ORA notebook
sjspielman Feb 12, 2026
b1cce45
#903: update GSEA notebook
sjspielman Feb 12, 2026
09328dc
#904: update GSVA notebook
sjspielman Feb 12, 2026
1737eee
a couple more purrr spots in GSVA
sjspielman Feb 12, 2026
2f913e7
temp comment out notebooks not to render, see if this one makes it th…
sjspielman Feb 12, 2026
88e3471
might as well try same step we use in exercises repo
sjspielman Feb 12, 2026
c3deda2
Revert "might as well try same step we use in exercises repo"
sjspielman Feb 12, 2026
2fafb08
Make sure that rm steps execute
jashapiro Feb 12, 2026
46402f9
Merge pull request #913 from AlexsLemonade/jashapiro/shrink-renv
jashapiro Feb 12, 2026
7ce97f7
Merge branch 'master' into sjspielman/897-update-singler-bioc3.22
sjspielman Feb 12, 2026
aaaf2ca
Merge branch 'master' into sjspielman/898-update-gsea-aucell
sjspielman Feb 12, 2026
bec676f
Merge pull request #906 from AlexsLemonade/sjspielman/897-update-sing…
sjspielman Feb 12, 2026
7bdabe0
merge
sjspielman Feb 12, 2026
9849d7a
Merge branch 'sjspielman/898-update-gsea-aucell' of github.com:AlexsL…
sjspielman Feb 12, 2026
40cbf57
fix the bad merge
sjspielman Feb 12, 2026
b787158
remove extra period
sjspielman Feb 13, 2026
dcb48c5
update roadmap to close out #881 while I'm here
sjspielman Feb 13, 2026
ac35f60
Merge branch 'master' into sjspielman/902-903-904-updates
sjspielman Feb 13, 2026
b3733e3
all uncommented now
sjspielman Feb 13, 2026
4ebbdd3
from #798, use dir_create and set a seed in gsea notebook
sjspielman Feb 13, 2026
28ed7a3
woops this isnt stacked so need to comment out the other notebooks be…
sjspielman Feb 13, 2026
bbb1f29
separate coldata_joined variable to avoid bugs during instruction
sjspielman Feb 13, 2026
4a24421
fix a couple spots where we have typos for sample ids
sjspielman Feb 13, 2026
29bf271
get the other data frame naming in ORA
sjspielman Feb 13, 2026
fa3f254
update the salmon link since the note of interest is just above the l…
sjspielman Feb 13, 2026
5026246
Merge pull request #910 from AlexsLemonade/sjspielman/898-update-gsea…
sjspielman Feb 13, 2026
56daea9
all notebooks can run through ci now
sjspielman Feb 13, 2026
f220599
Merge branch 'master' into sjspielman/902-903-904-updates
sjspielman Feb 13, 2026
ae6159f
Clear space and render in docker container
jashapiro Feb 15, 2026
5baa9a0
Update make-live workflow
jashapiro Feb 15, 2026
ef25540
Merge branch 'master' into sjspielman/901-and-other-rnaseq-updates
sjspielman Feb 17, 2026
4bfdc26
update 01 tidyverse notebook to use built-in penguins
sjspielman Feb 17, 2026
10cf1f5
remove palmerpenguins from renv
sjspielman Feb 17, 2026
75218e2
spacing and use :: all around
sjspielman Feb 17, 2026
fa24aef
add sentence
sjspielman Feb 17, 2026
ba2499b
get rid of socviz link and add ggplot2 book
sjspielman Feb 17, 2026
75829ed
add sentence to save to variable
sjspielman Feb 17, 2026
a6ecff6
Update pathway-analysis/02-gene_set_enrichment_analysis.Rmd
sjspielman Feb 17, 2026
b19f99b
Merge pull request #914 from AlexsLemonade/sjspielman/902-903-904-upd…
sjspielman Feb 17, 2026
bcc8f14
add core spatial packages and their deps to renv
sjspielman Feb 17, 2026
babf57f
Merge branch 'master' into jashapiro/gha-manual-docker
jashapiro Feb 17, 2026
bf8ab7e
use fixed path
jashapiro Feb 17, 2026
abf8cba
Try no user setting
jashapiro Feb 17, 2026
b0d9499
add free space reporting
jashapiro Feb 17, 2026
528c202
add spatial directory and start off notebook in a project
sjspielman Feb 17, 2026
ded0ee1
Merge pull request #919 from AlexsLemonade/jashapiro/gha-manual-docker
jashapiro Feb 17, 2026
3131b1d
draft import section with smidge of viz
sjspielman Feb 17, 2026
2ee8700
Merge branch 'master' into sjspielman/917-initial-spatial-packages
sjspielman Feb 17, 2026
e121490
Merge branch 'master' into sjspielman/901-and-other-rnaseq-updates
sjspielman Feb 17, 2026
b79f8fc
restore sample id
sjspielman Feb 17, 2026
6647e30
link the other samples fastqc
sjspielman Feb 17, 2026
5ddb76f
Update scripts/link-data.sh
sjspielman Feb 17, 2026
7b1c75e
update igraph - there was a new patch release
sjspielman Feb 17, 2026
bfc51ba
merge
sjspielman Feb 17, 2026
543cf54
Merge pull request #915 from AlexsLemonade/sjspielman/901-and-other-r…
sjspielman Feb 17, 2026
a5236bc
run renv::update, which notably updates reticulate too which is now f…
sjspielman Feb 17, 2026
9e789f0
Merge branch 'master' into sjspielman/917-initial-spatial-packages
sjspielman Feb 17, 2026
8db0c0e
Merge pull request #926 from AlexsLemonade/sjspielman/917-initial-spa…
sjspielman Feb 17, 2026
27210eb
Merge branch 'master' into sjspielman/920-draft-import
sjspielman Feb 18, 2026
5e97285
ignore data
sjspielman Feb 18, 2026
d524083
fix a couple spots and stub out next sections
sjspielman Feb 18, 2026
57e4245
add to render live script
sjspielman Feb 18, 2026
5f6891e
typos
sjspielman Feb 18, 2026
5ca0a5a
temporarily, test faster
sjspielman Feb 18, 2026
f1f48bb
revert temp script change as I flew too close to the sun
sjspielman Feb 18, 2026
dd574dd
Apply suggestions from code review
sjspielman Feb 18, 2026
afea9d3
dont save the h&e at this time
sjspielman Feb 18, 2026
c40c315
definitely mention no cytassist image since it affects import, and up…
sjspielman Feb 18, 2026
0e51c2c
lil rephrasing now, of course much more to come
sjspielman Feb 18, 2026
129d5a1
just load spatialexperiment, rest :: only
sjspielman Feb 18, 2026
c21d837
cytaimage out of dictionary
sjspielman Feb 18, 2026
18d3777
slashes
sjspielman Feb 18, 2026
8ff315e
Update spatial/01-spatial_intro.Rmd
sjspielman Feb 19, 2026
aa2b02f
pull out path defs being given to visiumio, and show sce-esque slots …
sjspielman Feb 19, 2026
1959e5f
Update spatial/01-spatial_intro.Rmd
sjspielman Feb 19, 2026
7ae5960
define sample id separately for typing
sjspielman Feb 19, 2026
409b22e
micro
sjspielman Feb 19, 2026
e0edae5
Merge pull request #927 from AlexsLemonade/sjspielman/920-draft-import
sjspielman Feb 19, 2026
a50d201
Merge branch 'master' into sjspielman/860-909-updates
sjspielman Feb 19, 2026
ad0bdbd
Apply suggestion from @sjspielman
sjspielman Feb 19, 2026
d4af33f
add section to filter empty spots
sjspielman Feb 19, 2026
5333548
add global filtering section
sjspielman Feb 19, 2026
8818287
dont let figures get too big, we need to keep the html small
sjspielman Feb 19, 2026
f6008ba
a little bigger
sjspielman Feb 19, 2026
35f0c3d
fix typo and add mito list to S3 in parallel
sjspielman Feb 19, 2026
c2055da
Use binaries for renv restore
jashapiro Feb 19, 2026
7e20878
minor bugfix and formatting
jashapiro Feb 19, 2026
c323baa
Merge pull request #930 from AlexsLemonade/jashapiro/binary-docker
jashapiro Feb 20, 2026
b9dbe17
Merge branch 'master' into sjspielman/860-909-updates
jashapiro Feb 20, 2026
b041c46
Apply suggestions from code review
sjspielman Feb 23, 2026
a785e36
modify levels sentence since we actually cant see these 3 levels in t…
sjspielman Feb 23, 2026
ed254be
add num to dict
sjspielman Feb 23, 2026
55061d3
Merge pull request #925 from AlexsLemonade/sjspielman/860-909-updates
sjspielman Feb 23, 2026
314edb1
Merge branch 'master' into sjspielman/921-draft-filtering-part1
sjspielman Feb 23, 2026
063b562
new fig sizing style
sjspielman Feb 23, 2026
2b3f02b
respond to PR reviews
sjspielman Feb 23, 2026
0c4d0ce
permeabilized is indeed a word
sjspielman Feb 23, 2026
3361423
new line after #|
sjspielman Feb 24, 2026
36ad2d5
patchwork:: and distinct colors for spot qc plots, avoiding orange fo…
sjspielman Feb 24, 2026
1e9308e
border around H&E
sjspielman Feb 24, 2026
d8510f8
more ggplot theme more better
sjspielman Feb 24, 2026
2445ee0
Merge pull request #929 from AlexsLemonade/sjspielman/921-draft-filte…
sjspielman Feb 24, 2026
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
25 changes: 0 additions & 25 deletions .Rprofile
Original file line number Diff line number Diff line change
@@ -1,26 +1 @@
source("renv/activate.R")

# Set the repos using the renv.lock file
renv_json <- jsonlite::read_json("renv.lock")
renv_r_repos <- renv_json$R$Repositories

# Extract the names
repo_names <- purrr::flatten_chr(
purrr::map(renv_r_repos,
~ .x$Name)
)

# Extract the URLs
repo_urls <- purrr::flatten_chr(
purrr::map(renv_r_repos,
~ .x$URL)
)

# Set the repo names
names(repo_urls) <- repo_names

# Set the options
options(repos = repo_urls)

# Remove all these objects
rm(renv_json, renv_r_repos, repo_names, repo_urls)
118 changes: 98 additions & 20 deletions .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,79 +19,157 @@
- renv.lock
- requirements.txt
- current-modules.json
- .github/workflows/build-docker.yml

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
env:
REGISTRY_IMAGE: ccdl/training_rstudio
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- platform: linux/amd64
runner: ubuntu-latest
- platform: linux/arm64
runner: ubuntu-24.04-arm
runs-on: ${{ matrix.runner }}

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Prepare env variables
run: |
platform=${{ matrix.platform }}
echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV
- name: Check out the repo
uses: actions/checkout@v5

- name: Check that current-modules release-tag matches git tag
if: startsWith(github.ref, 'refs/tags/')
run: |
GIT_TAG=${GITHUB_REF#refs/tags/}
MODULES_TAG=$(jq -r '.release-tag' current-modules.json)
MODULES_TAG=$(jq -r '."release-tag"' current-modules.json)
if [ "$GIT_TAG" != "$MODULES_TAG" ]; then
echo "Error: current-modules.json release-tag ($MODULES_TAG) does not match git tag ($GIT_TAG)"
echo "Please update release-tag in current-modules.json to match the git tag (and modules, if needed), then update the GitHub release accordingly."
exit 1
fi

- name: Load 1Password secrets
uses: 1password/load-secrets-action@v2
uses: 1password/load-secrets-action@v3
with:
export-env: true
env:
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.TRAINING_OP_SERVICE_ACCOUNT_TOKEN }}
DOCKER_USER: ${{ secrets.OP_DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.OP_DOCKER_PASSWORD }}
ACTION_MONITORING_SLACK: ${{ secrets.OP_ACTION_MONITORING_SLACK }}

# Login to Dockerhub
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ env.DOCKER_USER }}
password: ${{ env.DOCKER_PASSWORD }}

# set up Docker build
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ccdl/training_rstudio
images: ${{ env.REGISTRY_IMAGE }}

# Build Docker image, push only on push events
- name: Build Docker image
id: build
uses: docker/build-push-action@v6
with:
push: ${{ github.event_name == 'push' }}
platforms: ${{ matrix.platform }}
outputs: type=image,push-by-digest=true,name-canonical=true
labels: ${{ steps.meta.outputs.labels }}
tags: ${{ env.REGISTRY_IMAGE }}
cache-from: type=registry,ref=${{ env.REGISTRY_IMAGE }}:buildcache-${{ env.PLATFORM_PAIR }}
cache-to: type=registry,ref=${{ env.REGISTRY_IMAGE }}:buildcache-${{ env.PLATFORM_PAIR }},mode=max

- name: Export digest
if: github.event_name == 'push'
run: |
mkdir -p ${{ runner.temp }}/digests
digest="${{ steps.build.outputs.digest }}"
touch "${{ runner.temp }}/digests/${digest#sha256:}"

- name: Upload digest
if: github.event_name == 'push'
uses: actions/upload-artifact@v4
with:
name: digests-${{ env.PLATFORM_PAIR }}
path: ${{ runner.temp }}/digests/*
if-no-files-found: error
retention-days: 1

merge:
Comment on lines +28 to +112

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}

Copilot Autofix

AI about 2 months ago

In general, the fix is to add an explicit permissions: block limiting GITHUB_TOKEN to the least privileges required. Since this workflow only checks out the code, uses Docker and external actions, and uploads/downloads artifacts, it does not need to write to the repository. The minimal safe default is permissions: contents: read at the workflow (root) level, which will apply to both build and merge jobs.

Concretely, in .github/workflows/build-docker.yml, add a top-level permissions: block after the name: and on: keys (or directly after on:/before env:) with contents: read. No jobs appear to require any other token scopes such as pull-requests, packages, or id-token. No imports or other code changes are needed; this is purely a YAML configuration adjustment.

Suggested changeset 1
.github/workflows/build-docker.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml
--- a/.github/workflows/build-docker.yml
+++ b/.github/workflows/build-docker.yml
@@ -21,6 +21,9 @@
       - current-modules.json
       - .github/workflows/build-docker.yml
 
+permissions:
+  contents: read
+
 env:
   REGISTRY_IMAGE: ccdl/training_rstudio
 jobs:
EOF
@@ -21,6 +21,9 @@
- current-modules.json
- .github/workflows/build-docker.yml

permissions:
contents: read

env:
REGISTRY_IMAGE: ccdl/training_rstudio
jobs:
Copilot is powered by AI and may make mistakes. Always verify output.
runs-on: ubuntu-latest
needs:
- build
# only merge the manifests and push on push events
if: github.event_name == 'push'
steps:
- name: Load 1Password secrets
uses: 1password/load-secrets-action@v3
with:
export-env: true
env:
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.TRAINING_OP_SERVICE_ACCOUNT_TOKEN }}
DOCKER_USER: ${{ secrets.OP_DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.OP_DOCKER_PASSWORD }}
ACTION_MONITORING_SLACK: ${{ secrets.OP_ACTION_MONITORING_SLACK }}

- name: Download digests
uses: actions/download-artifact@v4
with:
path: ${{ runner.temp }}/digests
pattern: digests-*
merge-multiple: true
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ env.DOCKER_USER }}
password: ${{ env.DOCKER_PASSWORD }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY_IMAGE }}
# each github tag will create a matching tag on dockerhub,
# with the most recent given the "latest" tag
# the most recent push to master will get an "edge" tag
tags: |
type=ref,event=tag
type=edge,branch=master

# Build Docker image, push only on push events
- name: Build Docker image
uses: docker/build-push-action@v5
with:
push: ${{ github.event_name == 'push' }}
tags: ${{ steps.meta.outputs.tags }}
cache-from: type=registry,ref=ccdl/training_rstudio:buildcache
cache-to: type=registry,ref=ccdl/training_rstudio:buildcache,mode=max
- name: Create manifest list and push
working-directory: ${{ runner.temp }}/digests
run: |
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
$(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *)

- name: Inspect image
run: |
docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${{ steps.meta.outputs.version }}

# If we have a failure, Slack us
- name: Report failure to Slack
if: ${{ github.event_name == 'push' }}
if: ${{ failure() }}
uses: ravsamhq/notify-slack-action@v2
with:
status: ${{ job.status }}
notify_when: "failure"
message_format: "Training build & push Docker workflow failed"
env:
SLACK_WEBHOOK_URL: ${{ env.ACTION_MONITORING_SLACK }}

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}
33 changes: 23 additions & 10 deletions .github/workflows/make-live.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,22 @@ jobs:
make-live:
# The type of runner that the job will run on
runs-on: ubuntu-latest
container:
image: ccdl/training_rstudio:edge

steps:
- name: Free disk space
run: |
sudo rm -rf /usr/local/lib/android
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf /usr/local/share/boost
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
# Print free disk space
df -h

# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout code
uses: actions/checkout@v4

- name: Configure git
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
git config --local user.email "actions@github.com"
git config --local user.name "GitHub Actions"

- name: Load 1Password secrets
uses: 1password/load-secrets-action@v2
with:
Expand All @@ -43,15 +45,26 @@ jobs:
env:
AWS_DEFAULT_REGION: us-east-1
run: |
aws s3 sync s3://ccdl-training-data/training-modules/ .
aws s3 sync s3://ccdl-training-data/training-modules/ . --no-progress

- name: Pull latest Docker image
run: |
docker pull ccdl/training_rstudio:edge

- name: Render notebooks
env:
RENDER_RMD: ${{ github.event.inputs.rendering }}
run: bash scripts/render-live.sh
run: |
docker run --rm \
--mount type=bind,source="$GITHUB_WORKSPACE",target=/training-modules \
-w /training-modules \
-e RENDER_RMD \
ccdl/training_rstudio:edge \
bash scripts/render-live.sh

# Make changes to pull request here
- name: Create PR with rendered notebooks
id: cpr
uses: peter-evans/create-pull-request@v6
with:
token: ${{ env.DOCS_BOT_GITHUB_TOKEN }}
Expand Down
37 changes: 27 additions & 10 deletions .github/workflows/render-rmds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,29 @@ on:
branches:
- master
paths:
- '**.Rmd'
- '!**-live.Rmd' # don't trigger for live-only changes
- '!**/exercise*.Rmd' # or exercise notebooks
- '!**/setup/**.Rmd' # or setup notebooks
- 'scripts/make-live.R'
- 'scripts/render-live.sh'
- ".github/workflows/render-rmds.yml"
- "**.Rmd"
- "!**-live.Rmd" # don't trigger for live-only changes
- "!**/exercise*.Rmd" # or exercise notebooks
- "!**/setup/**.Rmd" # or setup notebooks
- "scripts/make-live.R"
- "scripts/render-live.sh"

jobs:
test-render:
runs-on: ubuntu-latest
container:
image: ccdl/training_rstudio:edge

steps:
- name: Free disk space
run: |
sudo rm -rf /usr/local/lib/android
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf /usr/local/share/boost
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
# Print free disk space
df -h

- name: Checkout code
uses: actions/checkout@v4

Expand All @@ -36,8 +45,16 @@ jobs:
env:
AWS_DEFAULT_REGION: us-east-1
run: |
aws s3 sync s3://ccdl-training-data/training-modules/ .
aws s3 sync s3://ccdl-training-data/training-modules/ . --no-progress

- name: Pull latest Docker image
run: |
docker pull ccdl/training_rstudio:edge

- name: Render notebooks
run: bash scripts/render-live.sh
run: |
docker run --rm \
--mount type=bind,source="$GITHUB_WORKSPACE",target=/training-modules \
-w /training-modules \
ccdl/training_rstudio:edge \
bash scripts/render-live.sh
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ In practice, this means that you will not need to add individual R packages to t
To use the Docker image for development, pull from Docker Hub with:

```
docker pull --platform linux/amd64 ccdl/training_rstudio:edge
docker pull ccdl/training_rstudio:edge
```

To run the container and mount a local volume, use the following from the root of this repository:
Expand Down
22 changes: 11 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Build salmon from source in a separate image
FROM ubuntu:22.04 AS build
# matching base image from https://github.com/rocker-org/rocker-versioned2/blob/master/dockerfiles/r-ver_4.5.2.Dockerfile
FROM docker.io/library/ubuntu:noble AS build

# Build dependencies
RUN apt-get update -qq
Expand All @@ -15,6 +16,7 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
libdeflate-dev \
libisal-dev \
liblzma-dev \
libzstd-dev \
make \
pkg-config \
unzip \
Expand All @@ -29,7 +31,7 @@ RUN unzip awscliv2.zip
RUN ./aws/install

# Build salmon
ARG SALMON_VERSION=1.10.1
ARG SALMON_VERSION=1.10.3
RUN curl -LO https://github.com/COMBINE-lab/salmon/archive/refs/tags/v${SALMON_VERSION}.tar.gz
RUN tar xzf v${SALMON_VERSION}.tar.gz
RUN mkdir salmon-${SALMON_VERSION}/build
Expand All @@ -45,12 +47,12 @@ RUN cd fastp-${FASTP_VERSION} && \
make && make install

# Main image with Biocconductor and other tools
FROM bioconductor/bioconductor_docker:3.19 AS final
FROM bioconductor/bioconductor_docker:3.22 AS final
LABEL maintainer="ccdl@alexslemonade.org"

WORKDIR /rocker-build/

# Additonal dependencies for AWS runtime
# Additional dependencies for AWS runtime
RUN apt-get update -qq
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
glibc-source \
Expand All @@ -66,21 +68,19 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \

# Python packages
COPY requirements.txt requirements.txt
RUN pip install -r requirements.txt
RUN pip install -r requirements.txt --break-system-packages

# Use renv for R packages
WORKDIR /usr/local/renv
ENV RENV_CONFIG_CACHE_ENABLED=FALSE
RUN Rscript -e "install.packages('renv')"

# Temporary fix for broken(?) RSamtools package
RUN Rscript -e "install.packages('BiocManager'); BiocManager::install('Rsamtools')"

COPY renv.lock renv.lock
RUN Rscript -e "renv::restore()" \
rm -rf ~/.cache/R/renv && \
rm -rf /tmp/downloaded_packages && \
rm -rf /tmp/Rtmp*
RUN Rscript -e "options(pkgType='binary'); renv::restore(repos = c(CRAN = 'https://packagemanager.posit.co/cran/__linux__/noble/latest'))" \
&& rm -rf ~/.cache/R/renv \
&& rm -rf /tmp/downloaded_packages \
&& rm -rf /tmp/Rtmp*

# copy aws, salmon, and fastp binaries from the build image
COPY --from=build /usr/local/aws-cli/ /usr/local/aws-cli/
Expand Down
Loading