codecheckers/codecheck

template codecheck.Rmd should "just work"

Opened this issue · 4 comments

sje30 commented

The template codecheck.Rmd is useful, but doesn't work out of the box ("make" will fail.) I think this is bad for us, as we can't even test that the template works.

I propose a simple change to create_codecheck_files() that will generate two pngs, called "codecheck-deleteme1.png" and "codecheck-deleteme2.png" in the root of the project. They can be included in the template manifest so that the template works. The manifest will then have comments to indicate the pngs should be deleted once the codecheck has started.

nuest commented

I have not used the template in the same way as you do yet. TBH, I had a hard time understanding how the Makefile (which moves files around, right?) and the code in the template interact. One of my main stumbling block was that copy_manifest_files(..) returns a result, and not just "copy went OK".

My approach would be to not attempt to make this bulletproof, but provide snippets that can help the author. In that sense, not being able to simply render the document could be a good thing, because it makes clear that the codechecker has to do something.

nuest commented

An actual useful reply:

What about not failing when the manifest is empty, but just putting out a warning, both in the console and within the document?

Or create_codecheck_files() creates a manifest with a file PLEASE_ADD_FILES_TO_THE_MANIFEST.txt and according impossible to overlook description.

sje30 commented

Thanks for the feedback, very helpful.

  1. codecheck/Makefile just renders the doc when "make all" is run. No copying of files. (I think that happened in v1 of the Makefile.)

  2. If the manifest is empty, I'd imagine many things would break, but I can test that.

  3. On my bike ride last night (ha!) I thought better solution might be to have a test mode that explicitly is used to test that everything works okay, and acts as a demo for novices.

  4. In coming months, I'd like the .Rmd to be as usable as possible to keep certs as consistent as possible.

  5. If its not understandable to you, I've failed!

nuest commented

I should have asked for help - I was probably confusing things with v1 of the Makefile.

🚲 💯 ❗

Re. 4: It would be good to have a stable "brand", yes.