Locked History Actions

attachment:step_3.py of Events/GCC2013/TrainingDay/API

Attachment 'step_3.py'

Download

   1 #!/usr/bin/env python
   2 
   3 """
   4 Step 3
   5 ======
   6 In this step, we'll create a new history named 'Step 3' and get details on it.
   7 """
   8 import os
   9 import sys
  10 import pprint
  11 
  12 import users_1
  13 # note: that we're using the new histories module for this step
  14 import histories_3
  15 
  16 # we'll store the name the new history here
  17 # if it ever changes, we can easily modify it once here no matter how many times we reference it in the code
  18 NEW_HISTORY_NAME = 'Step 3'
  19 
  20 # ----------------------------------------------------------------------------- main
  21 if __name__ == '__main__':
  22     try:
  23         # we don't need some of the code from the previous steps - they were for demonstration
  24         # we'll comment them out here and remove them entirely from following steps
  25         #histories = histories_1.get_histories()
  26         #current_history_summary = histories[0]
  27         #current_history_id = current_history_summary[ 'id' ]
  28         #current_history_details = histories_2.get_history( current_history_id )
  29 
  30         # (we'll keep the call to users as it provides a good check to see if we connected and have access)
  31         users = users_1.get_users()
  32 
  33         new_history = histories_3.create_history( NEW_HISTORY_NAME )
  34         # it's never a bad idea to output what's going on in your script if you can
  35         print 'created history!', new_history[ 'name' ]
  36         new_history_id = new_history[ 'id' ]
  37         new_history_details = histories_3.get_history( new_history_id )
  38         
  39     except Exception, exc:
  40         print 'Error creating history:', str( exc )
  41         sys.exit( 1 )
  42 
  43     print 'new history:'
  44     pprint.pprint( new_history_details, indent=2 )

Attached Files

To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.
  • [get | view] (2013-06-24 16:01:09, 8.2 KB) [[attachment:Galaxy-Workflow-Joined_Solexa_QC.ga]]
  • [get | view] (2013-06-24 16:46:36, 14.0 KB) [[attachment:all-scripts.tar.gz]]
  • [get | view] (2013-06-24 16:01:23, 5.2 KB) [[attachment:common.py]]
  • [get | view] (2013-06-24 16:04:07, 0.9 KB) [[attachment:datasets_1.py]]
  • [get | view] (2013-06-24 16:04:15, 1.2 KB) [[attachment:datasets_2.py]]
  • [get | view] (2013-06-24 16:04:22, 3.4 KB) [[attachment:datasets_3.py]]
  • [get | view] (2013-06-24 16:04:33, 1.5 KB) [[attachment:hdas_1.py]]
  • [get | view] (2013-06-24 16:04:50, 1.7 KB) [[attachment:hdas_2.py]]
  • [get | view] (2013-06-24 16:05:07, 2.2 KB) [[attachment:hdas_3.py]]
  • [get | view] (2013-06-24 16:03:38, 0.9 KB) [[attachment:histories_1.py]]
  • [get | view] (2013-06-24 16:03:52, 2.1 KB) [[attachment:histories_2.py]]
  • [get | view] (2013-06-24 16:05:25, 2.2 KB) [[attachment:histories_3.py]]
  • [get | view] (2013-06-24 16:05:34, 3.3 KB) [[attachment:lddas_1.py]]
  • [get | view] (2013-06-24 16:05:41, 1.3 KB) [[attachment:libraries_1.py]]
  • [get | view] (2013-06-24 16:01:36, 0.8 KB) [[attachment:setup.py]]
  • [get | view] (2013-06-24 16:02:45, 1.1 KB) [[attachment:step_1.py]]
  • [get | view] (2013-06-24 16:07:15, 9.9 KB) [[attachment:step_10.py]]
  • [get | view] (2013-06-24 16:03:28, 1.4 KB) [[attachment:step_2.py]]
  • [get | view] (2013-06-24 16:06:01, 1.6 KB) [[attachment:step_3.py]]
  • [get | view] (2013-06-24 16:06:11, 1.1 KB) [[attachment:step_4.py]]
  • [get | view] (2013-06-24 16:06:20, 1.9 KB) [[attachment:step_5.py]]
  • [get | view] (2013-06-24 16:06:44, 2.5 KB) [[attachment:step_6.py]]
  • [get | view] (2013-06-24 16:06:53, 4.9 KB) [[attachment:step_7.py]]
  • [get | view] (2013-06-24 16:07:05, 5.9 KB) [[attachment:step_8.py]]
  • [get | view] (2013-06-30 13:51:46, 8.0 KB) [[attachment:step_9.py]]
  • [get | view] (2013-06-24 16:41:51, 1.8 KB) [[attachment:tools_1.py]]
  • [get | view] (2013-06-24 16:44:32, 2.0 KB) [[attachment:upload_to_history.py]]
  • [get | view] (2013-06-24 16:03:03, 1.3 KB) [[attachment:users_1.py]]
  • [get | view] (2013-06-24 16:44:44, 2.9 KB) [[attachment:workflows_1.py]]
 All files | Selected Files: delete move to page

You are not allowed to attach a file to this page.