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

Bioconductor packages need to be re-detected for installation #365

Open
zkamvar opened this issue Nov 9, 2022 · 6 comments
Open

Bioconductor packages need to be re-detected for installation #365

zkamvar opened this issue Nov 9, 2022 · 6 comments
Assignees
Labels
enhancement New feature or request solution 💡 A temporary solution is in the comments

Comments

@zkamvar
Copy link
Contributor

zkamvar commented Nov 9, 2022

In the transformation of https://github.com/carpentries-incubator/bioc-intro in https://github.com/fishtree-attempt/bioc-intro:

> manage_deps()                                                                                                                                                                                 
ℹ Consent to use package cache providedSearching for and installing available dependencies
Done!ng R package dependencies ... 
Done!covering package dependencies ... 
* Copying packages into the cache ... Done!
* Resolving missing dependencies  ... 
The following package(s) were not installed successfully:

	[SummarizedExperiment]: package 'SummarizedExperiment' is not available
	[tidySummarizedExperiment]: package 'tidySummarizedExperiment' is not available

You may need to manually download and install these packages.Restoring any dependency versions
* The library is already synchronized with the lockfile.Recording changes in lockfile
* Lockfile written to '~/Documents/Carpentries/Git/carpentries/lesson-transition/sandpaper/carpentries-incubator/bioc-intro/renv/profiles/lesson-requirements/renv.lock'.

Solution

I believe the solution is to include bioconductor = TRUE in

renv::init(project = path, bare = TRUE, restart = FALSE, profile = profile)

That being said, I will have to see if that's going to affect non-bioconductor lessons.

@zkamvar zkamvar added the enhancement New feature or request label Nov 9, 2022
@zkamvar zkamvar self-assigned this Nov 9, 2022
@zkamvar
Copy link
Contributor Author

zkamvar commented Nov 9, 2022

Honestly, I am so dang embarrassed about this

@zkamvar
Copy link
Contributor Author

zkamvar commented Nov 10, 2022

I belive the problem is coming from the fact that renv_available_packages() does not include BioConductor repositories if it's not part of the "repos" option.

@zkamvar
Copy link
Contributor Author

zkamvar commented Nov 10, 2022

Note, that the above function is called in the cascade from renv_retrieve_missing_record() starting with renv::hydrate()

@zkamvar
Copy link
Contributor Author

zkamvar commented Nov 10, 2022

N.B. the error is coming from sandpaper:::callr_manage_deps() calling renv::hydrate() in our codebase:

sandpaper/R/utils-renv.R

Lines 256 to 259 in d94acec

if (needs_hydration) {
hydra <- renv::hydrate(packages = pkgs, library = renv_lib, update = FALSE,
project = path)
}

@zkamvar zkamvar changed the title Bioconductor packages not processed yet Bioconductor packages can not be bootstrapped yet Nov 15, 2022
@zkamvar
Copy link
Contributor Author

zkamvar commented Nov 15, 2022

N.B. I found that this is a bootstrapping problem. If we use a pattern like:

library(sandpaper)
manage_deps()
done <- work_with_cache()
renv::install("bioc::SummarizedExperiment")
renv::install("bioc::tidySummarizedExperiment")
done()
manage_deps()

Then things install correctly, so I might be able to catch those and try them with bioc, but there's no guarantee

zkamvar added a commit that referenced this issue Feb 14, 2023
This provides a second chance to install bioconductor packages that were
missed on the first pass by implementing the strategy in
<#365 (comment)>,
which is to prepend the package name with `bioc::` and re-run
`renv::install()`
@zkamvar zkamvar added the solution 💡 A temporary solution is in the comments label Feb 17, 2023
@zkamvar zkamvar changed the title Bioconductor packages can not be bootstrapped yet Bioconductor packages need to be re-detected for installation Feb 17, 2023
@zkamvar
Copy link
Contributor Author

zkamvar commented Feb 20, 2023

Note that renv::install() may not be the right solution. I get the feeling that renv::install() is replacing CRAN with RSPM, but in this case it is not the right solution because of the lag (see carpentries/actions#69)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request solution 💡 A temporary solution is in the comments
Projects
None yet
Development

No branches or pull requests

1 participant