Coder Social home page Coder Social logo

coffeecoop's People

Contributors

aammd avatar flodebarre avatar ken-a-thompson avatar lmguzman avatar richfitz avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

flodebarre

coffeecoop's Issues

new coffee money

People are still giving me money! Hopefully this stops soon,

Thor veen -- 40$
Megan Vaughan (spelling?) 20$

maker review

Seems a good a place as any to put this.

First up: it almost worked first time. This is the second independent maker project I've tried running (Will Cornwell made one a couple of weeks ago) and both ran first time on my foreign environment so that's nice. Everything else is gravy.

Issues I ran into:

  • you depended on more recent versions of dplyr/magrittr than I had installed. I should probably set up some ability to specify required version numbers, but then you probably don't even know what that was. But it turned out to be a good opportunity to dust off the package installation scripts, so now you can do:
maker::install_missing_packages()
maker::make()

and missing packages will get installed and everything runs. Adding missing_only=FALSE to this will install all packages that the project depends on (there's also a new option maker.install.missing.packages that will automatically try to install missing packages on startup, but I don't know how wise that is so it's not set by default).

  • you forgot to add SignupSheet/signuptable.tex as a dependency of PaymentSheet/payment.pdf; should be:
  PaymentSheet/payment.pdf:
    depends:
      - PaymentSheet/longtablepreamble.tex
      - SignupSheet/signuptable.tex
    command: render("PaymentSheet/payment.Rmd")
    quiet: true
  • you might like to use quiet: true as an option to targets to make them be quiet. This doesn't entirely work on ReportOnTheCoop/Report.pdf though as the PDFCROP output still gets printed. I think that C code that uses printf (rather than Rprintf) is uncatchable from R - I see this issue from some R/Python bridging.
  • I can add rmarkdown::render support in the same way as knitr works if that's how the cool kids are doing things these days. Can we chat about that some time?
  • It's possibly bad practice but I usually define read_csv <- function(...) read.csv(..., stringsAsFactors=FALSE) (it gets repeated a lot in different projects) so that I can avoid having to be reminded about that terrible default. That'd clean up the makerfile a bit.
  • There is some limited support for chaining in targets:
  consumption:
    command:
      - read.csv(file="coffee_database/consumption.csv",stringsAsFactors=FALSE)
      - fix_date(.)

(or with the other suggestion)

  consumption:
    command:
      - read_csv("coffee_database/consumption.csv")
      - fix_date(.)

these build extra rules so will be identical to what you have but with less typing. They're the most fragile feature though, so you might not want to go there. And they avoid the whole thing1, thing2 problem. I still haven't caught the big chaining buzz, but you're obviously a big fan.

  • there is some support for automatically generating the .gitignore file by filling it with all file-based targets, plus the .maker directory:
maker:::utility_gitignore(maker::maker())

(but I found a bug in this today so make sure you have the most recent version)

  • I can see that for rules like:
  info:
    command: read_csv(file="coffee_database/info.csv")

you might want to write:

  info:
    command: read_csv(file="coffee_database/{{target_name}}.csv")

or something (I presume that is where your twitter comments came from). I'll think a bit about this some more. My main hesitation is that it breaks the link from plain R commands quite a lot. I wish R had a natural string interpolation syntax.

  • I'm interested that you prefer using it as the make() function rather than making an object. That's not been how we've tended to use things here.
  • Check out global mode:
ls() # nothing
m <- maker::maker(envir=.GlobalEnv)
ls() # all your things!
info2 <- 1:10 # won't work: your things are read-only
head(info2) # maker will build it if it's not up to date
  • maker works quite well with travis:

travis.yml:

language: c

env:
  global:
    - CRAN: http://cran.rstudio.com
    - BOOTSTRAP_PANDOC: ""

script:
    - ./maker

before_install:
    - curl -OL http://raw.github.com/craigcitro/r-travis/master/scripts/travis-tool.sh
    - chmod 755 ./travis-tool.sh
    - ./travis-tool.sh bootstrap
    - ./travis-tool.sh install_r optparse
    - ./travis-tool.sh install_github richfitz/maker
    - Rscript -e 'maker::install_maker(".")'

install:
    - Rscript -e 'options(repos="http://cran.rstudio.com"); maker::install_missing_packages()'

(edit to correct the function name above sorry ๐Ÿ˜ฟ)

remake problem

Andrew..., I think we have a problem, I dont think remake is available for the latest version of R :(

Checking very old balances!

@aammd !!! how can I check the balance of someone that hasn't been active for a very long time? you don't keep the signup sheets from before because you put them on git ignore. I tried changing the consumption active drink function to 60 instead of 8 to change the threshold of active weeks, but that didn't seem to do much. any other idea?

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.