lockedata / starters

R Package 📦 for initializing projects for various R activities :nut_and_bolt:
https://itsalocke.com/starters/
GNU General Public License v3.0
124 stars 16 forks source link

tic #111

Closed maelle closed 5 years ago

maelle commented 5 years ago

Expected to address #4 #5 #85

What's missing are the custom tic.R templates for training, analysis and basic projects.

codecov-io commented 5 years ago

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@3432d2e). Click here to learn what that means. The diff coverage is 30.37%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #111   +/-   ##
=========================================
  Coverage          ?   57.32%           
=========================================
  Files             ?       12           
  Lines             ?      635           
  Branches          ?        0           
=========================================
  Hits              ?      364           
  Misses            ?      271           
  Partials          ?        0
Impacted Files Coverage Δ
R/github.R 32.65% <0%> (ø)
R/external_setup.R 0% <0%> (ø)
R/utils.R 49.29% <100%> (ø)
R/use_readme.R 100% <100%> (ø)
R/createPackageProject.R 83.69% <57.14%> (ø)
R/createBasicProject.R 82.53% <72.72%> (ø)
R/createTrainingProject.R 96.59% <80%> (ø)
R/createAnalysisProject.R 96.87% <80%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 3432d2e...191e910. Read the comment docs.

maelle commented 5 years ago

Maybe the dirs could be less flexible, i.e. having analysis, data and outputs by default, and using the dirs arguments only for creating supplemental directories?

maelle commented 5 years ago

Note that the Travis activation stuff is interactive (but straightforward), so it can't be tested at the moment.

stephlocke commented 5 years ago

I think what I'd prefer to do is generate the tic and if their layout matches the default then we add stuff, otherwise we add a comment saying INSERT LOGIC HERE.

maelle commented 5 years ago

And does the rest of he infrastructure added in this PR look ok?

maelle commented 5 years ago

@stephlocke in createTrainingProject default folders are data, handouts, slides. Which one(s) would you assume contain stuff to knit? "slides" only or "handouts" too?

maelle commented 5 years ago

I almost created a helper function to knit all Rmd in a directory, for use in tic.R, before removing it because I do not want projects to depend on starters (package projects have starters in Suggests because of the get_project_health() function but that doesn't make me happy).

maelle commented 5 years ago

@stephlocke current questions

maelle commented 5 years ago

Examples of deployed report https://maelle.github.io/newtest.lockedata.starters/analysis1.html repo https://github.com/maelle/newtest.lockedata.starters

stephlocke commented 5 years ago

@stephlocke in createTrainingProject default folders are data, handouts, slides. Which one(s) would you assume contain stuff to knit? "slides" only or "handouts" too?

both - different render types tho

stephlocke commented 5 years ago
  • I've added the tic.R for analysis projects. I haven't added conditions on folders present because if there's no "analysis" folder then there's no report there so nothing happens. tic.R has comments. Is this fine? (and the name of the output directory is not important, it could be called anything, even if it does not exist things get deployed to gh-pages, I've just tried that)

Looks fine to me

maelle commented 5 years ago

I think rmarkdown::render Will automatically render the right format based on YAML info. Will finalize this PR tomorrow 🎉