jetpack

A friendly package manager for R

https://github.com/ankane/jetpack

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.2%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

A friendly package manager for R

Basic Info
  • Host: GitHub
  • Owner: ankane
  • License: other
  • Language: R
  • Default Branch: master
  • Size: 279 KB
Statistics
  • Stars: 242
  • Watchers: 6
  • Forks: 16
  • Open Issues: 0
  • Releases: 0
Created about 8 years ago · Last pushed over 1 year ago
Metadata Files
Readme Changelog License

README.md

Jetpack

:fire: A friendly package manager for R

  • Lightweight - adds just three files to your project
  • Designed for reproducibility - thanks to renv, no more global installs!
  • Works from both R and the command line

Inspired by Yarn, Bundler, and Pipenv

Build Status CRAN status

Installation

Install Jetpack

r install.packages("jetpack")

How It Works

Jetpack uses the DESCRIPTION file to store your project dependencies. It stores the specific version of each package in renv.lock. This makes it possible to have a reproducible environment. You can edit dependencies in the DESCRIPTION file directly, but Jetpack provides functions to help with this.

Getting Started

Open a project and run:

r jetpack::init()

Commands

Install

Install packages for a project

r jetpack::install()

This ensures all the right versions are installed locally. As dependencies change, collaborators should run this command to stay synced.

Be sure to prefix commands with jetpack::. Jetpack isn’t installed in your virtual environment, so library(jetpack) won’t work.

Add

Add a package

r jetpack::add("randomForest")

Add multiple packages

r jetpack::add(c("randomForest", "DBI"))

Add a specific version

r jetpack::add("DBI@1.2.0")

Add from GitHub or another remote source

r jetpack::add("plyr", remote="hadley/plyr")

Supports these remotes

Add from a specific tag, branch, or commit

r jetpack::add("plyr", remote="hadley/plyr@v1.8.4")

Add from a local source

r jetpack::add("plyr", remote="local::/path/to/plyr")

The local directory must have the same name as the package

Update

Update a package

r jetpack::update("randomForest")

For local packages, run this anytime the package code is changed

Update multiple packages

r jetpack::update(c("randomForest", "DBI"))

Update all packages

r jetpack::update()

Remove

Remove a package

r jetpack::remove("randomForest")

Remove multiple packages

r jetpack::remove(c("randomForest", "DBI"))

Remove remotes as well

r jetpack::remove("plyr", remote="hadley/plyr")

Check

Check that all dependencies are installed

r jetpack::check()

Outdated

Show outdated packages

r jetpack::outdated()

Source Control

Be sure to commit the files Jetpack generates to source control.

Bioconductor

For Bioconductor, add the BiocManager package first:

r jetpack::add("BiocManager")

Then add other packages:

r jetpack::add("Biobase", remote="bioc::release/Biobase")

Deployment

Server

Install Jetpack on the server and run:

r jetpack::install(deployment=TRUE)

Docker

Create init.R with:

r install.packages("jetpack") jetpack::install(deployment=TRUE)

And add it into your Dockerfile:

```Dockerfile FROM r-base

RUN apt-get update && apt-get install -qq -y --no-install-recommends \ libxml2-dev libssl-dev libcurl4-openssl-dev libssh2-1-dev

RUN mkdir -p /app WORKDIR /app

COPY init.R DESCRIPTION renv.lock ./ RUN Rscript init.R

COPY . .

CMD Rscript app.R ```

Heroku

For the R buildpack, create init.R with:

r install.packages("jetpack") jetpack::install(deployment=TRUE)

Alternatively, you can use Docker Deploys on Heroku.

Command Line

Jetpack can also be run from the command line. To install the CLI, run:

r jetpack::cli()

On Windows, add C:\ProgramData\jetpack\bin to your PATH. See instructions for how to do this.

All the Jetpack commands are now available

sh jetpack init jetpack install jetpack add randomForest jetpack add DBI@1.2.0 jetpack add plyr --remote=hadley/plyr jetpack update randomForest jetpack remove DBI jetpack check jetpack outdated

You can also use it to manage global packages

sh jetpack global add randomForest jetpack global update DBI jetpack global update jetpack global remove plyr jetpack global list jetpack global outdated

You can even use it to update itself

sh jetpack global update jetpack

For the full list of commands, use:

sh jetpack help

Upgrading

To upgrade, rerun the installation instructions.

History

View the changelog

Contributing

Everyone is encouraged to help improve this project. Here are a few ways you can help:

To get started with development and testing:

sh git clone https://github.com/ankane/jetpack.git cd jetpack

In R, do:

r install.packages("devtools") devtools::install_deps(dependencies=TRUE) devtools::test()

To test a single file, use:

r devtools::install() # to use latest updates devtools::test_active_file("tests/testthat/test-jetpack.R")

Owner

  • Name: Andrew Kane
  • Login: ankane
  • Kind: user
  • Location: San Francisco, CA

GitHub Events

Total
  • Issues event: 1
  • Watch event: 1
  • Push event: 18
Last Year
  • Issues event: 1
  • Watch event: 1
  • Push event: 18

Committers

Last synced: about 1 year ago

All Time
  • Total Commits: 488
  • Total Committers: 3
  • Avg Commits per committer: 162.667
  • Development Distribution Score (DDS): 0.004
Past Year
  • Commits: 20
  • Committers: 1
  • Avg Commits per committer: 20.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Andrew a****1@g****m 486
Kevin Ushey k****n@r****m 1
Caleb Jasik j****k 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 11 months ago

All Time
  • Total issues: 24
  • Total pull requests: 4
  • Average time to close issues: 6 months
  • Average time to close pull requests: 5 days
  • Total issue authors: 18
  • Total pull request authors: 2
  • Average comments per issue: 2.58
  • Average comments per pull request: 3.25
  • Merged pull requests: 2
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • kevinushey (3)
  • tblazina (2)
  • hadley (2)
  • jasikpark (2)
  • ankane (2)
  • edavidaja (1)
  • lunfel (1)
  • rockdeme (1)
  • FMKerckhof (1)
  • aleDsz (1)
  • stepds (1)
  • MilesMcBain (1)
  • artemklevtsov (1)
  • debuglevel (1)
  • dtm2451 (1)
Pull Request Authors
  • jasikpark (3)
  • kevinushey (1)
Top Labels
Issue Labels
waiting (3)
Pull Request Labels
waiting (1)

Packages

  • Total packages: 2
  • Total downloads:
    • cran 278 last-month
  • Total dependent packages: 0
    (may contain duplicates)
  • Total dependent repositories: 1
    (may contain duplicates)
  • Total versions: 35
  • Total maintainers: 1
proxy.golang.org: github.com/ankane/jetpack
  • Versions: 24
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 5.5%
Average: 5.6%
Dependent repos count: 5.8%
Last synced: 11 months ago
cran.r-project.org: jetpack

A Friendly Package Manager

  • Versions: 11
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 278 Last month
Rankings
Stargazers count: 1.8%
Forks count: 4.6%
Average: 20.5%
Dependent repos count: 23.8%
Dependent packages count: 28.7%
Downloads: 43.6%
Maintainers (1)
Last synced: 11 months ago

Dependencies

DESCRIPTION cran
  • desc >= 1.2.0 imports
  • docopt >= 0.4 imports
  • remotes >= 2.0.3 imports
  • renv >= 0.13.1 imports
  • packrat * suggests
  • testthat * suggests
  • withr * suggests
.github/workflows/build.yml actions
  • actions/checkout v4 composite
  • r-lib/actions/check-r-package v2 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite