[prev in list] [next in list] [prev in thread] [next in thread] 

List:       bioc-devel
Subject:    [Bioc-devel] ExperimentHub packages offline
From:       Laurent Gatto via Bioc-devel <bioc-devel () r-project ! org>
Date:       2024-03-16 9:59:20
Message-ID: AM0PR03MB36350E02EB863278C28736E0912F2 () AM0PR03MB3635 ! eurprd03 ! prod ! outlook ! com
[Download RAW message or body]

Packages that use ExperimentHub to distribute date can use createHubAccessors() - \
here's the relevant section from `?createHubAccessors`:

     ‘createHubAccessors(pkgname, titles): ’ This helper is intended to
     be used by ExperimentHub package developers in their .onLoad()
     function in zzz.R. It generates and exports functions by resource
     name which allows the resource to be loaded with resource123() in
     addition to the standard method via the ExperimentHub interface,
     e.g., ehub[["EH123"]]. When 'metadata=TRUE' just the metadata are
     displayed, when 'metadata=FALSE' the full resource is loaded, e.g,
     resource123(metadata=TRUE). See vignette for more information.

This function however fails when trying to load a package without internet \
connectivity:

> library(depmap)
[...]
Cannot connect to ExperimentHub server, using 'localHub=TRUE' instead
Using 'localHub=TRUE'
  If offline, please also see BiocManager vignette section on offline use
snapshotDate(): 2024-03-11
Error: package or namespace load failed for ‘depmap’:
 .onLoad failed in loadNamespace() for 'depmap', details:
  call: FUN(X[[i]], ...)
  error: ‘rnai_19Q2’ not found in ExperimentHub

I would like to use something like `curl::has_internet()` in .onLoad() to first check \
if there's is connectivity before calling createHubAccessors(). 

Am I missing something here? Does anyone have any experience with similar issues?

Laurent


_______________________________________________
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic