Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add rworkflows #105

Closed
wants to merge 22 commits into from
Closed
Show file tree
Hide file tree
Changes from 4 commits
Commits
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
51 changes: 0 additions & 51 deletions .github/workflows/R-CMD-check.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-r@v2
with:
Expand Down
50 changes: 0 additions & 50 deletions .github/workflows/pkgdown.yaml
bschilder marked this conversation as resolved.
Show resolved Hide resolved

This file was deleted.

60 changes: 60 additions & 0 deletions .github/workflows/rworkflows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: rworkflows
'on':
push:
branches:
- main
- rworkflows
pull_request:
branches:
- main
- rworkflows
jobs:
rworkflows:
permissions:
contents: write
runs-on: ${{ matrix.config.os }}
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
container: ${{ matrix.config.cont }}
strategy:
fail-fast: ${{ false }}
matrix:
config:
- os: ubuntu-latest
bioc: devel
r: auto
cont: bioconductor/bioconductor_docker:devel
rspm: https://packagemanager.rstudio.com/cran/__linux__/latest/release
- os: ubuntu-latest
bioc: release
r: auto
cont: bioconductor/bioconductor_docker:latest
http-user-agent: 'release'
- os: macOS-latest
bioc: release
r: auto
cont: ~
rspm: ~
- os: windows-latest
bioc: release
r: auto
cont: ~
rspm: ~
steps:
- uses: neurogenomics/rworkflows@master
with:
run_bioccheck: ${{ true }}
run_rcmdcheck: ${{ true }}
as_cran: ${{ false }}
run_vignettes: ${{ true }}
has_testthat: ${{ true }}
run_covr: ${{ true }}
run_pkgdown: ${{ true }}
has_runit: ${{ false }}
has_latex: ${{ false }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run_docker: ${{ false }}
docker_user: username
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
runner_os: ${{ runner.os }}
cache_version: cache-v1
enable_act: ${{ false }}
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: anndataR
Title: AnnData interoperability in R
Version: 0.0.0.9000
Version: 0.99.0
Authors@R: c(
person("Robrecht", "Cannoodt", , "[email protected]", role = c("aut", "cre"),
comment = c(ORCID = "0000-0003-3641-729X", github = "rcannood")),
Expand Down Expand Up @@ -46,4 +46,4 @@ Config/Needs/website: pkgdown, tibble, knitr, rprojroot, stringr, readr,
Config/testthat/edition: 3
Encoding: UTF-8
Roxygen: list(markdown = TRUE, r6 = TRUE)
RoxygenNote: 7.2.3
RoxygenNote: 7.2.3.9000
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export(dummy_data)
export(from_Seurat)
export(from_SingleCellExperiment)
export(read_h5ad)
export(setup_conda)
export(to_HDF5AnnData)
export(to_InMemory)
export(to_Seurat)
Expand Down
12 changes: 12 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# anndataR 0.99.0

## New features

- Add `rworkflows` CI.
- Update *lint.yaml* to use `actions/checkout@v4` (which has less issues).
- New function `setup_conda` automatically installs miniconda
and sets up conda env: #97
- Change version to Bioc-recommended devel version: 0.99.0

# anndataR 0.1.0

## New features

bschilder marked this conversation as resolved.
Show resolved Hide resolved
Initial release of anndataR, providing support for working with AnnData objects in R.

Feature list:
Expand Down
29 changes: 29 additions & 0 deletions R/setup_conda.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#' Setup conda
#'
#' Install miniconda and setup a conda env to use python dependencies.
#' @inheritParams reticulate::install_miniconda
#' @inheritParams reticulate::py_install
#' @inheritDotParams reticulate::py_install
#' @returns Null
#'
#' @export
bschilder marked this conversation as resolved.
Show resolved Hide resolved
#' @examples
#' \dontrun{
#' setup_conda()
#' }
setup_conda <- function(path = reticulate::miniconda_path(),
update = TRUE,
force = FALSE,
packages = c("anndata", "scanpy"),
...){

requireNamespace("reticulate")
if(!reticulate::py_module_available(module = "anndata")){
reticulate::install_miniconda(path = path,
update = update,
force = force)
reticulate::py_install(packages = packages,
pip = TRUE,
...)
}
}
4 changes: 0 additions & 4 deletions _pkgdown.yml

This file was deleted.

67 changes: 67 additions & 0 deletions man/setup_conda.Rd
bschilder marked this conversation as resolved.
Show resolved Hide resolved

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.