fertile icon indicating copy to clipboard operation
fertile copied to clipboard

make more recommendations about file structure

Open beanumber opened this issue 7 years ago • 4 comments

Improve proj_analyze() to make more (helpful) suggestions about where you should move your files.

beanumber avatar Oct 03 '18 14:10 beanumber

I've got a basic case_when() going here: https://github.com/beanumber/fertile/blob/master/R/fertile.R#L40

I would welcome advice from @hadley @jennybc about how to make this more robust and realistic.

Where should .Rmd files go? I tried to follow the advice here as best I could.

beanumber avatar Oct 05 '18 19:10 beanumber

I don't have anything super interesting to contribute re: "what goes where?". Some of the more exotic things ... it's hard to know whether to have an opinion, disregard, or merely report.

Have you run it on a few "legitimately" constructed projects to see how things look?

But in terms of implementation, it feels easier to maintain if this was an internal table of data, instead of code. I realize that is not trivial to do right now, since the form of the LHSs of the case_when() expressions vary. If you see a way to rephrase it, that might make it easier now and especially if someone wanted to overwrite or augment the built in opinions.

jennybc avatar Oct 06 '18 03:10 jennybc

@jennybc Right. So the idea behind using mime was to have a database of file extensions to check against, to make it a bit more scalable. But it's not a one-to-one mapping.

One thought is that if you are writing an R package, then you probably know at least somewhat what you are doing, so for example, we're not checking for .rd files, since those won't be generated in any other context.

Another issue is that you could legitimately have .R files in R/, data-raw/, and a few other places.

beanumber avatar Oct 11 '18 15:10 beanumber

Oh, and I have tried it on a few projects. But I would love additional contributions! #10

beanumber avatar Oct 11 '18 15:10 beanumber