docopt / docopt.R

Command-line interface description language for R (http://docopt.org)
Other
210 stars 20 forks source link

Some noise from R about perl and regexp #9

Closed eddelbuettel closed 9 years ago

eddelbuettel commented 9 years ago

When running dratInsert.r, a little helper from littler, I noticed this:

R> doc <- "Usage: drat.r [-h] [--repo REPO] [--commit MSG] TARGZ...
+ -r --repo REPO      repository path to use [default: ~/git/drat]
+ -c --commit MSG     in github use, commit with MSG (default: no commit)
+ -h --help           show this help text"
R> opt <- docopt(doc)
perl is deprecated. Please use regexp instead
perl is deprecated. Please use regexp instead
Error in str_extract_all(.tokens, "<.*?>")[[1]] : subscript out of bounds
R> 

Ignore the third line, it is presumably due to me running the two commands in an interactive R session. But the perl is deprecated. Please use regexp instead seems to come from the guts of doctop().

Can you take a look? Come to think about it, this may just be an issue in how you call stringr.

eddelbuettel commented 9 years ago

PR #10 takes care of it:

edd@max:~/git$ R CMD build docopt-r 
* checking for file ‘docopt-r/DESCRIPTION’ ... OK
* preparing ‘docopt’:
* checking DESCRIPTION meta-information ... OK
* checking for LF line-endings in source and make files
* checking for empty or unneeded directories
* building ‘docopt_0.4.3.1.tar.gz’

edd@max:~/git$ R CMD INSTALL docopt_0.4.3.1.tar.gz 
* installing to library ‘/usr/local/lib/R/site-library’
* installing *source* package ‘docopt’ ...
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
* DONE (docopt)
edd@max:~/git$ dratInsert.r docopt_0.4.3.1.tar.gz -r ghrr-drat/ \
         -c "'docopt 0.4.3.1 9ad8dd2 git@github.com:eddelbuettel/docopt.R.git'"
Added and committed docopt_0.4.3.1.tar.gz plus PACKAGES files. Still need to push.

edd@max:~/git$ 

No more whining about perl(). Gotta love how Hadley pulls the rug under your feet :)

edwindj commented 9 years ago

Thanks for the fix!

I upload it asap (after checking) to CRAN.

Best,

Edwin

eddelbuettel commented 9 years ago

I have R-devel here. "They" seem to want more edits to Description these days. Running a quick check:

* checking CRAN incoming feasibility ... NOTE
Maintainer: ‘Edwin de Jonge <edwindjonge@gmail.com>’

License components with restrictions and base license permitting such:
  MIT + file LICENSE
File 'LICENSE':
  YEAR: 2015
  COPYRIGHT HOLDER: Vladimir Keleshev, Edwin de Jonge

The Title field should be in title case, current version then in title case:
‘Command-line interface specification language’
‘Command-Line Interface Specification Language’

The Date field is over a month old.
* checking package namespace information ... OK

The Date: is my editing oversight; you may get by with the one line to Title: then.

edwindj commented 9 years ago

on CRAN now, Thanks!