swirldev / swirlify

:books: A toolbox for writing swirl courses
Other
63 stars 47 forks source link

Add yaml_writer.R to accommodate a simpler authoring workflow #7

Closed ncarchedi closed 10 years ago

ncarchedi commented 10 years ago

This pull request incorporates the yaml_writer.R script, which was originally composed by @WilCrofter. Any virtues of this new approach should be attributed to @WilCrofter. I accept credit for any and all flaws.

Some changes/additions have been made, including testit(from, to), which is compatible with the swirl/fromto development branch (not yet merged). Also, lesson meta data is stored in options() (see set_swirlify_options() in yaml_writer.R, so that it is globally available. This prevents the user from having to pass this information as arguments to the authoring functions (txt(), qmult(), etc).

Eventually, the code added here will be more tightly coupled with existing swirlify features. However, it works well as is and will serve our immediate needs by allowing for fast prototyping of new swirl content.

WilCrofter commented 10 years ago

Welcome back, Nick. We can share credit for flaws :-D. I'm not up to speed; do you understand the Travis failure?

ncarchedi commented 10 years ago

Ah, yes. It's because this branch depends on swirl 2.2.11, which only exists in branch swirl/fromto. I have swirl/fromto installed on my machine and the swirlify check passes.

WilCrofter commented 10 years ago

I understand. Thanks.

ncarchedi commented 10 years ago

@WilCrofter Rethinking my earlier response.

I added a version constraint to swirlify's swirl dependency (swirl (>= 2.2.11)) to enforce compatibility. Until 2.2.11 is available on CRAN, Travis builds will continue to fail, since they rely on install.packages() to install dependencies. I think it's more important to enforce compatibility than it is to have the Travis badge of honor. Removing Travis from swirlify until the package stabilizes some....

ncarchedi commented 10 years ago

Merging now, since everything seems to function well and this is all code additions, not modifications.

WilCrofter commented 10 years ago

@ncarchedi Makes sense.