Browse Source

Core: Cleaned up and added documentation

Lacey Sanderson 11 years ago
parent
commit
1b7fb44284

+ 40 - 37
tripal_core/api/get_FKs.php

@@ -1,22 +1,24 @@
 <?php
-// This script will add FK relatinsions to an existing schema API array for each 
-// Chado table.  It requires Chado is installed in a 'chado' schema of 
-// the drupal database.  It also requires existing schema hooks for 
-// version of Chado.  The goal is to use the output of this script to 
-// update the existing schema hooks.  Redirect the output of this script to 
-// a file and then replace the existing schema API include file (e.g. 
-// tripal_core.schema_v1.2.api.inc).  Be sure to check it before replacing
-
-// this script requires a single argument (-v) which is the Chado version
-//
-// example usage in drupal directory root:
-//
-// php ./sites/all/modules/tripal/tripal_core/api/get_FKs.php -v 1.11 > \
-//   ./sites/all/modules/tripal/tripal_core/apitripal_core.schema_v1.11.api.inc.new
-//
-// php ./sites/all/modules/tripal/tripal_core/api/get_FKs.php -v 1.2 > \
-//   ./sites/all/modules/tripal/tripal_core/api/tripal_core.schema_v1.2.api.inc.new
-
+/**
+ * @file
+ * This script will add FK relatinsions to an existing schema API array for each
+ * Chado table.  It requires Chado is installed in a 'chado' schema of
+ * the drupal database.  It also requires existing schema hooks for
+ * version of Chado.  The goal is to use the output of this script to
+ * update the existing schema hooks.  Redirect the output of this script to
+ * a file and then replace the existing schema API include file (e.g.
+ * tripal_core.schema_v1.2.api.inc).  Be sure to check it before replacing
+ *
+ * This script requires a single argument (-v) which is the Chado version.
+ *
+ * Example usage in drupal directory root:
+ *
+ * php ./sites/all/modules/tripal/tripal_core/api/get_FKs.php -v 1.11 > \
+ *   ./sites/all/modules/tripal/tripal_core/apitripal_core.schema_v1.11.api.inc.new
+ *
+ * php ./sites/all/modules/tripal/tripal_core/api/get_FKs.php -v 1.2 > \
+ *   ./sites/all/modules/tripal/tripal_core/api/tripal_core.schema_v1.2.api.inc.new
+ */
 
 $arguments = getopt("v:");
 
@@ -35,27 +37,28 @@ if (isset($arguments['v'])) {
 }
 
 /**
- *
+ * This function does the actual work of determining the foreign key relationships from
+ * the database and creating the schema file.
  */
 function get_chado_fk_relationships($version) {
 
   // convert the version to a form suitable for function names
   $v = $version;
   $v = preg_replace("/\./","_",$v);
- 
-  $tables = tripal_core_get_chado_tables(); 
+
+  $tables = tripal_core_get_chado_tables();
   $sql ="
     SELECT
-        tc.constraint_name, tc.table_name, kcu.column_name, 
+        tc.constraint_name, tc.table_name, kcu.column_name,
         ccu.table_name AS foreign_table_name,
-        ccu.column_name AS foreign_column_name 
-    FROM 
-        information_schema.table_constraints AS tc 
+        ccu.column_name AS foreign_column_name
+    FROM
+        information_schema.table_constraints AS tc
         JOIN information_schema.key_column_usage AS kcu ON tc.constraint_name = kcu.constraint_name
         JOIN information_schema.constraint_column_usage AS ccu ON ccu.constraint_name = tc.constraint_name
     WHERE constraint_type = 'FOREIGN KEY' AND tc.table_name=:table_name
   ";
-    
+
   // iterate through the tables and get the foreign keys
   print "<?php
 /* @file: This file contains default schema definitions for all chado v$version tables
@@ -73,7 +76,7 @@ function get_chado_fk_relationships($version) {
  * This API consists of a set of functions, one for each table in Chado.  Each
  * function simply returns a Drupal style array that defines the table.
  *
- * Because Drupal 6 does not handle foreign key (FK) relationships, however FK 
+ * Because Drupal 6 does not handle foreign key (FK) relationships, however FK
  * relationships are needed to for Tripal Views.  Therefore, FK relationships
  * have been added to the schema defintitions below.
  *
@@ -84,8 +87,8 @@ function get_chado_fk_relationships($version) {
  *   \$table_desc = tripal_core_get_chado_table_schema(\$table)
  *
  * where the variable \$table contains the name of the table you want to
- * retireve.  The tripal_core_get_chado_table_schema function determines the appropriate version of 
- * Chado and uses the Drupal hook infrastructure to call the appropriate 
+ * retireve.  The tripal_core_get_chado_table_schema function determines the appropriate version of
+ * Chado and uses the Drupal hook infrastructure to call the appropriate
  * hook function to retrieve the table schema.
  *
  * @}
@@ -98,15 +101,15 @@ function get_chado_fk_relationships($version) {
 
     // get the existing table array
     $table_arr = tripal_core_get_chado_table_schema($table);
-    
+
     if (empty($table_arr)) {
        print "ERROR: empty table definition $table\n";
        continue;
     }
-    
+
     // add the table name to the array
     $table_arr['table'] = $table;
-    
+
     // get the foreign keys and add them to the array
     $fks = db_query($sql, array(':table_name' => $table));
     foreach ($fks as $fk) {
@@ -116,23 +119,23 @@ function get_chado_fk_relationships($version) {
     }
     $tables_def[] = $table_arr;
   }
-  
+
   // now add in the referring tables and print
   foreach ($tables_def as $table_arr) {
     $table = $table_arr['table'];
-    
+
     // add in the referring tables
     $table_referring = array_unique($reffering[$table]);
     $table_arr['referring_tables'] = $table_referring;
-      
+
     // reformat the array to be more legible
     $arr = var_export($table_arr, 1);
     $arr = preg_replace("/\n\s+array/","array", $arr); // move array( to previous line
     $arr = preg_replace("/\n/","\n  ", $arr); // add indentation
     $arr = preg_replace("/true/","TRUE", $arr); // add indentation
     $arr = preg_replace("/false/","FALSE", $arr); // add indentation
-    $arr = preg_replace("/array \(/","array(", $arr); // add indentation      
-      
+    $arr = preg_replace("/array \(/","array(", $arr); // add indentation
+
       // print out the new Schema API function for this table
 print "/**
  * Implements hook_chado_schema_v".$v."_".$table."()

+ 7 - 2
tripal_core/api/tripal_core.chado_general.api.inc

@@ -1,13 +1,18 @@
 <?php
+/**
+ * @file
+ * Provides an application programming interface (API) to manage data withing the Chado database.
+ */
 
-require_once "tripal_core.schema_v1.2.api.inc";
-require_once "tripal_core.schema_v1.11.api.inc";
+require_once 'tripal_core.schema_v1.2.api.inc';
+require_once 'tripal_core.schema_v1.11.api.inc';
 
 /**
  * @defgroup tripal_chado_api Chado API
  * @ingroup tripal_core_api
  * @{
  * Provides an application programming interface (API) to manage data withing the Chado database.
+ *
  * This includes functions for selecting, inserting, updating and deleting records
  * in Chado tables.  The functions will ensure proper integrity contraints are met
  * for inserts and updates.

+ 4 - 0
tripal_core/api/tripal_core.chado_nodes.api.inc

@@ -1,4 +1,8 @@
 <?php
+/**
+ * @file
+ * API to handle much of the common functionality implemented when creating a drupal node type.
+ */
 
 /**
  * @defgroup tripal_chado_node_api Chado Node API

+ 5 - 0
tripal_core/api/tripal_core.chado_query.api.inc

@@ -1,4 +1,9 @@
 <?php
+/**
+ * @file
+ * Provides an API for querying of chado including inserting, updating, deleting and
+ * selecting from chado.
+ */
 
 /**
  * @defgroup tripal_chado_query_api Chado Query API

+ 4 - 0
tripal_core/api/tripal_core.chado_variables.api.inc

@@ -1,4 +1,8 @@
 <?php
+/**
+ * @file
+ * This API generates objects containing the full details of a record(s) in chado.
+ */
 
 /**
  * @defgroup tripal_chado_variables_api Chado Variables API

+ 5 - 0
tripal_core/api/tripal_core.custom_tables.api.inc

@@ -1,4 +1,9 @@
 <?php
+/**
+ * @file
+ * Provides an API to manage custom tables in Chado.
+ */
+
 /**
  * @defgroup tripal_custom_tables_api Custom Tables API
  * @ingroup tripal_core_api

+ 8 - 0
tripal_core/api/tripal_core.files.api.inc

@@ -1,4 +1,10 @@
 <?php
+/**
+ * @file
+ * Provides an application programming interface (API) for managing files within
+ * the Tripal data directory structure.
+ */
+
 /**
  * @defgroup tripal_files_api Files API
  * @ingroup tripal_core_api
@@ -20,6 +26,8 @@
  *   the name of the module being installed
  * @param $path
  *   Optional sub-path to create
+ *
+ * @ingroup tripal_files_api
  */
 function tripal_create_files_dir($module_name, $path = FALSE) {
 

+ 6 - 0
tripal_core/api/tripal_core.jobs.api.inc

@@ -1,4 +1,10 @@
 <?php
+/**
+ * @file
+ * Tripal offers a job management subsystem for managing tasks that may require an extended period of time for
+ * completion.
+ */
+
 /**
  * @defgroup tripal_jobs_api Jobs API
  * @ingroup tripal_core_api

+ 8 - 3
tripal_core/api/tripal_core.mviews.api.inc

@@ -1,4 +1,9 @@
 <?php
+/**
+ * @file
+ * Provides an application programming interface (API) to manage materialized views in Chado.
+ */
+
 /**
  * @defgroup tripal_mviews_api Materalized Views API
  * @ingroup tripal_core_api
@@ -314,7 +319,7 @@ function tripal_mviews_get_mview_id($view_name) {
  * @param $redirect
  *   TRUE/FALSE depending on whether you want to redirect the user to admin/tripal/mviews
  *
- * @ingroup tripal_core
+ * @ingroup tripal_mviews_api
  */
 function tripal_add_populate_mview($mview_id, $redirect = FALSE) {
   global $user;
@@ -349,7 +354,7 @@ function tripal_add_populate_mview($mview_id, $redirect = FALSE) {
  * @param $redirect
  *   TRUE/FALSE depending on whether you want to redirect the user to admin/tripal/mviews
  *
- * @ingroup tripal_core
+ * @ingroup tripal_mviews_api
  */
 function tripal_delete_mview($mview_id, $redirect = FALSE) {
   global $user;
@@ -436,4 +441,4 @@ function tripal_populate_mview($mview_id) {
     print "Done.\n";
     return TRUE;
   }
-}
+}

+ 5 - 0
tripal_core/api/tripal_core.schema_v1.11.api.inc

@@ -1,4 +1,9 @@
 <?php
+/**
+ * @file
+ * Describes the chado tables in version 1.11
+ */
+
 /**
  * @defgroup tripal_schema_v1_11_api Chado v1.11 Schema API
  * @ingroup tripal_chado_schema_api

+ 5 - 0
tripal_core/api/tripal_core.schema_v1.2.api.inc

@@ -1,4 +1,9 @@
 <?php
+/**
+ * @file
+ * Describes the chado tables in version 1.2
+ */
+
 /**
  * @defgroup tripal_schema_v1_2_api Chado v1.2 Schema API
  * @ingroup tripal_chado_schema_api

+ 1 - 2
tripal_core/includes/chado_install.inc

@@ -1,5 +1,4 @@
 <?php
-
 /**
  * @file
  * Functions to install chado schema through Drupal
@@ -59,7 +58,7 @@ function tripal_core_chado_load_form() {
 }
 
 /**
- * Submit Load Chado Schema 1.11 Form
+ * Submit Load Chado Schema Form
  *
  * @ingroup tripal_core
  */

+ 25 - 12
tripal_core/includes/custom_tables.inc

@@ -1,15 +1,25 @@
 <?php
-
 /**
  * @file
  * Contains functions for creating, editing and deleting custom tables
  * on the Tripal website.
  *
+ * @ingroup tripal_custom_tables
+ */
+
+/**
+ * @defgroup tripal_custom_tables Custom Chado Tables
  * @ingroup tripal_core
+ * @{
+ * Contains functions for creating, editing and deleting custom tables
+ * on the Tripal website.
+ * @}
  */
 
 /**
- * Provides a landing page for tripal jobs admin
+ * Provides a landing page for administrating custom tables.
+ *
+ * @ingroup tripal_custom_tables
  */
 function tripal_custom_table_admin_view() {
   $output = '';
@@ -42,20 +52,22 @@ function tripal_custom_table_admin_view() {
 }
 
 /**
+ * Renders the tripal_custom_tables_form.
  *
+ * @ingroup tripal_custom_tables
  */
 function tripal_custom_table_new_page() {
   $output = drupal_render(drupal_get_form('tripal_custom_tables_form'));
   return $output;
-
 }
+
 /**
  * A template function which returns markup to display details for the custom table
  *
  * @param $table_id
  *  The unique ID of the custom table
  *
- * @ingroup tripal_core
+ * @ingroup tripal_custom_tables
  */
 function tripal_custom_table_view($table_id) {
 
@@ -101,7 +113,7 @@ function tripal_custom_table_view($table_id) {
 /**
  * A template function to render a listing of all Custom tables
  *
- * @ingroup tripal_core
+ * @ingroup tripal_custom_tables
  */
 function tripal_custom_tables_list() {
   $header = array('', 'Table Name', 'Description');
@@ -140,7 +152,7 @@ function tripal_custom_tables_list() {
 }
 
 /**
- * A Form to Create/Edit a Custom table
+ * A Form to Create/Edit a Custom table.
  *
  * @param $form_state
  *   The current state of the form (Form API)
@@ -150,7 +162,7 @@ function tripal_custom_tables_list() {
  * @return
  *   A form array (Form API)
  *
- * @ingroup tripal_core
+ * @ingroup tripal_custom_tables
  */
 function tripal_custom_tables_form($form, &$form_state = NULL, $table_id = NULL) {
 
@@ -287,10 +299,10 @@ array (
 }
 
 /**
- * Validate the Create/Edit custom table form
- * Implements hook_form_validate().
+ * Implements hook_validate().
+ * Validate the Create/Edit custom table form.
  *
- * @ingroup tripal_core
+ * @ingroup tripal_custom_tables
  */
 function tripal_custom_tables_form_validate($form, &$form_state) {
   $action = $form_state['values']['action'];
@@ -344,7 +356,7 @@ function tripal_custom_tables_form_validate($form, &$form_state) {
  * Submit the Create/Edit Custom table form
  * Implements hook_form_submit().
  *
- * @ingroup tripal_core
+ * @ingroup tripal_custom_tables
  */
 function tripal_custom_tables_form_submit($form, &$form_state) {
 
@@ -376,6 +388,7 @@ function tripal_custom_tables_form_submit($form, &$form_state) {
 
   return '';
 }
+
 /**
  * Does the specified action for the specified custom table
  *
@@ -386,7 +399,7 @@ function tripal_custom_tables_form_submit($form, &$form_state) {
  * @param $redirect
  *   TRUE/FALSE depending on whether you want to redirect the user to admin/tripal/custom_tables
  *
- * @ingroup tripal_core
+ * @ingroup tripal_custom_tables
  */
 function tripal_custom_tables_action($op, $table_id, $redirect = FALSE) {
   global $user;

+ 22 - 12
tripal_core/includes/form_elements.inc

@@ -1,12 +1,13 @@
 <?php
-
 /**
  * @file
- * Form elements used for tripal views
+ * Form elements used Various places in Tripal
  */
 
 /**
- * Register form elements
+ * Register form elements.
+ *
+ * @ingroup tripal_core
  */
 function tripal_core_element_info() {
   $elements = array();
@@ -32,8 +33,9 @@ function tripal_core_element_info() {
 }
 
 /**
- * Upload File and keep track of previously uploaded files
- * Form element description
+ * Upload File and keep track of previously uploaded files.
+ *
+ * @ingroup tripal_core
  */
 function expand_file_upload_combo($element, $form_state, $complete_form) {
 
@@ -76,9 +78,10 @@ function expand_file_upload_combo($element, $form_state, $complete_form) {
   return $element;
 }
 
-
 /**
- * Theme the file upload combo form element
+ * Theme the file upload combo form element.
+ *
+ * @ingroup tripal_core
  */
 function theme_file_upload_combo($variables) {
   $element = $variables['element'];
@@ -93,9 +96,10 @@ function theme_file_upload_combo($variables) {
   return $output;
 }
 
-
 /**
- * Validate all content passed into the file upload combo form element
+ * Validate all content passed into the file upload combo form element.
+ *
+ * @ingroup tripal_core
  */
 function file_upload_combo_value_callback($element, $input = FALSE, &$form_state) {
   $values = array();
@@ -151,7 +155,9 @@ function file_upload_combo_value_callback($element, $input = FALSE, &$form_state
 }
 
 /**
- * Form element description
+ * Retrieve Sequence bases form element.
+ *
+ * @ingroup tripal_core
  */
 function expand_sequence_combo($element, $form_state, $complete_form) {
 
@@ -189,7 +195,9 @@ function expand_sequence_combo($element, $form_state, $complete_form) {
 
 /**
  * Validate all content passed into the sequence combo form element
- * D7 @todo: test/fix this callback
+ * D7 @todo: test/fix this callback.
+ *
+ * @ingroup tripal_core
  */
 function sequence_combo_value_callback($element, $input = FALSE, &$form_state) {
   $upstream = $form['values'][$element['#name']]['upstream'];
@@ -212,7 +220,9 @@ function sequence_combo_value_callback($element, $input = FALSE, &$form_state) {
 }
 
 /**
- * Theme the file sequence form element
+ * Theme the file sequence form element.
+ *
+ * @ingroup tripal_core
  */
 function theme_sequence_combo($variables) {
   $element = $variables['element'];

+ 19 - 7
tripal_core/includes/jobs.inc

@@ -1,13 +1,21 @@
 <?php
-
 /**
  * @file
  * Contains functions related to the display of Tripal jobs in a Tripal website.
- *
+ */
+
+/**
+ * @defgroup tripal_jobs Jobs
+ * @ingroup tripal_core
+ * @{
+ * Contains functions related to the display of Tripal jobs in a Tripal website.
+ * @}
  */
 
 /**
  * Provides a landing page for tripal jobs admin
+ *
+ * @ingroup tripal_jobs
  */
 function tripal_jobs_admin_view() {
   $output = '';
@@ -40,7 +48,8 @@ function tripal_jobs_admin_view() {
 
 /**
  * NO LONGER USED: REPLACED BY VIEW
- * @ingroup tripal_core
+ *
+ * @ingroup tripal_jobs
  */
 function tripal_jobs_report_form($form, &$form_state = NULL) {
   $form = array();
@@ -87,9 +96,11 @@ function tripal_jobs_report_form($form, &$form_state = NULL) {
   );
   return $form;
 }
+
 /**
+ * NO LONGER USED: REPLACED BY VIEW
  *
- * @ingroup tripal_core
+ * @ingroup tripal_jobs
  */
 function tripal_jobs_report_form_submit($form, &$form_state = NULL) {
 
@@ -105,7 +116,7 @@ function tripal_jobs_report_form_submit($form, &$form_state = NULL) {
  * @return
  *   The HTML to be rendered which describes the job report
  *
- * @ingroup tripal_core
+ * @ingroup tripal_jobs
  */
 function tripal_jobs_report() {
 
@@ -213,6 +224,7 @@ function tripal_jobs_report() {
   $output .= theme('pager');
   return $output;
 }
+
 /**
  * Returns the HTML code to display a given job
  *
@@ -222,6 +234,8 @@ function tripal_jobs_report() {
  * @return
  *   The HTML describing the indicated job
  * @ingroup tripal_core
+ *
+ * @ingroup tripal_jobs
  */
 function tripal_jobs_view($job_id) {
   // get the job record
@@ -305,5 +319,3 @@ function tripal_jobs_view($job_id) {
   $output .= theme_table($table);
   return $output;
 }
-
-

+ 17 - 8
tripal_core/includes/mviews.inc

@@ -1,13 +1,23 @@
 <?php
-
 /**
  * @file
  * Contains functions for viewing and editing of Materialized Views
  * on a Tripal website.
  */
 
+/**
+ * @defgroup tripal_mviews Tripal Materialized Views
+ * @ingroup tripal_core
+ * @{
+ * Contains functions for viewing and editing of Materialized Views
+ * on a Tripal website.
+ * @}
+ */
+
 /**
  * Provides a landing page for tripal jobs admin
+ *
+ * @ingroup tripal_mviews
  */
 function tripal_mview_admin_view() {
   $output = '';
@@ -39,14 +49,13 @@ function tripal_mview_admin_view() {
   return $output;
 }
 
-
 /**
  * A template function which returns markup to display details for the current materialized view
  *
  * @param $mview_id
  *  The unique ID of the materialized view to render
  *
- * @ingroup tripal_core
+ * @ingroup tripal_mviews
  */
 function tripal_mview_report($mview_id) {
 
@@ -120,7 +129,7 @@ function tripal_mview_report($mview_id) {
 /**
  * A template function to render a listing of all Materialized Views
  *
- * @ingroup tripal_core
+ * @ingroup tripal_mviews
  */
 function tripal_mviews_report() {
   $header = array('', 'MView Name', 'Last Update', 'Status', 'Description', '');
@@ -190,7 +199,7 @@ function tripal_mviews_report() {
  * @return
  *   A form array (Form API)
  *
- * @ingroup tripal_core
+ * @ingroup tripal_mviews
  */
 function tripal_mviews_form($form, &$form_state = NULL, $mview_id = NULL) {
   if (!$mview_id) {
@@ -434,7 +443,7 @@ function tripal_mviews_form($form, &$form_state = NULL, $mview_id = NULL) {
  * Validate the Create/Edit Materialized View Form
  * Implements hook_form_validate().
  *
- * @ingroup tripal_core
+ * @ingroup tripal_mviews
  */
 function tripal_mviews_form_validate($form, &$form_state) {
   $action = $form_state['values']['action'];
@@ -494,7 +503,7 @@ function tripal_mviews_form_validate($form, &$form_state) {
  * Submit the Create/Edit Materialized View Form
  * Implements hook_form_submit().
  *
- * @ingroup tripal_core
+ * @ingroup tripal_mviews
  */
 function tripal_mviews_form_submit($form, &$form_state) {
 
@@ -536,4 +545,4 @@ function tripal_mviews_form_submit($form, &$form_state) {
   }
 
   return '';
-}
+}

+ 30 - 3
tripal_core/tripal_core.drush.inc

@@ -1,15 +1,23 @@
 <?php
-
 /**
  * @file
  * Contains function relating to drush-integration of this module.
  */
 
+/**
+ * @defgroup tripal_drush Tripal Drush Integration
+ * @{
+ * Contains function relating to drush-integration of various tripal modules.
+ * @}
+ */
+
 /**
  * Describes each drush command implemented by the module
  *
  * @return
  *   The first line of description when executing the help for a given command
+ *
+ * @ingroup tripal_drush
  */
 function tripal_core_drush_help($command) {
   switch ($command) {
@@ -39,6 +47,8 @@ function tripal_core_drush_help($command) {
  *
  * @return
  *   And array of command descriptions
+ *
+ * @ingroup tripal_drush
  */
 function tripal_core_drush_command() {
   $items = array();
@@ -169,8 +179,9 @@ function tripal_core_drush_command() {
 }
 
 /**
+ * Set the user to run a drush job.
  *
- * @param $username
+ * @ingroup tripal_drush
  */
 function drush_tripal_core_set_user($username) {
   if ($username) {
@@ -195,6 +206,8 @@ function drush_tripal_core_set_user($username) {
  * Executes jobs in the Tripal Jobs Queue
  *
  * NOTE: The following code is executed when drush 'trpjob-run' or 'drush tripal-launch-jobs' is called
+ *
+ * @ingroup tripal_drush
  */
 function drush_tripal_core_tripal_jobs_launch($username) {
   $parallel = drush_get_option('parallel');
@@ -220,6 +233,8 @@ function drush_tripal_core_tripal_jobs_launch($username) {
  * Executes jobs in the Tripal Jobs Queue
  *
  * NOTE: The following code is executed when drush 'trpjob-run' or 'drush tripal-launch-jobs' is called
+ *
+ * @ingroup tripal_drush
  */
 function drush_tripal_core_tripal_jobs_rerun($username, $job_id) {
 
@@ -233,6 +248,8 @@ function drush_tripal_core_tripal_jobs_rerun($username, $job_id) {
  * Prints details about the current running job
  *
  * NOTE: The following code is executed when 'drush trpjob-curr' or 'drush tripal-current-job' is called
+ *
+ * @ingroup tripal_drush
  */
 function drush_tripal_core_tripal_jobs_current() {
   $sql =  "
@@ -269,6 +286,8 @@ function drush_tripal_core_tripal_jobs_current() {
  *   The name of the table storing the materialized view (tripal_mview.mv_table)
  *
  * Note: Either $mview_id OR $table_name is required
+ *
+ * @ingroup tripal_drush
  */
 function drush_tripal_core_tripal_update_mview() {
   $mview_id = drush_get_option('mview_id');
@@ -303,6 +322,8 @@ function drush_tripal_core_tripal_update_mview() {
 
 /**
  * Returns the current version of chado
+ *
+ * @ingroup tripal_drush
  */
 function drush_tripal_core_tripal_chado_version() {
   $version = $GLOBALS["exact_chado_version"];
@@ -314,6 +335,8 @@ function drush_tripal_core_tripal_chado_version() {
  *
  * @param $table_name
  *  The name of the table to return the description of
+ *
+ * @ingroup tripal_drush
  */
 function drush_tripal_core_tripal_chadotable_desc($table_name) {
   $section = drush_get_option('section');
@@ -334,6 +357,8 @@ function drush_tripal_core_tripal_chadotable_desc($table_name) {
  *
  * @param $module
  *  The name of a module with nodes associated with it. For example, feature
+ *
+ * @ingroup tripal_drush
  */
 function drush_tripal_core_tripal_node_sync($module) {
   switch ($module) {
@@ -366,7 +391,9 @@ function drush_tripal_core_tripal_node_sync($module) {
  *
  * @param $module
  *  The name of a module with nodes associated with it. For example, feature
+ *
+ * @ingroup tripal_drush
  */
 function drush_tripal_core_tripal_node_clean($module) {
   chado_cleanup_orphaned_nodes($module, 0);
-}
+}

+ 0 - 1
tripal_core/tripal_core.install

@@ -1,5 +1,4 @@
 <?php
-
 /**
  * @file
  * Contains functions used to install/uninstall tripal_core.

+ 15 - 14
tripal_core/tripal_core.module

@@ -45,35 +45,36 @@
 
 // APPLICATION PROGRAMMER INTERFACE -------------
 // Chado API
-require_once "api/tripal_core.chado_general.api.inc";
+require_once 'api/tripal_core.chado_general.api.inc';
 require_once 'api/tripal_core.chado_query.api.inc';
 require_once 'api/tripal_core.chado_variables.api.inc';
 require_once 'api/tripal_core.chado_schema.api.inc';
-require_once "api/tripal_core.chado_nodes.api.inc";
-require_once "api/tripal_core.chado_nodes.properties.api.inc";
-require_once "api/tripal_core.chado_nodes.dbxrefs.api.inc";
-require_once "api/tripal_core.chado_nodes.relationships.api.inc";
+require_once 'api/tripal_core.chado_nodes.api.inc';
+require_once 'api/tripal_core.chado_nodes.properties.api.inc';
+require_once 'api/tripal_core.chado_nodes.dbxrefs.api.inc';
+require_once 'api/tripal_core.chado_nodes.relationships.api.inc';
 
 // Table API
-require_once "api/tripal_core.custom_tables.api.inc";
-require_once "api/tripal_core.mviews.api.inc";
+require_once 'api/tripal_core.custom_tables.api.inc';
+require_once 'api/tripal_core.mviews.api.inc';
 
 // Miscellaneous API
-require_once "api/tripal_core.files.api.inc";
-require_once "api/tripal_core.jobs.api.inc";
+require_once 'api/tripal_core.files.api.inc';
+require_once 'api/tripal_core.jobs.api.inc';
 
 require_once 'api/tripal_core.DEPRECATED.inc';
 
 // INCLUDES -------------------------------------
-require_once "includes/jobs.inc";
-require_once "includes/mviews.inc";
-require_once "includes/custom_tables.inc";
-require_once "includes/chado_install.inc";
-require_once "includes/form_elements.inc";
+require_once 'includes/jobs.inc';
+require_once 'includes/mviews.inc';
+require_once 'includes/custom_tables.inc';
+require_once 'includes/chado_install.inc';
+require_once 'includes/form_elements.inc';
 
 tripal_core_set_globals();
 /**
  * This function is used to set the global Chado variables
+ *
  * @ingroup tripal_core
  */
 function tripal_core_set_globals() {

+ 14 - 2
tripal_core/tripal_core.views.inc

@@ -1,8 +1,14 @@
 <?php
+/**
+ * @file
+ * Integrates many of the core database tables with drupal views
+ */
 
 /**
  * Describe various Tripal Core systems to Views
- *   for the creation of administrative views
+ *   for the creation of administrative views.
+ *
+ * @ingroup tripal_core
  */
 function tripal_core_views_data() {
   $data = array();
@@ -26,6 +32,8 @@ function tripal_core_views_data() {
  *   Previously generated tripal_core views data array
  * return
  *   $data array with job management system described
+ *
+ * @ingroup tripal_core
  */
 function tripal_core_views_data_jobs($data) {
 
@@ -287,6 +295,8 @@ function tripal_core_views_data_jobs($data) {
  *   Previously generated tripal_core views data array
  * return
  *   $data array with custom tables management described
+ *
+ * @ingroup tripal_core
  */
 function tripal_core_views_data_custom_tables($data) {
 
@@ -362,6 +372,8 @@ function tripal_core_views_data_custom_tables($data) {
  *   Previously generated tripal_core views data array
  * return
  *   $data array with custom tables management described
+ *
+ * @ingroup tripal_core
  */
 function tripal_core_views_data_mviews($data) {
 
@@ -604,4 +616,4 @@ function tripal_core_views_data_mviews($data) {
   );
 
   return $data;
-}
+}

+ 22 - 1
tripal_core/tripal_core.views_default.inc

@@ -1,7 +1,13 @@
 <?php
+/**
+ * @file
+ * Describes core default views
+ */
 
 /**
+ * Describes core default views
  *
+ * @ingroup tripal_core
  */
 function tripal_core_views_default_views() {
   $views = array();
@@ -18,6 +24,11 @@ function tripal_core_views_default_views() {
   return $views;
 }
 
+/**
+ * Describes the jobs administration view.
+ *
+ * @ingroup tripal_core
+ */
 function tripal_core_admin_defaultview_jobs() {
 
   $view = new view();
@@ -290,6 +301,11 @@ function tripal_core_admin_defaultview_jobs() {
   return $view;
 }
 
+/**
+ * Describes the custom tables administration view.
+ *
+ * @ingroup tripal_core
+ */
 function tripal_core_admin_defaultview_custom_tables() {
 
   $view = new view();
@@ -407,6 +423,11 @@ function tripal_core_admin_defaultview_custom_tables() {
   return $view;
 }
 
+/**
+ * Describes the materialized views administration view.
+ *
+ * @ingroup tripal_core
+ */
 function tripal_core_admin_defaultview_mviews() {
 
   $view = new view();
@@ -667,4 +688,4 @@ function tripal_core_admin_defaultview_mviews() {
   $handler->display->display_options['tab_options']['weight'] = '0';
 
   return $view;
-}
+}