Explorar o código

Ensured every function in tripal_core is documented with a full header

Lacey Sanderson %!s(int64=12) %!d(string=hai) anos
pai
achega
474caf9d1c

+ 2 - 0
tripal_core/jobs.php

@@ -339,6 +339,7 @@ function tripal_jobs_check_running() {
   // return 1 to indicate that no jobs are currently running.
   return FALSE;
 }
+
 /**
  * Returns the HTML code to display a given job
  *
@@ -352,6 +353,7 @@ function tripal_jobs_check_running() {
 function tripal_jobs_view($job_id) {
   return theme('tripal_core_job_view', $job_id);
 }
+
 /**
  * Registers variables for the tripal_core_job_view themeing function
  *

+ 12 - 4
tripal_core/tripal_core.install

@@ -29,7 +29,10 @@ function tripal_core_install() {
 
 /**
  *  Update for Drupal 6.x, Tripal 0.4
- *  This update adjusts the materialized view by adding a 'cvterm_id' column
+ *  This update
+ *   - adjusts the materialized view by adding status, comment and mv_schema columns
+ *   - changes the specs of mv_table, mv_specs and indexed
+ *   - creates the tripal_custom_tables table
  *
  * @ingroup tripal_feature
  */
@@ -115,7 +118,8 @@ function tripal_core_get_schemas() {
 }
 
 /**
- *
+ * Describes the Tripal Materialized View (tripal_mviews) table
+ * This table keeps track of all materialized views created by Tripal and stored in chado
  *
  * @ingroup tripal_core
  */
@@ -151,7 +155,9 @@ function tripal_core_mviews_schema() {
 }
 
 /**
- *
+ * Describes the Tripal Jobs (tripal_jobs) table
+ * This table keeps track of all tripal jobs including their current status and is used
+ * by tripal_launch_jobs to determine which jobs need to be run
  *
  * @ingroup tripal_core
  */
@@ -187,7 +193,9 @@ function tripal_core_jobs_schema() {
 }
 
 /**
- *
+ * Describes the Tripal Custom Tables (tripal_custom_tables) table
+ * This keeps track of tables created by Tripal and stored in chado that may or may not
+ * also be materialized views.
  *
  * @ingroup tripal_core
  */

+ 26 - 10
tripal_core/tripal_core.module

@@ -16,7 +16,8 @@ require_once "tripal_core.api.inc";
  */
 
 /**
- *
+ * Implements hook_init().
+ * Used to set the search_path, create default content and set default variables.
  *
  * @ingroup tripal_core
  */
@@ -63,7 +64,8 @@ function tripal_core_init() {
 }
 
 /**
- *
+ * Implements hook_menu().
+ * Defines all menu items needed by Tripal Core
  *
  * @ingroup tripal_core
  */
@@ -185,14 +187,10 @@ function tripal_core_perm() {
 }
 
 /**
- *
- *
- * @param $dbname
- *   The name of the database to switch to as indicated in settings.php
- *   Should be either default or chado
+ * Check whether chado is installed (either in the same or a different database)
  *
  * @return
- *   The name of the previously set database
+ *   TRUE/FALSE depending upon whether chado is installed.
  *
  * @ingroup tripal_chado_api
  */
@@ -213,6 +211,8 @@ function tripal_core_is_chado_installed() {
 
 
 /**
+ * Implements hook_theme().
+ * Registers template files/functions used by this module.
  *
  * @ingroup tripal_core
  */
@@ -226,6 +226,18 @@ function tripal_core_theme() {
 }
 
 /**
+ * Implements hook_job_describe_args().
+ * Describes the arguements for the tripal_update_mview job to allow for greater
+ * readability in the jobs details pages.
+ *
+ * @param $callback
+ *   The callback of the current tripal job (this is the function that will be executed
+ *   when tripal_launch_jobs.php is run.
+ * @param $args
+ *   An array of arguments passed in when the job was registered.
+ *
+ * @return
+ *   A more readable $args array
  *
  * @ingroup tripal_core
  */
@@ -241,8 +253,12 @@ function tripal_core_job_describe_args($callback, $args) {
   return $new_args;
 }
 
-// this is just a wrapper for backwards compatibility with a naming mistake.
-// it can go away in the future as it only is useful for jobs created by v0.3b
+/**
+ * this is just a wrapper for backwards compatibility with a naming mistake.
+ * it can go away in the future as it only is useful for jobs created by v0.3b
+ *
+ * @todo remove this function
+ */
 function tripal_core_load_gff3($gff_file, $organism_id, $analysis_id, $add_only = 0,
   $update = 0, $refresh = 0, $remove = 0, $job = NULL) {
 

+ 1 - 1
tripal_core/tripal_launch_jobs_multi.php

@@ -84,7 +84,7 @@ else {
 runjob($hostname, $username);
 
 /**
- *
+ * Runs tripal_launch_jobs() as the specified user
  *
  * @ingroup tripal_core
  */