Skip to content

GuidelinesForContributors

murphyk2 edited this page Jun 1, 2010 · 39 revisions
  1. summary Best practices to follow when contributing code to PMTK3

Adding Code

When you contribute code, please follow these guidelines

  * Please contribute demos and/or new functionality.
 * Follow the general Matlab programming style guidelines [http://www.cs.ubc.ca/~murphyk/Software/matlabTutorial/html/style.html here].
  * Follow the guidelines on writing demos [http://code.google.com/p/pmtk3/wiki/writingDemos here]. Then, when publishDemos() is called, it will  make nice web pages, such as those listed [http://code.google.com/p/pmtk3/wiki/Demos here], 
  * Use PMTKauthor, PMTKurl, PMTKdate tags so that your code is automatically detected by makeAuthorReport, which generates [http://code.google.com/p/pmtk3/wiki/contributingAuthors this page]
  * use the debugDemos.m command, which creates a list  [http://pmtk3.googlecode.com/svn/trunk/docs/debugReport.html like this], to make sure your demos keep working. 

Adding data sets

The PMTK3 loadData function automatically downloads required data sets from the pmtkdata web site. To ensure that this works for new data sets, please follow these guidelines:

  * Data sets are stored on the google code repository [http://code.google.com/p/pmtkdata/ here]. Each data set must live in in its own folder and have exactly one .mat file. Store any processing scripts and source data in this folder as well. 
  * The name of the .mat file and the folder must be the same. 
  * Each data set folder must have a foo-meta.txt file, where "foo" is the name of the data set. This file stores "meta" information used to generate [http://pmtkdata.googlecode.com/svn/trunk/dataTable.html this table].
  * Each line of the foo-meta.txt file begins with a % followed by a space, and contains a PMTK tag along with its data. [http://pmtkdata.googlecode.com/svn/trunk/bishop2class/bishop2class-meta.txt Here] is an example. 
  * Zip up the new folder, and add this zip file to the directory, or run the following command to do this automatically. The zip file must  have the same name as the data set as well. 
  * The [http://pmtkdata.googlecode.com/svn/trunk/refreshZipFiles.m refreshZipfiles] function automatically excludes.svn directories. If you are zipping up a folder manually, make sure not to include the svn info, either by doing this before you check the folder in, or by running {{{ svn export }}}.
  * Finally check the folder in and test auto-downloding with {{{loadData('foo') }}} making sure the folder you just created is not on your MATLAB path. 
Clone this wiki locally