Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mrc-ide/conan
:package::package::arrow_right::classical_building: Conan the Librarian :crossed_swords:
https://github.com/mrc-ide/conan
Last synced: about 2 months ago
JSON representation
:package::package::arrow_right::classical_building: Conan the Librarian :crossed_swords:
- Host: GitHub
- URL: https://github.com/mrc-ide/conan
- Owner: mrc-ide
- License: other
- Created: 2021-03-29T07:34:17.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-12-12T16:40:34.000Z (about 1 year ago)
- Last Synced: 2023-12-13T16:49:23.322Z (about 1 year ago)
- Language: R
- Homepage: https://mrc-ide.github.io/conan/
- Size: 1.27 MB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE
Awesome Lists containing this project
README
# conan
[![Project Status: Concept – Minimal or no implementation has been done yet, or the repository is only intended to be a limited example, demo, or proof-of-concept.](https://www.repostatus.org/badges/latest/concept.svg)](https://www.repostatus.org/#concept)
[![R-CMD-check](https://github.com/mrc-ide/conan/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/mrc-ide/conan/actions/workflows/R-CMD-check.yaml)
[![codecov.io](https://codecov.io/github/mrc-ide/conan/coverage.svg?branch=main)](https://app.codecov.io/github/mrc-ide/conan?branch=main)> For us, there is no spring. Just the wind that smells fresh before the storm
`conan` provides a light wrapper around [`pkgdepends`](https://r-lib.github.io/pkgdepends/) in order to create standalone libraries. Our use case is creating libraries for use with HPC systems. It is not as broad or designed for interactive use like [`renv`](https://rstudio.github.io/renv/articles/renv.html), [`packrat`](https://rstudio.github.io/packrat/) or [`pak`](https://rstudio.github.io/packrat/). Instead it tries to address the narrow problem of "*how do you install packages from diverse sources without necessarily already having your package installer present?*".
To solve this problem, create a standalone script that can install its own dependencies and then install a required set of packages:
```{r}
conan::conan(
"script",
c("cpp11",
"mrc-ide/dust",
"mrc-ide/mcstate@some-feature"))
```That will create a file like:
```{r, results = "asis", echo = FALSE}
txt <- readLines("script")
writeLines(c("```r", head(txt), "[... skip ...]", tail(txt), "```"))
```Then this script can be run from the command line:
```bash
./script lib
```(or on Windows `Rscript script lib`), which will create a library at path `lib`
```{r, include = FALSE}
unlink("script")
```## Dependency resolution
All the dependency resolution is done by [`pkgdepends`](https://r-lib.github.io/pkgdepends/). Use of the Remotes field in DESCRIPTION can create impossible installation situations, beware. In particular, if a package is installed from a CRAN-like repo and also via a `Remotes:` field in a package you are installing via a remotes-style reference, then you will get a "conflict" from pkgdepends.
## Installation
To install `conan`:
```r
remotes::install_github("mrc-ide/conan", upgrade = FALSE)
```## License
MIT © Imperial College of Science, Technology and Medicine