Browse Source

CV: cleaned up doc

Lacey Sanderson 11 years ago
parent
commit
dda046bebb

+ 18 - 28
tripal_cv/api/tripal_cv.api.inc

@@ -1,7 +1,12 @@
 <?php
+/**
+ * @file
+ * This module provides a set of functions to simplify working with
+ * controlled vocabularies.
+ */
 
 /**
- * @defgroup tripal_cv_api Ccontrolled Vocabulary API
+ * @defgroup tripal_cv_api Controlled Vocabulary API
  * @ingroup tripal_api
  * This module provides a set of functions to simplify working with
  * controlled vocabularies.  Most of the API functions deal with retrieving
@@ -17,7 +22,7 @@
  */
 
 /**
- * Purpose: To retrieve a chado controlled vocabulary object
+ * Retrieves a chado controlled vocabulary object
  *
  * @param $select_values
  *   An array meant to uniquely select a given controlled vocabulary
@@ -72,25 +77,6 @@ function tripal_cv_get_cv($select_values) {
 
 }
 
-// Purpose: To retrieve a chado cv object
-// @param $where_options
-//   @code
-//        array(
-//                          <column_name> => array(
-//                            'type' => <type of column: INT/STRING>,
-//                            'value' => <the vlaue you want to filter on>,
-//                            'exact' => <if TRUE use =; if FALSE use ~>,
-//                          )
-//        )
-// @endcode
-//
-// @return
-//   Chado cv object with all fields from the chado cv table
-//
-// @ingroup tripal_cv_api
-//
-//function tripal_cv_get_cv ($where_options)
-
 /**
  * Retrieve a cv given the cv name
  *
@@ -128,6 +114,7 @@ function tripal_cv_get_cv_by_id($cv_id) {
 
   return $r;
 }
+
 /**
  * Retrieve the cv id for the specified CV by name
  *
@@ -154,8 +141,6 @@ function tripal_cv_get_cv_id($cv_name) {
  * Create an options array to be used in a form element which provides a
  * list of all chado cvs
  *
- * NOTE: This function is deprecated as of Tripal v1.0
- *
  * @return
  *   An array(cv_id => name) for each cv in the chado cv table
  *
@@ -173,6 +158,7 @@ function tripal_cv_get_cv_options() {
   return $options;
 
 }
+
 /**
  * Retrieve a chado cvterm object with a given name
  *
@@ -196,6 +182,7 @@ function tripal_cv_get_cvterm_by_id($cvterm_id) {
   }
   return $r[0];
 }
+
 /**
  * Retrieve a chado cvterm object with a given name
  *
@@ -243,7 +230,7 @@ function tripal_cv_get_cvterm_by_name($name, $cv_id = NULL, $cv_name = 'tripal')
     return FALSE;
   }
   if (count($r) > 1) {
-    tripal_report_error('tripal_cv', TRIPAL_ERROR, 
+    tripal_report_error('tripal_cv', TRIPAL_ERROR,
       "Cannot find a unique term for the term '%name' in the vocabulary '%cv'. Multiple entries exist for this name",
       array('%name' => $name, '%cv' => $cv_name ? $cv_name : $cv_id));
     return FALSE;
@@ -304,6 +291,7 @@ function tripal_cv_get_cvterm_by_synonym($synonym, $cv_id = NULL, $cv_name = 'tr
   $cvterm = chado_select_record('cvterm', array('*'), $values, $options);
   return $cvterm[0];
 }
+
 /**
  * Create an options array to be used in a form element
  *   which provides a list of all chado cvterms
@@ -427,7 +415,9 @@ function tripal_cv_add_cv($name, $definition) {
 }
 
 /**
- *  Add's a CV term to the cvterm table.  If the parent CV does not exist then
+ *  Add's a CV term to the cvterm table.
+ *
+ *  If the parent CV does not exist then
  *  that too is added to the CV table.  If the cvterm is a relationship term
  *  then the $is_relationship argument should be set.  The function will try
  *  to first find the relationship in the relationship ontology for updating and
@@ -755,8 +745,9 @@ function tripal_cv_add_cvterm($term, $defaultcv = '_global', $is_relationship =
 
 /**
  * This function allows other modules to programatically
- * submit an ontology for loading into Chado.  This function
- * will add a job to the Jobs subsystem for parsing the ontology.
+ * submit an ontology for loading into Chado.
+ *
+ * This function will add a job to the Jobs subsystem for parsing the ontology.
  * You can either pass a known OBO ID to the function or the URL
  * or full path the the ontology file.  If a URL or file name is
  * passed then the $obo_name argument must also be provided.  If
@@ -783,7 +774,6 @@ function tripal_cv_add_cvterm($term, $defaultcv = '_global', $is_relationship =
  *
  * @ingroup tripal_cv_api
  */
-
 function tripal_cv_submit_obo_job($obo_id = NULL, $obo_name = NULL, $obo_url = NULL, $obo_file = NULL) {
   global $user;
 

+ 4 - 1
tripal_cv/api/tripal_cv.schema.api.inc

@@ -1,4 +1,8 @@
 <?php
+/**
+ * @file
+ * Describes some chado tables to the tripal schema api
+ */
 
 /**
  * Implements hook_chado_schema_v1_2_tripal_obo_temp()
@@ -11,7 +15,6 @@
  *    An array describing the 'tripal_obo_temp' table
  *
  * @ingroup tripal_chado_v1.2_schema_api
- *
  */
 function tripal_cv_chado_schema_v1_2_tripal_obo_temp() {
   $schema = array(

+ 2 - 3
tripal_cv/includes/charts.inc

@@ -1,5 +1,4 @@
 <?php
-
 /**
  * @file
  * Tripal API for generating a Google Chart of count data
@@ -123,7 +122,7 @@
  * With these three components (materialized view, a 'div' box with proper CSS class and ID, and a hook_cv_chart)
  * a chart will be created on the page.  There is no need to call this function directly.
  *
- * @ingroup tripal_cv
+ * @ingroup tripal_cv_api
  */
 function tripal_cv_chart($chart_id) {
   // parse out the tripal module name from the chart_id to find out
@@ -183,7 +182,7 @@ function tripal_cv_chart($chart_id) {
   * @return
   *   An array that has the settings needed for Google Charts to creat the chart.
   *
-  * @ingroup tripal_cv
+  * @ingroup tripal_cv_api
   */
 function tripal_cv_count_chart($cnt_table, $fk_column,
   $cnt_column, $filter = NULL, $title = '', $type = 'p3', $size='300x75') {

+ 23 - 22
tripal_cv/includes/cv_form.inc

@@ -1,6 +1,11 @@
 <?php
 /**
- * Purpose: Provides the actual "Select CV" form on the Update/Delete Controlled
+ * @file
+ * Provides a form for creating & editing chado controlled vocabularies
+ */
+
+/**
+ * Provides the actual "Select CV" form on the Update/Delete Controlled
  *   Vocabulary page. This form also triggers the edit javascript
  * @todo Modify this form to use Drupal AJAX
  *
@@ -68,12 +73,11 @@ function tripal_cv_cv_edit_form($form, &$form_state) {
   }
   return $form;
 }
+
 /**
+ * Form to add contolled vocabularies
  *
- * @param $form
- * @param $form_state
- *
- * @ingroup tripal_db
+ * @ingroup tripal_cv
  */
 function tripal_cv_cv_add_form($form, $form_state) {
 
@@ -87,13 +91,11 @@ function tripal_cv_cv_add_form($form, $form_state) {
   );
   return $form;
 }
+
 /**
+ * Form fields in common between the cv add & edit form.
  *
- * @param $form
- * @param $form_state
- * @param $cv_id
- *
- * @ingroup tripal_db
+ * @ingroup tripal_cv
  */
 function tripal_cv_add_cv_form_fields(&$form, $form_state, $cv_id = NULL) {
 
@@ -136,28 +138,24 @@ function tripal_cv_add_cv_form_fields(&$form, $form_state, $cv_id = NULL) {
 
 /**
  * Validation fucntion for tripal_cv_cv_add_form
- * @param $form
- * @param $form_state
  *
  * @ingroup tripal_cv
  */
 function tripal_cv_cv_add_form_validate($form, &$form_state) {
   tripal_cv_form_fields_validate($form, $form_state);
 }
+
 /**
  * Validation fucntion for tripal_cv_cv_edit_form
- * @param unknown_type $form
- * @param unknown_type $form_state
  *
  * @ingroup tripal_cv
  */
 function tripal_cv_cv_edit_form_validate($form, &$form_state) {
   tripal_cv_form_fields_validate($form, $form_state);
 }
+
 /**
- * Genetic validation form for shared fields of both the edit and add forms
- * @param $form
- * @param $form_state
+ * Generic validation form for shared fields of both the edit and add forms
  *
  * @ingroup tripal_cv
  */
@@ -174,10 +172,11 @@ function tripal_cv_form_fields_validate($form, &$form_state) {
     form_set_error('name', 'The vocabulary name must be unique');
   }
 }
+
 /**
+ * Submit cv add form
  *
- * @param $form
- * @param $form_state
+ * @ingroup tripal_cv
  */
 function tripal_cv_cv_add_form_submit($form, &$form_state) {
 
@@ -196,10 +195,11 @@ function tripal_cv_cv_add_form_submit($form, &$form_state) {
     drupal_set_message(t("Failed to add controlled vocabulary."));
   }
 }
+
 /**
+ * Submit cv edit form
  *
- * @param unknown_type $form
- * @param unknown_type $form_state
+ * @ingroup tripal_cv
  */
 function tripal_cv_cv_edit_form_submit($form, &$form_state) {
   $name  = array_key_exists('name', $form_state['values'])       ? trim($form_state['values']['name']) : '';
@@ -235,6 +235,7 @@ function tripal_cv_cv_edit_form_submit($form, &$form_state) {
 
 /**
  * Ajax callback for the tripal_cv_form
+ *
  * @ingroup tripal_cv
  */
 function tripal_cv_edit_form_ajax($form, $form_state) {
@@ -259,4 +260,4 @@ function tripal_cv_edit_form_ajax($form, $form_state) {
   //drupal_set_message('<pre>' . print_r($elements, TRUE) . '</pre>', "status");
 
   return $elements;
-}
+}

+ 21 - 17
tripal_cv/includes/cvterm_form.inc

@@ -1,9 +1,13 @@
 <?php
+/**
+ * @file
+ * Provides a form for creating & editing chado controlled vocabularies
+ */
 
 /**
+ * Form for editing cvterms
  *
- * @param $form
- * @param $form_state
+ * @ingroup tripal_cv
  */
 function tripal_cv_cvterm_edit_form($form, &$form_state) {
 
@@ -122,10 +126,11 @@ function tripal_cv_cvterm_edit_form($form, &$form_state) {
   }
   return $form;
 }
+
 /**
+ * Form for adding cvterms
  *
- * @param $form
- * @param $form_state
+ * @ingroup tripal_cv
  */
 function tripal_cv_cvterm_add_form($form, &$form_state) {
   $cv_id = 0;
@@ -162,12 +167,9 @@ function tripal_cv_cvterm_add_form($form, &$form_state) {
 }
 
 /**
+ * Form fields in common between add/edit forms
  *
- * @param $form
- * @param $form_state
- * @param $cv_id
- *
- * @ingroup tripal_db
+ * @ingroup tripal_cv
  */
 function tripal_cv_add_cvterm_form_fields(&$form, $form_state, $cv_id = 0, $cvterm_name = '') {
 
@@ -258,9 +260,9 @@ function tripal_cv_add_cvterm_form_fields(&$form, $form_state, $cv_id = 0, $cvte
 }
 
 /**
+ * Validate cvterm edit form
  *
- * @param $form
- * @param $form_state
+ * @ingroup tripal_cv
  */
 function tripal_cv_cvterm_edit_form_validate($form, &$form_state) {
   $cv_id = array_key_exists('cv_id', $form_state['values']) ? $form_state['values']['cv_id'] : '';
@@ -282,10 +284,11 @@ function tripal_cv_cvterm_edit_form_validate($form, &$form_state) {
     }
   }
 }
+
 /**
+ * Validate cv add form
  *
- * @param $form
- * @param $form_state
+ * @ingroup tripal_cv
  */
 function tripal_cv_cvterm_add_form_validate($form, &$form_state) {
   $cv_id = array_key_exists('cv_id', $form_state['values']) ? $form_state['values']['cv_id'] : '';
@@ -322,9 +325,8 @@ function tripal_cv_cvterm_add_form_validate($form, &$form_state) {
 
 }
 
-
 /**
- * Purpose: Adds terms to an existing controlled vocabulary
+ * Edits existing controlled vocabulary terms
  *
  * @ingroup tripal_cv
  */
@@ -407,9 +409,9 @@ function tripal_cv_cvterm_edit_form_submit($form, &$form_state) {
 }
 
 /**
+ * Adds new terms to an existing cv
  *
- * @param unknown_type $form
- * @param unknown_type $form_state
+ * @ingroup tripal_cv
  */
 function tripal_cv_cvterm_add_form_submit($form, &$form_state) {
   $cv_id = array_key_exists('cv_id', $form_state['values']) ? $form_state['values']['cv_id'] : '';
@@ -448,8 +450,10 @@ function tripal_cv_cvterm_add_form_submit($form, &$form_state) {
     drupal_set_message('Could not add term. Check Drupal recent logs for error messages.', 'error');
   }
 }
+
 /**
  * Ajax callback for the tripal_cv_form
+ *
  * @ingroup tripal_cv
  */
 function tripal_cv_cvterm_edit_form_ajax($form, $form_state) {

+ 10 - 4
tripal_cv/includes/cvtermpath_form.inc

@@ -1,5 +1,10 @@
 <?php
- /**
+/**
+ * @file
+ * Provides a form for updating controlled vocabularies path
+ */
+
+/**
  * Form for re-doing the cvterm path
  *
  * @ingroup tripal_cv
@@ -20,7 +25,7 @@ function tripal_cv_cvtermpath_form() {
     '#title' => t('Controlled Vocabulary/Ontology Name'),
     '#type' => 'select',
     '#options' => $cvs,
-    '#description' => t('The Chado cvtermpath is a database table that provides lineage for ontology terms 
+    '#description' => t('The Chado cvtermpath is a database table that provides lineage for ontology terms
       and is useful for quickly finding any ancestor parent of a term.  This table must be populated for each
       ontology.  Select a controlled vocabulary for which you would like to upate the cvtermpath.'),
   );
@@ -38,7 +43,8 @@ function tripal_cv_cvtermpath_form() {
   );
 
   return $form;
-} 
+}
+
 /**
  * Cvterm path form submit
  *
@@ -59,4 +65,4 @@ function tripal_cv_cvtermpath_form_submit($form, &$form_state) {
     tripal_add_job("Update cvtermpath: $cv->name", 'tripal_cv',
        'tripal_cv_update_cvtermpath', $job_args, $user->uid);
   }
-}
+}

+ 15 - 9
tripal_cv/includes/obo_loader.inc

@@ -1,4 +1,9 @@
 <?php
+/**
+ * @file
+ * Functions to aid in loading ontologies into the chado cv module
+ */
+
 /**
  * @defgroup tripal_obo_loader Ontology Loader
  * @ingroup tripal_cv
@@ -8,10 +13,10 @@
  */
 
 /**
- * Purpose: Provides the form to load an already existing controlled
+ * Provides the form to load an already existing controlled
  *  Vocabulary into chado
  *
-  * @ingroup tripal_obo_loader
+ * @ingroup tripal_obo_loader
  */
 function tripal_cv_obo_form($form, &$form_state) {
 
@@ -89,10 +94,10 @@ function tripal_cv_obo_form($form, &$form_state) {
 }
 
 /**
- * Purpose: The submit function for the load ontology form. It registers a
+ * The submit function for the load ontology form. It registers a
  *   tripal job to run the obo_loader.php script
  *
-   * @ingroup tripal_obo_loader
+ * @ingroup tripal_obo_loader
  */
 function tripal_cv_obo_form_submit($form, &$form_state) {
   $obo_id =  $form_state['values']['obo_id'];
@@ -211,8 +216,6 @@ function tripal_cv_load_update_cvtermpath($newcvs, $jobid) {
   }
 }
 
-
-
 /**
  *
  * @ingroup tripal_obo_loader
@@ -285,8 +288,10 @@ function tripal_cv_obo_quiterror($message) {
 
 }
 
-/*
+/**
+ *
  *
+ * @ingroup tripal_obo_loader
  */
 function tripal_cv_obo_load_typedefs($defaultcv, $newcvs, $default_db, $jobid) {
   $sql = "SELECT * FROM {tripal_obo_temp} WHERE type = 'Typedef' ";
@@ -333,6 +338,7 @@ function tripal_cv_obo_load_typedefs($defaultcv, $newcvs, $default_db, $jobid) {
   }
   return 1;
 }
+
 /**
  *
  * @ingroup tripal_obo_loader
@@ -927,6 +933,7 @@ function tripal_cv_obo_add_cvterm_dbxref($cvterm, $xref) {
 
 /**
  * Add property to CVterm
+ *
  * @ingroup tripal_obo_loader
  */
 function tripal_cv_obo_add_cvterm_prop($cvterm, $property, $value, $rank) {
@@ -991,9 +998,9 @@ function tripal_cv_obo_add_cvterm_prop($cvterm, $property, $value, $rank) {
   return TRUE;
 }
 
-
 /**
  * Add Database Reference
+ *
  * @ingroup tripal_obo_loader
  */
 function tripal_cv_obo_add_dbxref($db_id, $accession, $version='', $description='') {
@@ -1025,4 +1032,3 @@ function tripal_cv_obo_add_dbxref($db_id, $accession, $version='', $description=
   }
   return $result[0];
 }
-

+ 6 - 6
tripal_cv/includes/trees.inc

@@ -1,8 +1,7 @@
 <?php
-
 /**
  * @file
- * @todo Stephen describe this file
+ * Functions for rendering term tree's
  */
 
 /**
@@ -113,7 +112,7 @@ function tripal_cv_show_browser() {
  * With these three components (materialized view, a 'div' box with proper CSS class and ID, and a hook_cv_tree)
  * a tree will be created on the page.  There is no need to call this function directly.
  *
- * @ingroup tripal_cv
+ * @ingroup tripal_cv_api
  */
 function tripal_cv_tree($tree_id) {
   // parse out the tripal module name from the chart_id to find out
@@ -135,8 +134,8 @@ function tripal_cv_tree($tree_id) {
   return drupal_json($json_array);
 }
 
-
 /**
+ * Update the JSON tree describing a tree
  *
  * @ingroup tripal_cv
  */
@@ -237,7 +236,7 @@ function tripal_cv_init_tree($cv_id, $cnt_table = NULL, $fk_column = NULL,
 }
 
 /**
- *  Generates SON needed for jsTree -expanding a term to view children
+ *  Generates JSON needed for jsTree -expanding a term to view children
  *
  *  This function returns the JSON array for the jsTree
  *    jQuery code when expanding a term to view it's children.
@@ -329,7 +328,8 @@ function tripal_cv_get_term_children($cvterm_id, $cnt_table = NULL,
 }
 
 /**
- * @todo Stephen: describe what this function does
+ * Initilizes term tree browser
+ *
  * @ingroup tripal_cv
  */
 function tripal_cv_init_browser($cv_id) {

+ 7 - 1
tripal_cv/includes/tripal_cv_admin.inc

@@ -1,7 +1,13 @@
 <?php
+/**
+ * @file
+ * Provides administration of controlled vocabularies & their terms.
+ */
 
 /**
  * Provide landing page to the new admin pages
+ *
+ * @ingroup tripal_cv
  */
 function tripal_cv_admin_cv_listing() {
   $output = '';
@@ -37,4 +43,4 @@ function tripal_cv_admin_cv_listing() {
   }
 
   return $output;
-}
+}

+ 19 - 8
tripal_cv/tripal_cv.install

@@ -6,7 +6,10 @@
  */
 
 /**
+ * Implements hook_disable().
  * Disable default views when module is disabled
+ *
+ * @ingroup tripal_cv
  */
 function tripal_cv_disable() {
 
@@ -21,6 +24,8 @@ function tripal_cv_disable() {
 
 /**
  * Implementation of hook_requirements().
+ *
+ * @ingroup tripal_cv
  */
 function tripal_cv_requirements($phase) {
   $requirements = array();
@@ -36,6 +41,7 @@ function tripal_cv_requirements($phase) {
   }
   return $requirements;
 }
+
 /**
  * Implementation of hook_install().
  *
@@ -51,10 +57,11 @@ function tripal_cv_install() {
 
   // add defaults to the tables that correlate OBO files/references with a chado CV
   tripal_cv_add_obo_defaults();
-  
+
   // create the temp table we will use for loading OBO files
   tripal_cv_create_tripal_obo_temp();
 }
+
 /**
  * Implementation of hook_uninstall().
  *
@@ -68,14 +75,17 @@ function tripal_cv_uninstall() {
     db_query($sql);
   }
 }
+
 /**
+ * Creates a temporary table to store obo details while loading an obo file
  *
+ * @ingroup tripal_cv
  */
 function tripal_cv_create_tripal_obo_temp() {
   // the tripal_obo_temp table is used for temporary housing of records when loading OBO files
-  // we create it here using plain SQL because we want it to be in the chado schema but we 
-  // do not want to use the Tripal Custom Table API because we don't want it to appear in the 
-  // list of custom tables.  It needs to be available for the Tripal Chado API so we create it 
+  // we create it here using plain SQL because we want it to be in the chado schema but we
+  // do not want to use the Tripal Custom Table API because we don't want it to appear in the
+  // list of custom tables.  It needs to be available for the Tripal Chado API so we create it
   // here and then define it in the tripal_cv/api/tripal_cv.schema.api.inc
   if (!db_table_exists('chado.tripal_obo_temp')) {
     $sql = "
@@ -84,7 +94,7 @@ function tripal_cv_create_tripal_obo_temp() {
         stanza text NOT NULL,
         type character varying(50) NOT NULL,
         CONSTRAINT tripal_obo_temp_uq0 UNIQUE (id)
-      );      
+      );
     ";
     chado_query($sql);
     $sql = "CREATE INDEX tripal_obo_temp_idx0 ON {tripal_obo_temp} USING btree (id)";
@@ -93,6 +103,7 @@ function tripal_cv_create_tripal_obo_temp() {
     chado_query($sql);
   }
 }
+
 /**
  * Implementation of hook_schema().
  *
@@ -121,12 +132,13 @@ function tripal_cv_schema() {
     ),
     'primary key' => array('obo_id'),
   );
-  
+
 
   return $schema;
 }
 
 /**
+ * Add a materialized view of root terms for all chado cvs. This is needed for viewing cv trees
  *
  * @ingroup tripal_cv
  */
@@ -175,7 +187,6 @@ function tripal_cv_add_cv_root_mview() {
   tripal_add_mview($mv_name, 'tripal_cv', $schema, $sql, $comment);
 }
 
-
 /**
  * Add's defaults to the tripal_cv_obo table
  *
@@ -196,4 +207,4 @@ function tripal_cv_add_obo_defaults() {
   foreach ($ontologies as $o) {
     db_query("INSERT INTO {tripal_cv_obo} (name,path) VALUES (:name, :path)", array(':name' => $o[0], ':path' => $o[1]));
   }
-}
+}

+ 34 - 23
tripal_cv/tripal_cv.module

@@ -1,4 +1,9 @@
 <?php
+/**
+ * @file
+ * Provides functions for managing chado controlled vocabularies which are used ubiquitously
+ * throughout chado.
+ */
 
 /**
  * @defgroup tripal_cv Controlled Vocabulary Module
@@ -9,18 +14,16 @@
  * @}
  */
 
-require_once "includes/charts.inc";
-require_once "includes/trees.inc";
-require_once "includes/obo_loader.inc";
-require_once "api/tripal_cv.api.inc";
+require_once 'api/tripal_cv.api.inc';
+require_once 'api/tripal_cv.schema.api.inc';
 
-require_once "includes/cv_form.inc";
-require_once "includes/cvterm_form.inc";
-require_once "includes/cvtermpath_form.inc";
-
-require_once "includes/tripal_cv_admin.inc";
-
-require_once "api/tripal_cv.schema.api.inc";
+require_once 'includes/tripal_cv_admin.inc';
+require_once 'includes/charts.inc';
+require_once 'includes/trees.inc';
+require_once 'includes/obo_loader.inc';
+require_once 'includes/cv_form.inc';
+require_once 'includes/cvterm_form.inc';
+require_once 'includes/cvtermpath_form.inc';
 
 /**
  * Implements hook_init().
@@ -175,7 +178,7 @@ function tripal_cv_menu() {
     'access arguments' => array('administer controlled vocabularies'),
     'type' => MENU_CALLBACK,
   );
-  
+
   /*
    * Charts
   */
@@ -186,7 +189,7 @@ function tripal_cv_menu() {
     'access arguments' => array('access content'),
     'type' => MENU_CALLBACK
   );
-  
+
 
   /*
    * Menu items for working with CV Trees
@@ -236,8 +239,8 @@ function tripal_cv_menu() {
 }
 
 /**
- * Implements hook_help()
- * Purpose: Adds a help page to the module list
+ * Implements hook_help().
+ * Adds a help page to the module list
  */
 function tripal_cv_help ($path, $arg) {
   if ($path == 'admin/help#tripal_cv') {
@@ -246,6 +249,8 @@ function tripal_cv_help ($path, $arg) {
 }
 
 /**
+ * Implements hook_permission().
+ *
  *  Set the permission types that the chado module uses.  Essentially we
  *  want permissionis that protect creation, editing and deleting of chado
  *  data objects
@@ -262,20 +267,22 @@ function tripal_cv_permission() {
 }
 
 /**
- * Implements hook_views_api()
- * Purpose: Essentially this hook tells drupal that there is views support for
+ * Implements hook_views_api().
+ * Essentially this hook tells drupal that there is views support for
  *  for this module which then includes tripal_cv.views.inc where all the
  *  views integration code is
  *
  * @ingroup tripal_cv
  */
 function tripal_cv_views_api() {
-  return array('api' => 2.0);
+  return array('api' => 3.0);
 }
 
 /**
  * Implements hook_coder_ignore().
  * Defines the path to the file (tripal_cv.coder_ignores.txt) where ignore rules for coder are stored
+ *
+ * @ingroup tripal_cv
  */
 function tripal_cv_coder_ignore() {
   return array(
@@ -284,8 +291,11 @@ function tripal_cv_coder_ignore() {
   );
 }
 
-/*
+/**
+ * Implements hook_form_alter().
+ * Alter Forms
  *
+ * @ingroup tripal_cv
  */
 function tripal_cv_form_alter(&$form, &$form_state, $form_id) {
   if ($form_id == "tripal_cv_cvterm_form") {
@@ -302,14 +312,15 @@ function tripal_cv_form_alter(&$form, &$form_state, $form_id) {
 }
 
 /**
- *  We need to let drupal know about our theme functions and their arguments.
+ * Implements hook_theme().
+ * We need to let drupal know about our theme functions and their arguments.
  *  We create theme functions to allow users of the module to customize the
  *  look and feel of the output generated in this module
  *
- * @ingroup tripal_db
+ * @ingroup tripal_cv
  */
 function tripal_cv_theme($existing, $type, $theme, $path) {
- 
+
  $items = array(
     'tripal_cv_help' => array(
       'template' => 'tripal_cv_help',
@@ -319,4 +330,4 @@ function tripal_cv_theme($existing, $type, $theme, $path) {
   );
 
   return $items;
-}
+}

+ 12 - 1
tripal_cv/tripal_cv.views_default.inc

@@ -1,6 +1,13 @@
 <?php
+/**
+ * @file
+ * Describes default cv views
+ */
+
 /**
  * Implements hook_views_default_views().
+ *
+ * @ingroup tripal_cv
  */
 function tripal_cv_views_default_views() {
   $views = array();
@@ -18,6 +25,8 @@ function tripal_cv_views_default_views() {
 
 /**
  * Default Admin View for cv management
+ *
+ * @ingroup tripal_cv
  */
 function tripal_cv_defaultview_admin_cvs_listing() {
 
@@ -206,6 +215,8 @@ $handler->display->display_options['tab_options']['weight'] = '0';
 
 /**
  * Default Admin View for cvterm management
+ *
+ * @ingroup tripal_cv
  */
 function tripal_cv_defaultview_admin_cvterms_listing() {
 
@@ -443,4 +454,4 @@ $handler->display->display_options['menu']['context_only_inline'] = 0;
   */
 
   return $view;
-}
+}