Giter VIP home page Giter VIP logo

pbjob's Introduction

pbjob

License: MIT Project Status: WIP โ€“ Initial development is in progress, but there has not yet been a stable, usable release suitable for the public. Travis build status

Run R scripts with Pushbullet Alerts

Installation

remotes::install_github("noamross/pbjob")

Setup

To use this package you need to use Pushbullet on your mobile device or browser and to set up the RPushbullet package. Details in that package README, but in short, do this just once:

  • Sign up for Pushbullet and install it on your devices/browsers if you haven't already.
  • Log in to https://www.pushbullet.com/#settings, click on "Create Access Token", and get the token.
  • Run RPushbullet::pbSetup(<YOUR_ACCESS_TOKEN>) to create a config file and select your default devices to send messages to.
  • Restart R

Functions

The package has six functions, each of which has an accompanying RStudio Add-In

  • source_and_pb(script_path) runs a script and sends a Pushbullet alert when it is complete. An alert is also sent if the script errors. If script_path is NULL, the RStudio interface is used to select a file.
  • bg_and_pb() runs the script in a background session with the same alerts. It returns an r_process object.
  • job_and_pb() runs the script as an RStudio Job with the same alerts. Note that the progress bar will not display anything.
  • source_current_and_pb(), bg_current_and_pb() and job_current_and_pb() do the same but run the current active file in the RStudio editor. They're especially handy if you assign the Add-Ins keyboard shortcuts.

Note that background sessions are child processes of the R session in which they are launched, and will be killed is if you quit or restart R.


Please note that the 'pbjob' project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

pbjob's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

rsettlage lboller

pbjob's Issues

Better Jobs integration

The current Jobs integration is a little hacky, in that we write a temporary script and source that as a Job. This prevents returning the job environment, progress bars, and other options. If the API adds some hooks (as requested here: rstudio/rstudioapi#144), I could have tighter integration.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.