[Genabel-commits] r731 - www

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sat Jun 18 12:43:26 CEST 2011


Author: yurii
Date: 2011-06-18 12:43:25 +0200 (Sat, 18 Jun 2011)
New Revision: 731

Added:
   www/tutHowToPatch.html
Modified:
   www/index.php
Log:
added 'HOWTO patch' by Nicola Pirastu

Modified: www/index.php
===================================================================
--- www/index.php	2011-05-23 15:25:55 UTC (rev 730)
+++ www/index.php	2011-06-18 10:43:25 UTC (rev 731)
@@ -76,6 +76,11 @@
 How to install devel-version of GenABEL suite
 </a>
 </li>
+<li>
+<a href="tutHowToPatch.html">
+How to make a patch for a GenABEL suite package
+</a>
+</li>
 </ul>
 
 <p> 

Added: www/tutHowToPatch.html
===================================================================
--- www/tutHowToPatch.html	                        (rev 0)
+++ www/tutHowToPatch.html	2011-06-18 10:43:25 UTC (rev 731)
@@ -0,0 +1,101 @@
+<h3> 
+How to make a patch to GenABEL
+</h3> 
+<p></p> 
+<i> 
+by Nicola Pirastu
+</i> 
+<p></p> 
+
+OK, so you want to fix something that's not working in one of the
+GenABEL suite packages and don't know where to start. Actually it's easier
+than you think.
+<p></p> 
+
+The first thing you need to do is to download the last version of the
+GenABEL suite source code with the command:
+<p></p> 
+
+<pre>
+svn co svn://svn.r-forge.r-project.org/svnroot/genabel/pkg
+</pre>
+<p></p> 
+
+it is important to use 'co' (checkout) option and not export because otherwise
+the command 'diff' needed to make the patch will not work.
+<p></p> 
+
+You will now notice that a new directory has been created called './pkg'
+Inside you will find a directory for each package.
+<p></p> 
+
+You can find the source for each function in the corresponding package directory 
+in the R directory so for example the source for polygenic will be in 
+'./pkg/GenABEL/R/polygenic.R'.
+<p></p> 
+
+Now open the file you intend to fix and make all the changes you intend to make.
+Once you are done go to the 'pkg' directory and recompile the package you have 
+fixed using the command (assuming you made changes to the GenABEL package)
+<p></p> 
+
+<pre>
+R CMD INSTALL GenABEL
+</pre>
+<p></p> 
+
+Open R and check that you actually fixed the problem.
+If this is the case also run
+<p></p> 
+
+<pre>
+R CMD check GenABEL
+</pre>
+<p></p> 
+
+to verify that everything is working fine.
+If everything goes well you are ready to make the patch that can be
+sent to the maintainers.
+<p></p> 
+
+At this point it is important to update your version of the source
+code by going to the pkg directory and running:
+<p></p> 
+
+<pre>
+svn update
+</pre>
+<p></p> 
+
+This is important since it probably took you some time to make the patch and probably other changes have been made which could complicate the creation of the patch.
+<p></p> 
+
+Now it is time for the actual creation of the patch.
+From the root directory of the 'pkg' directory run
+<p></p> 
+
+<pre>
+svn diff ./pkg > patch_file_name
+</pre>
+<p></p> 
+
+This is your patch file.
+<p></p> 
+
+Now to check that it works fine, you could copy back the original
+version of the function (for example from an svn checkout in a
+temporary directory) and try if the patch works from the directory
+where you have created it with
+<p></p> 
+
+<pre>
+patch -p0 -i patch_file_name
+</pre>
+<p></p> 
+
+Rerun the 'R CMD' commands and re-check everything and you are ready to
+submit the patch file to the community. Don't forget to describe what
+you fixed (if possible including a bug number from the bug tracker)
+and maybe give an example of the new/improved functionality.
+<p></p> 
+


Property changes on: www/tutHowToPatch.html
___________________________________________________________________
Added: svn:mime-type
   + text/plain



More information about the Genabel-commits mailing list