Closed joeroe closed 5 years ago
Yes, a warning sounds like a good alternative to a strict rule, thanks for the suggestion.
Another option here is to separate the package name from the repo name. For example @cboettig names his compendium pkgs simply 'compendium', and then has more flexible names for the repo: https://github.com/cboettig/noise-phenomena/blob/master/DESCRIPTION
I like that because it saves the user from making a decision they probably don't care about. CRAN is not the end point for these compendium pkgs, so it hardly matters what the pkg is called.
What do you think about that?
That sounds like a good idea. I can think of some reasons why you might want the package to have a descriptive name, e.g. if you want to library() it in another project, so maybe add it as an option rather than a default?
Chiming in to say:
Thanks for the feedback, we couldn't remember why we had this rule, and everything seems to work fine with upper and lower case mixed together, as you say. So we've removed that rule in https://github.com/benmarwick/rrtools/commit/caeb97f03772c5d3ce0ac71240c2315de147eeab
Thanks again!
create_compendium()
anduse_compendium()
refuse to make a package with uppercase characters in the name:This was added f2e3b43, to ensure compatibility with travis. But I'd make the case for allowing uppercase characters:
_
and-
—which would solve the above problem—aren't allowed in R package names..
is, but most modern R style guides recommend against using it as a word separator.A solution would be to throw a warning about the travis issue when creating a compendium with uppercase characters, rather than an error. The hard check could be moved to
use_travis()
.