Giter Site home page Giter Site logo

drakepkg's People

Contributors

paulklemm avatar tiernanmartin avatar tmikolajczyk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

drakepkg's Issues

Cannot access files in inst/

While working within the drakepkg directory itself, it would be nice if I could make() plans that include filepaths in the inst/ directory.

That won't work because when a user installs the package, the sub-directories of inst/ are moved to the package root directory which breaks the filepaths included in the plan.

plans as data vs functions

I have been thinking about your question from ropensci/drake#471 (comment), and I feel more strongly about distributing plans as functions rather than datasets. The functions I have in mind would have all relevant calls to drake_plan(), evaluate_plan(), bind_plans(), etc. This encourages good practice since the generating code of the plan is important to have on hand, and it gives you flexibility for generating different versions of the same plan. Also, users of drakepkg can see how your plans are generated, and it could help them generate their own plans.

#' @title Get a simple plan
#' @description Generate the plan from `drake_plan()` and friends.
#' @export
#' @return a `drake` plan
#' @param n number of replicates
get_simple_plan <- function(n = 2){
  subplan1 <- drake_plan(x = a__) %>%
    evaluate_plan(wildcard = "a__", values = seq_len(n))
  subplan2 <- drake_plan(y = b__) %>%
    evaluate_plan(wildcard = "b__", values = seq_len(n))
  bind_plans(subplan1, subplan2)
}

Move report.Rmd?

I see that report.Rmd is in inst/doc, but this folder is deleted by the default RStudio build step; see r-lib/pkgbuild#58.

Does this not happen when you build this package? ๐Ÿ˜• Perhaps consider moving the report files to e.g. inst/reports? Thanks.

copy_pkg_files() shouldn't wipe out previous extdata/

... unless you want it to.

The default should probably be that plans/ and doc/ are overwritten every time but extdata/ only gets overwritten when the user tells the function to.

copy_pkg_files <- function(to = getwd(), 
                           overwrite_plans = TRUE, 
                           overwrite_doc = TRUE, 
                           overwrite_extdata = FALSE){
...
}

Alternative approach to reproducible research with `drakepkg`

@tiernanmartin Thanks for developing drakepkg! I found it 2 weeks ago when I was researching ways to package a drake workflow for a research project I plan to publish as a "research compendium" (according to the methods outlined by @benmarwick in rrtools).

I have since been working on an alternative to your approach which I have now uploaded to a fork of your repo here.

The main difference, I think, is that I also distribute the .drake/ directory with the package, so that users can check the consistency of the workflow with all its inputs and outputs and can check out intermediate results/targets, without having to re-run the analysis on their own computer. The package includes simple wrapper functions that are intended to lower the barrier for the user to interact with the analysis (e.g., just running reproduce_analysis() is enough to copy and check the analysis). I wrote a vignette that hopefully explains the procedure well.

I am interested in your thoughts on my approach. Thank you!

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.