[Rd] non-R package development

Spencer Graves spencer.graves at structuremonitoring.com
Sat May 21 21:35:38 CEST 2011


p.s. I've used subversion successfully with LaTeX, R and Python.  I 
tried it with MS Word *.rtf format and found it was next to impossible, 
because any conflict produced an indecipherable diff file comparison.


########################
Hi, Barry:


       Thanks very much.


       Does the "python setup.py build" process include procedures for 
unit testing -- and preferably producing a manual of the module in *.pdf 
and other formats?  Where can I read more about this (beyond 
"http://docs.python.org/install/index.html")?


       I've been using Python almost daily for over 2 years now, but I 
my uses are mostly routine now, and I don't have easy access to a Python 
expert for questions like this.  Standard recommendations for Python 
suggests placing documentation in a certain format at the beginning of 
each *.py code file and function definition.  It also includes ending 
each *.py file with a section starting, 'if __name__ == "__main__":', 
when is a place where unit tests could be recorded, though I've been 
told that is not recommended.  I have not so far found anything that 
checks if all functions and arguments are documented and runs examples, 
like I get from "R CMD check".  (I routinely put unit tests in examples, 
sometimes with "\dontshow".  R experts have criticized me for suggesting 
people put unit tests in the examples sections.  I do it, because it's 
easy and useful.  At some point, I may try the "RUnit" package.)


       Thanks again,
       Spencer


On 5/21/2011 6:48 AM, Barry Rowlingson wrote:
> On Sat, May 21, 2011 at 2:04 AM, Spencer Graves
> <spencer.graves at structuremonitoring.com>  wrote:
>
>>       I routinely use the "R CMD check", etc., process with Subversion for
>> version control and collaborative development.  I've looked for similar
>> capabilities for other languages, so far without success.
>   Python has a similar package build system based around a directory
> structure with a 'setup.py' at its root - you may have seen this if
> youve ever installed a python package from source. This python script
> enables you to do things like 'python setup.py build' and 'python
> setup.py install' to build and install the package, as well as run
> tests, build distributable archives and so on. There's probably a way
> to get a boilerplate package structure all ready to start developing
> but I cant think what it is off the top of my head.
>
> SVN and most other version control systems will play nicely with
> text-based program development, so get checking in your python,
> matlab, and unix scripts. If LabVIEW has a binary format then you can
> normally check these in but you won't get meaningful 'diffs' out of
> the system to see what has changed between revisions.
>
> Barry



More information about the R-devel mailing list