Skip to content

Commit db57136

Browse files
authored
updates for bioc_3_13 (#36)
* fix for #18 (#19) - incorrect use of `$assay` replaced with `$data` for DatasetExperiment objects - specify SummarizedExperiment package as source of `rowData` and `colData` functions * fix for #20 (#21) data now gets passed through as intended when model_seq is being used. Allows seq_in to be used at the nth step in a sequence * fix for #20 (#23) data now gets passed through as intended when model_seq is being used. Allows seq_in to be used at the nth step in a sequence * Issue 22 seq in (#24) * add seq_in generics * add seq_in methods * update documentation * add as.code method (#25) produces a string of text that can be used to recreate the model/sequence/iterator * use correct input parameter names * Issue 27 citations (#29) - these methods scan over all inherited objects and generate a complete list of citations/libraries - a citations slot has been added to struct_class * use bibtex for citations The citations slot is now a list of bibentry objects to provide a more formalised method for storing citations and make them easer to use with bibliography packages etc. * fix for #18 (#19) - incorrect use of `$assay` replaced with `$data` for DatasetExperiment objects - specify SummarizedExperiment package as source of `rowData` and `colData` functions * fix for #20 (#21) data now gets passed through as intended when model_seq is being used. Allows seq_in to be used at the nth step in a sequence * fix for #20 (#23) data now gets passed through as intended when model_seq is being used. Allows seq_in to be used at the nth step in a sequence * Update NEWS
1 parent 926a330 commit db57136

File tree

8 files changed

+783
-538
lines changed

8 files changed

+783
-538
lines changed

.github/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.html
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
---
2+
name: Bug report or feature request
3+
about: Describe a bug you've seen or make a case for a new feature
4+
title: "[BUG] Your bug or feature request"
5+
labels: ''
6+
assignees: ''
7+
---
8+
9+
Please briefly describe your problem and what output you expect. If you have a question, please don't use this form. Instead, ask on <https://support.bioconductor.org/> using the appropriate tag(s) including one for this package.
10+
11+
## Context
12+
13+
Provide some context for your bug report or feature request. This could be the:
14+
15+
* link to raw code, example: https://github.com/lcolladotor/osca_LIIGH_UNAM_2020/blob/master/00-template.Rmd#L24-L28
16+
* link to a commit, example: https://github.com/lcolladotor/osca_LIIGH_UNAM_2020/commit/6aa30b22eda614d932c12997ba611ba582c435d7
17+
* link to a line of code inside a commit, example: https://github.com/lcolladotor/osca_LIIGH_UNAM_2020/commit/6aa30b22eda614d932c12997ba611ba582c435d7#diff-e265269fe4f17929940e81341b92b116R17
18+
* link to code from an R package, example: https://github.com/LieberInstitute/spatialLIBD/blob/master/R/run_app.R#L51-L55
19+
20+
## Code
21+
22+
Include the code you ran and comments
23+
24+
```R
25+
## prompt an error
26+
stop('hola')
27+
28+
## check the error trace
29+
traceback()
30+
```
31+
32+
## Small reproducible example
33+
34+
If you copy the lines of code that lead to your error, you can then run [`reprex::reprex()`](https://reprex.tidyverse.org/reference/reprex.html) which will create a small website with code you can then easily copy-paste here in a way that will be easy to work with later on.
35+
36+
```R
37+
## prompt an error
38+
stop('hola')
39+
#> Error in eval(expr, envir, enclos): hola
40+
41+
## check the error trace
42+
traceback()
43+
#> No traceback available
44+
```
45+
46+
47+
## R session information
48+
49+
Remember to include your full R session information.
50+
51+
```R
52+
options(width = 120)
53+
sessioninfo::session_info()
54+
```
55+
56+
The output of `sessioninfo::session_info()` includes relevant GitHub installation information and other details that are missed by `sessionInfo()`.

.github/workflows/check-bioc.yml

Lines changed: 270 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,270 @@
1+
## Read more about GitHub actions the features of this GitHub Actions workflow
2+
## at https://lcolladotor.github.io/biocthis/articles/biocthis.html#use_bioc_github_action
3+
##
4+
## For more details, check the biocthis developer notes vignette at
5+
## https://lcolladotor.github.io/biocthis/articles/biocthis_dev_notes.html
6+
##
7+
## You can add this workflow to other packages using:
8+
## > biocthis::use_bioc_github_action()
9+
##
10+
## Using GitHub Actions exposes you to many details about how R packages are
11+
## compiled and installed in several operating system.s
12+
### If you need help, please follow the steps listed at
13+
## https://github.com/r-lib/actions#where-to-find-help
14+
##
15+
## If you found an issue specific to biocthis's GHA workflow, please report it
16+
## with the information that will make it easier for others to help you.
17+
## Thank you!
18+
19+
## Acronyms:
20+
## * GHA: GitHub Action
21+
## * OS: operating system
22+
23+
on:
24+
push:
25+
pull_request:
26+
27+
name: R-CMD-check-bioc
28+
29+
## These environment variables control whether to run GHA code later on that is
30+
## specific to testthat, covr, and pkgdown.
31+
##
32+
## If you need to clear the cache of packages, update the number inside
33+
## cache-version as discussed at https://github.com/r-lib/actions/issues/86.
34+
## Note that you can always run a GHA test without the cache by using the word
35+
## "/nocache" in the commit message.
36+
env:
37+
has_testthat: 'true'
38+
run_covr: 'true'
39+
run_pkgdown: 'false'
40+
has_RUnit: 'false'
41+
cache-version: 'cache-v1'
42+
43+
jobs:
44+
build-check:
45+
runs-on: ${{ matrix.config.os }}
46+
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
47+
container: ${{ matrix.config.cont }}
48+
## Environment variables unique to this job.
49+
50+
strategy:
51+
fail-fast: false
52+
matrix:
53+
config:
54+
- { os: ubuntu-latest, r: '4.0', bioc: '3.12', cont: "bioconductor/bioconductor_docker:RELEASE_3_12", rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest" }
55+
- { os: macOS-latest, r: '4.0', bioc: '3.12'}
56+
- { os: windows-latest, r: '4.0', bioc: '3.12'}
57+
env:
58+
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
59+
RSPM: ${{ matrix.config.rspm }}
60+
NOT_CRAN: true
61+
TZ: UTC
62+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
63+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
64+
65+
steps:
66+
67+
## Set the R library to the directory matching the
68+
## R packages cache step further below when running on Docker (Linux).
69+
- name: Set R Library home on Linux
70+
if: runner.os == 'Linux'
71+
run: |
72+
mkdir /__w/_temp/Library
73+
echo ".libPaths('/__w/_temp/Library')" > ~/.Rprofile
74+
75+
## Most of these steps are the same as the ones in
76+
## https://github.com/r-lib/actions/blob/master/examples/check-standard.yaml
77+
## If they update their steps, we will also need to update ours.
78+
- name: Checkout Repository
79+
uses: actions/checkout@v2
80+
81+
## R is already included in the Bioconductor docker images
82+
- name: Setup R from r-lib
83+
if: runner.os != 'Linux'
84+
uses: r-lib/actions/setup-r@master
85+
with:
86+
r-version: ${{ matrix.config.r }}
87+
88+
## pandoc is already included in the Bioconductor docker images
89+
- name: Setup pandoc from r-lib
90+
if: runner.os != 'Linux'
91+
uses: r-lib/actions/setup-pandoc@master
92+
93+
- name: Query dependencies
94+
run: |
95+
install.packages('remotes')
96+
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
97+
shell: Rscript {0}
98+
99+
- name: Cache R packages
100+
if: "!contains(github.event.head_commit.message, '/nocache') && runner.os != 'Linux'"
101+
uses: actions/cache@v2
102+
with:
103+
path: ${{ env.R_LIBS_USER }}
104+
key: ${{ env.cache-version }}-${{ runner.os }}-biocversion-RELEASE_3_12-r-4.0-${{ hashFiles('.github/depends.Rds') }}
105+
restore-keys: ${{ env.cache-version }}-${{ runner.os }}-biocversion-RELEASE_3_12-r-4.0-
106+
107+
- name: Cache R packages on Linux
108+
if: "!contains(github.event.head_commit.message, '/nocache') && runner.os == 'Linux' "
109+
uses: actions/cache@v2
110+
with:
111+
path: /home/runner/work/_temp/Library
112+
key: ${{ env.cache-version }}-${{ runner.os }}-biocversion-RELEASE_3_12-r-4.0-${{ hashFiles('.github/depends.Rds') }}
113+
restore-keys: ${{ env.cache-version }}-${{ runner.os }}-biocversion-RELEASE_3_12-r-4.0-
114+
115+
- name: Install Linux system dependencies
116+
if: runner.os == 'Linux'
117+
run: |
118+
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 = " "))')
119+
echo $sysreqs
120+
sudo -s eval "$sysreqs"
121+
122+
- name: Install macOS system dependencies
123+
if: matrix.config.os == 'macOS-latest'
124+
run: |
125+
## Enable installing XML from source if needed
126+
brew install libxml2
127+
echo "XML_CONFIG=/usr/local/opt/libxml2/bin/xml2-config" >> $GITHUB_ENV
128+
129+
## Required to install magick as noted at
130+
## https://github.com/r-lib/usethis/commit/f1f1e0d10c1ebc75fd4c18fa7e2de4551fd9978f#diff-9bfee71065492f63457918efcd912cf2
131+
brew install imagemagick@6
132+
133+
## For textshaping, required by ragg, and required by pkgdown
134+
brew install harfbuzz fribidi
135+
136+
## See if this helps get RCurl installed
137+
## brew uninstall curl
138+
139+
- name: Install Windows system dependencies
140+
if: runner.os == 'Windows'
141+
run: |
142+
## Edit below if you have any Windows system dependencies
143+
shell: Rscript {0}
144+
145+
- name: Install BiocManager
146+
run: |
147+
message(paste('****', Sys.time(), 'installing BiocManager ****'))
148+
remotes::install_cran("BiocManager")
149+
shell: Rscript {0}
150+
151+
- name: Set BiocVersion
152+
run: |
153+
BiocManager::install(version = "${{ matrix.config.bioc }}", ask = FALSE)
154+
shell: Rscript {0}
155+
156+
- name: Install dependencies
157+
run: |
158+
## Try installing the package dependencies in steps. First the local
159+
## dependencies, then any remaining dependencies to avoid the
160+
## issues described at
161+
## https://stat.ethz.ch/pipermail/bioc-devel/2020-April/016675.html
162+
## https://github.com/r-lib/remotes/issues/296
163+
## Ideally, all dependencies should get installed in the first pass.
164+
165+
## Temporary for now due to https://github.com/ropensci/RefManageR/issues/79
166+
remotes::install_github("ropensci/bibtex")
167+
remotes::install_github("ropensci/RefManageR")
168+
remotes::install_github("cboettig/knitcitations")
169+
170+
## Pass #1 at installing dependencies
171+
message(paste('****', Sys.time(), 'pass number 1 at installing dependencies: local dependencies ****'))
172+
remotes::install_local(dependencies = TRUE, repos = BiocManager::repositories(), build_vignettes = TRUE, upgrade = TRUE)
173+
174+
## Pass #2 at installing dependencies
175+
message(paste('****', Sys.time(), 'pass number 2 at installing dependencies: any remaining dependencies ****'))
176+
remotes::install_local(dependencies = TRUE, repos = BiocManager::repositories(), build_vignettes = TRUE, upgrade = TRUE)
177+
178+
## For running the checks
179+
message(paste('****', Sys.time(), 'installing rcmdcheck and BiocCheck ****'))
180+
remotes::install_cran("rcmdcheck")
181+
BiocManager::install("BiocCheck")
182+
shell: Rscript {0}
183+
184+
- name: Install BiocGenerics
185+
if: env.has_RUnit == 'true'
186+
run: |
187+
## Install BiocGenerics
188+
BiocManager::install("BiocGenerics")
189+
shell: Rscript {0}
190+
191+
- name: Install covr
192+
if: github.ref == 'refs/heads/master' && env.run_covr == 'true' && runner.os == 'Linux'
193+
run: |
194+
remotes::install_cran("covr")
195+
shell: Rscript {0}
196+
197+
- name: Install pkgdown
198+
if: github.ref == 'refs/heads/master' && env.run_pkgdown == 'true' && runner.os == 'Linux'
199+
run: |
200+
remotes::install_cran("pkgdown")
201+
shell: Rscript {0}
202+
203+
- name: Session info
204+
run: |
205+
options(width = 100)
206+
pkgs <- installed.packages()[, "Package"]
207+
sessioninfo::session_info(pkgs, include_base = TRUE)
208+
shell: Rscript {0}
209+
210+
- name: Run CMD check
211+
env:
212+
_R_CHECK_CRAN_INCOMING_: false
213+
run: |
214+
rcmdcheck::rcmdcheck(
215+
args = c("--no-build-vignettes", "--no-manual", "--timings"),
216+
build_args = c("--no-manual", "--no-resave-data"),
217+
error_on = "warning",
218+
check_dir = "check"
219+
)
220+
shell: Rscript {0}
221+
222+
## Might need an to add this to the if: && runner.os == 'Linux'
223+
- name: Reveal testthat details
224+
if: env.has_testthat == 'true'
225+
run: find . -name testthat.Rout -exec cat '{}' ';'
226+
227+
- name: Run RUnit tests
228+
if: env.has_RUnit == 'true'
229+
run: |
230+
BiocGenerics:::testPackage()
231+
shell: Rscript {0}
232+
233+
- name: Run BiocCheck
234+
run: |
235+
BiocCheck::BiocCheck(
236+
dir('check', 'tar.gz$', full.names = TRUE),
237+
`quit-with-status` = TRUE,
238+
`no-check-R-ver` = TRUE,
239+
`no-check-bioc-help` = TRUE
240+
)
241+
shell: Rscript {0}
242+
243+
- name: Test coverage
244+
if: github.ref == 'refs/heads/master' && env.run_covr == 'true' && runner.os == 'Linux'
245+
run: |
246+
covr::codecov()
247+
shell: Rscript {0}
248+
249+
- name: Install package
250+
if: github.ref == 'refs/heads/master' && env.run_pkgdown == 'true' && runner.os == 'Linux'
251+
run: R CMD INSTALL .
252+
253+
- name: Deploy package
254+
if: github.ref == 'refs/heads/master' && env.run_pkgdown == 'true' && runner.os == 'Linux'
255+
run: |
256+
git config --local user.email "[email protected]"
257+
git config --local user.name "GitHub Actions"
258+
Rscript -e "pkgdown::deploy_to_branch(new_process = FALSE)"
259+
shell: bash {0}
260+
## Note that you need to run pkgdown::deploy_to_branch(new_process = FALSE)
261+
## at least one locally before this will work. This creates the gh-pages
262+
## branch (erasing anything you haven't version controlled!) and
263+
## makes the git history recognizable by pkgdown.
264+
265+
- name: Upload check results
266+
if: failure()
267+
uses: actions/upload-artifact@master
268+
with:
269+
name: ${{ runner.os }}-biocversion-RELEASE_3_12-r-4.0-results
270+
path: check

.travis.yml

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)