[rkward-devel] rkwardtests package: done :-)

meik michalke Meik.Michalke at uni-duesseldorf.de
Thu Oct 7 15:41:06 UTC 2010


hi,

the recent SVN version of the rkwardtests package now works. 
rktest.makeplugintests() now has a new "testroot" element to specify the path 
to the test suite, as well as the wished for "append" and "test.id" elements.

speaking of potentially malicious code: i noticed that 
rktest.cleanRKTestSuite() (see internal functions) in it's current state can 
be quite dangerous. it deletes every file that is not a test standard file 
inside directories called getwd()/suite at id. fortunately, that caused it to 
stop before it would erase my $HOME when i tried rktest.makeplugintests() with 
an absolute path to the test suite file, before i made testroot mandatory. 
this should probably be revised to a more robust workflow, but with the added 
need for a testroot definition it's not a top priority issue at the moment.

try to install the package, load it, an run
 rktest.makeplugintests("a_testsuite.R", "/path/to/rkward/tests/")
 rktest.makeplugintests(c("suite_a.R", "suite_b.R"), "/path/to/rkward/tests/")
 rktest.makeplugintests(
   testsuites="a_testsuite.R",
   testroot= "/path/to/rkward/tests/",
   test.id=c("one.id", "anotherone"))
to test it!


Am Donnerstag, 7. Oktober 2010, 09:52:50 schrieb Thomas Friedrichsmeier:
> it seems you can rewrite that as
>   roxygen <- function () NULL

you're right, that works. i've changed that in SVN already and dropped the 
roxygen dependency.

> Also, with version 0.1-2 of roxygen, I can simply write
>   [in directory rpackages]
>   R CMD roxygen rkwardtests/

doesn't work for me, unfortunately -- it stops with a "command roxygen not 
found" error. i installed the package to local libs and they're ignored, 
although R_LIBS and R_LIBS_USER are set accordingly (when i start R itself, 
all packages are found). i figured i could use my time more productively if i 
just skipped the effort and stick with roxygenize() ;-) but if anyone has a 
hint how it could work from command line, i'm open to suggestions.

>   R CMD roxygen rkwardtests/ rkwardtests/
> to make it write the new .Rd files in place).

i actually avoid that on purpose to be able to diff pre and post change docs, 
if i desire to. but that's just me ;-)

> I think that could shorten your script, considerably.

hm, what do you mean? it would surely replace two "cp *.Rd" lines with one "R 
CMD" line (and shorten the R function to the system call), but not affect the 
remaining parts, would it?


viele grüße :: m.eik

-- 
  dipl. psych. meik michalke
  abt. f"ur diagnostik und differentielle psychologie
  institut f"ur experimentelle psychologie
  heinrich-heine-universit"at d"usseldorf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/rkward-devel/attachments/20101007/b977e62d/attachment.sig>


More information about the Rkward-devel mailing list