Skip to content

Commit 1030e50

Browse files
committed
update action and dockerfile
1 parent 4853a90 commit 1030e50

File tree

4 files changed

+17
-87
lines changed

4 files changed

+17
-87
lines changed

.Rbuildignore

+1-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
^Meta$
66
(^|/)\.misty\.temp$
77
(^|/)results$
8-
^vignettes/mistySeurat.Rmd$
9-
^vignettes/mistySpatialExperiment.Rmd$
8+
^vignettes/mistyDataFormats.Rmd$
109
^LICENSE$
1110
^.*\.Rproj$
1211
^\.Rproj\.user$

.github/workflows/check-bioc.yml

+13-82
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,7 @@ on:
44
- master
55
- devel
66

7-
name: check-bioc3.16
8-
9-
## If you need to clear the cache of packages, update the number inside
10-
## cache-version as discussed at https://github.com/r-lib/actions/issues/86.
11-
## Note that you can always run a GHA test without the cache by using the word
12-
## "/nocache" in the commit message.
13-
env:
14-
cache-version: 'cache-v1'
7+
name: check-bioc
158

169
jobs:
1710
build-check:
@@ -23,9 +16,7 @@ jobs:
2316
fail-fast: false
2417
matrix:
2518
config:
26-
- { os: ubuntu-20.04, r: '4.2', bioc: '3.16', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest" }
27-
# - { os: macOS-latest, r: '4.2', bioc: '3.16'}
28-
# - { os: windows-latest, r: '4.2', bioc: '3.16'}
19+
- { os: ubuntu-latest, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest" }
2920
env:
3021
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
3122
RSPM: ${{ matrix.config.rspm }}
@@ -47,60 +38,22 @@ jobs:
4738
uses: r-lib/actions/setup-pandoc@v2
4839

4940
- name: Query dependencies
50-
run: |
51-
install.packages('remotes')
52-
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
53-
shell: Rscript {0}
54-
55-
- name: Cache R packages
56-
if: "!contains(github.event.head_commit.message, '/nocache') && runner.os != 'Linux'"
57-
uses: actions/cache@v2
58-
with:
59-
path: ${{ env.R_LIBS_USER }}
60-
key: ${{ env.cache-version }}-${{ runner.os }}-biocversion-${{ matrix.config.bioc }}-r-${{ matrix.config.r }}-${{ hashFiles('.github/depends.Rds') }}
61-
restore-keys: ${{ env.cache-version }}-${{ runner.os }}-biocversion-${{ matrix.config.bioc }}-r-${{ matrix.config.r }}-
62-
63-
- name: Cache R packages on Linux
64-
if: "!contains(github.event.head_commit.message, '/nocache') && runner.os == 'Linux' "
65-
uses: actions/cache@v2
41+
uses: r-lib/actions/setup-r-dependencies@v2
6642
with:
67-
path: /home/runner/work/_temp/Library
68-
key: ${{ env.cache-version }}-${{ runner.os }}-biocversion-${{ matrix.config.bioc }}-r-${{ matrix.config.r }}-${{ hashFiles('.github/depends.Rds') }}
69-
restore-keys: ${{ env.cache-version }}-${{ runner.os }}-biocversion-${{ matrix.config.bioc }}-r-${{ matrix.config.r }}-
43+
extra-packages: any::rcmdcheck
44+
needs: check
7045

7146
- name: Install Linux system dependencies
7247
if: runner.os == 'Linux'
7348
run: |
49+
Rscript -e 'install.packages("remotes")'
7450
sysreqs=$(Rscript -e 'cat("apt-get update -y && apt-get install -y", paste(gsub("apt-get install -y ", "", remotes::system_requirements("ubuntu", "20.04")), collapse = " "))')
7551
echo $sysreqs
7652
sudo -s eval "$sysreqs"
7753
7854
# SpatialExperiment (magick) dependency
7955
sudo apt-get install -y libmagick++-dev
8056
81-
- name: Install macOS system dependencies
82-
if: matrix.config.os == 'macOS-latest'
83-
run: |
84-
## Enable installing XML from source if needed
85-
brew install libxml2
86-
echo "XML_CONFIG=/usr/local/opt/libxml2/bin/xml2-config" >> $GITHUB_ENV
87-
88-
## Required to install magick as noted at
89-
## https://github.com/r-lib/usethis/commit/f1f1e0d10c1ebc75fd4c18fa7e2de4551fd9978f#diff-9bfee71065492f63457918efcd912cf2
90-
brew install imagemagick@6
91-
92-
## For textshaping, required by ragg, and required by pkgdown
93-
brew install harfbuzz fribidi
94-
95-
## For installing usethis's dependency gert
96-
brew install libgit2
97-
98-
- name: Install Windows system dependencies
99-
if: runner.os == 'Windows'
100-
run: |
101-
# Nothing needed
102-
shell: Rscript {0}
103-
10457
- name: Install BiocManager
10558
run: |
10659
message(paste('****', Sys.time(), 'installing BiocManager ****'))
@@ -109,7 +62,7 @@ jobs:
10962

11063
- name: Set BiocVersion
11164
run: |
112-
BiocManager::install(version = "${{ matrix.config.bioc }}", ask = FALSE)
65+
BiocManager::install(ask = FALSE)
11366
shell: Rscript {0}
11467

11568
- name: Install dependencies pass 1
@@ -140,8 +93,7 @@ jobs:
14093
tinytex::tlmgr_install("pdfcrop")
14194
14295
## For running the checks
143-
message(paste('****', Sys.time(), 'installing rcmdcheck and BiocCheck ****'))
144-
remotes::install_cran("rcmdcheck")
96+
message(paste('****', Sys.time(), 'installing BiocCheck ****'))
14597
BiocManager::install("BiocCheck")
14698
shell: Rscript {0}
14799

@@ -153,25 +105,13 @@ jobs:
153105
shell: Rscript {0}
154106

155107
- name: Run CMD check
156-
env:
157-
_R_CHECK_CRAN_INCOMING_: false
158-
run: |
159-
rcmdcheck::rcmdcheck(
160-
args = c("--no-build-vignettes", "--no-manual", "--timings"),
161-
build_args = c("--no-manual", "--no-resave-data"),
162-
error_on = "warning",
163-
check_dir = "check"
164-
)
165-
shell: Rscript {0}
166-
167-
## Might need an to add this to the if: && runner.os == 'Linux'
168-
- name: Reveal testthat details
169-
run: find . -name testthat.Rout -exec cat '{}' ';'
108+
uses: r-lib/actions/check-r-package@v2
109+
with:
110+
error-on: '"error"'
170111

171112
- name: Run BiocCheck
172113
run: |
173114
BiocCheck::BiocCheck(
174-
dir('check', 'tar.gz$', full.names = TRUE),
175115
`quit-with-status` = TRUE,
176116
`no-check-R-ver` = TRUE,
177117
`no-check-bioc-help` = TRUE
@@ -193,16 +133,14 @@ jobs:
193133
run: |
194134
git config --local user.email "[email protected]"
195135
git config --local user.name "GitHub Actions"
196-
# For Seurat only
197-
sudo apt-get install -y libhdf5-dev libgeos++-dev libgeos-3.8.0 libgeos-c1v5 libgeos-dev libgeos-doc
198136
shell: bash {0}
199137

200138
## Changing package deployment to make the necessary changes to the vignette files
201139
- name: Deploy package
202140
if: github.ref == 'refs/heads/master' && runner.os == 'Linux'
203141
run: |
204-
remotes::install_cran(c("pkgdown", "Seurat", "hdf5r"), upgrade = TRUE)
205-
BiocManager::install(c("progeny", "SpatialExperiment"), ask = FALSE)
142+
remotes::install_cran(c("pkgdown"), upgrade = TRUE)
143+
BiocManager::install(c("decoupleR", "SpatialExperiment"), ask = FALSE)
206144
207145
## modified from pkgdown::deploy_to_branch
208146
deploy_to_branch_mod <- function(pkg = ".", commit_message = pkgdown:::construct_commit_message(pkg),
@@ -285,10 +223,3 @@ jobs:
285223
push: true
286224
tags: tanevski/mistyr:devel
287225

288-
- name: Upload check results
289-
if: failure()
290-
uses: actions/upload-artifact@master
291-
with:
292-
name: ${{ runner.os }}-biocversion-${{ matrix.config.bioc }}-r-${{ matrix.config.r }}-results
293-
path: check
294-

Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ RUN apt-get install -y curl
1010
RUN Rscript -e 'install.packages("remotes")'
1111
RUN $(Rscript -e 'cat("apt-get install -y", paste(gsub("apt-get install -y ", "", remotes::system_requirements("ubuntu", "20.04"))))')
1212
RUN apt-get install -y ghostscript libmagick++-dev libhdf5-dev libgeos-c1v5
13-
RUN Rscript -e 'remotes::install_cran("BiocManager", ask = FALSE); BiocManager::install(version = "3.16", ask = FALSE)'
13+
RUN Rscript -e 'remotes::install_cran("BiocManager", ask = FALSE); BiocManager::install(ask = FALSE)'
1414
RUN Rscript -e 'remotes::install_deps(dependencies = TRUE, repos = BiocManager::repositories(), upgrade = "always")'
15-
RUN Rscript -e 'remotes::install_cran(c("Seurat", "rhdf5", "tinytex"), ask = FALSE)'
15+
RUN Rscript -e 'remotes::install_cran("tinytex", ask = FALSE)'
1616
RUN Rscript -e 'tinytex::install_tinytex(); tinytex::tlmgr_update(); tinytex::tlmgr_install("pdfcrop")'
1717

1818
RUN Rscript -e 'remotes::install_local(build_vignettes = TRUE)'

vignettes/mistyDataFormats.Rmd

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ spe.vs <- readRDS("visium_spe.rds")
9595
expression <- counts(spe.vs)
9696
9797
# deal with duplicate names
98-
symbols <- rowData(spe)$symbol
98+
symbols <- rowData(spe.vs)$symbol
9999
d.index <- which(duplicated(symbols))
100100
symbols[d.index] <- paste0(symbols[d.index],".1")
101101
rownames(expression) <- symbols

0 commit comments

Comments
 (0)