1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/0c6cf4f53c4e/
changeset: 0c6cf4f53c4e
user: dan
date: 2012-03-28 18:01:44
summary: Add use_name flag to ldda.templates_dict() that will return a dictionary using the form field names instead of labels.
affected #: 1 file
diff -r 15bd01c59c24eae40026470459c5577cba063768 -r 0c6cf4f53c4efad46fe7716587ca5a2dddff049c lib/galaxy/model/__init__.py
--- a/lib/galaxy/model/__init__.py
+++ b/lib/galaxy/model/__init__.py
@@ -1536,17 +1536,22 @@
else:
return template.get_widgets( trans.user )
return []
- def templates_dict( self ):
+ def templates_dict( self, use_name=False ):
"""
Returns a dict of template info
"""
+ #TODO: Should have a method that allows names and labels to be returned together in a structured way
template_data = {}
for temp_info in self.info_association:
template = temp_info.template
content = temp_info.info.content
tmp_dict = {}
for field in template.fields:
- tmp_dict[field['label']] = content[field['name']]
+ if use_name:
+ name = field[ 'name' ]
+ else:
+ name = field[ 'label' ]
+ tmp_dict[ name ] = content[ field[ 'name' ] ]
template_data[template.name] = tmp_dict
return template_data
def templates_json( self ):
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
2 new commits in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/cc2605facf6b/
changeset: cc2605facf6b
user: jgoecks
date: 2012-03-28 16:58:38
summary: Enable set_metadata tool to take job parameters and use parameters for set_metadata jobs within Trackster.
affected #: 2 files
diff -r a01497f68018ccc78b2a987b8514bae0e8cf70f1 -r cc2605facf6be23d0a84f81904650042374d398c lib/galaxy/tools/actions/metadata.py
--- a/lib/galaxy/tools/actions/metadata.py
+++ b/lib/galaxy/tools/actions/metadata.py
@@ -1,6 +1,7 @@
from __init__ import ToolAction
from galaxy.datatypes.metadata import JobExternalOutputMetadataWrapper
from galaxy.util.odict import odict
+from galaxy.util.json import to_json_string
import logging
log = logging.getLogger( __name__ )
@@ -8,7 +9,7 @@
class SetMetadataToolAction( ToolAction ):
"""Tool action used for setting external metadata on an existing dataset"""
- def execute( self, tool, trans, incoming = {}, set_output_hid = False, overwrite = True, history=None ):
+ def execute( self, tool, trans, incoming = {}, set_output_hid = False, overwrite = True, history=None, job_params=None ):
for name, value in incoming.iteritems():
if isinstance( value, trans.app.model.HistoryDatasetAssociation ):
dataset = value
@@ -30,6 +31,8 @@
job.tool_id = tool.id
if trans.user:
job.user_id = trans.user.id
+ if job_params:
+ job.params = to_json_string( job_params )
start_job_state = job.state #should be job.states.NEW
try:
# For backward compatibility, some tools may not have versions yet.
diff -r a01497f68018ccc78b2a987b8514bae0e8cf70f1 -r cc2605facf6be23d0a84f81904650042374d398c lib/galaxy/web/controllers/tracks.py
--- a/lib/galaxy/web/controllers/tracks.py
+++ b/lib/galaxy/web/controllers/tracks.py
@@ -974,12 +974,15 @@
new_dataset.set_dataset_state( trans.app.model.Dataset.states.OK )
# Set metadata.
+ # TODO: set meta internally if dataset is small enough?
if trans.app.config.set_metadata_externally:
- trans.app.datatypes_registry.set_external_metadata_tool.tool_action.execute( trans.app.datatypes_registry.set_external_metadata_tool, trans, incoming = { 'input1':new_dataset }, overwrite=False )
+ trans.app.datatypes_registry.set_external_metadata_tool.tool_action.execute( trans.app.datatypes_registry.set_external_metadata_tool,
+ trans, incoming = { 'input1':new_dataset },
+ overwrite=False, job_params={ "source" : "trackster" } )
else:
message = 'Attributes updated'
new_dataset.set_meta()
- new_dataset.datatype.after_setting_metadata( new_dataset )
+ new_dataset.datatype.after_setting_metadata( new_dataset )
trans.sa_session.flush()
https://bitbucket.org/galaxy/galaxy-central/changeset/15bd01c59c24/
changeset: 15bd01c59c24
user: jgoecks
date: 2012-03-28 16:59:03
summary: Merge
affected #: 1 file
diff -r cc2605facf6be23d0a84f81904650042374d398c -r 15bd01c59c24eae40026470459c5577cba063768 contrib/universe_merger.py
--- /dev/null
+++ b/contrib/universe_merger.py
@@ -0,0 +1,87 @@
+#! /usr/bin/env python
+'''
+universe_merger.py
+
+Created by Anne Pajon on 31 Jan 2012
+
+Copyright (c) 2012 Cancer Research UK - Cambridge Research Institute.
+
+This source file is licensed under the Academic Free License version
+3.0 available at http://www.opensource.org/licenses/AFL-3.0.
+
+Permission is hereby granted to reproduce, translate, adapt, alter,
+transform, modify, or arrange this source file (the "Original Work");
+to distribute or communicate copies of it under any license of your
+choice that does not contradict the terms and conditions; to perform
+or display the Original Work publicly.
+
+THE ORIGINAL WORK IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS
+AND WITHOUT WARRANTY, EITHER EXPRESS OR IMPLIED, INCLUDING, WITHOUT
+LIMITATION, THE WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY OR
+FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY OF
+THE ORIGINAL WORK IS WITH YOU.
+
+Script for merging specific local Galaxy config universe_wsgi.ini.cri with default Galaxy universe_wsgi.ini.sample
+'''
+import ConfigParser
+import sys
+import optparse
+import logging
+
+def main():
+ # logging configuration
+ logging.basicConfig(format='%(levelname)s: %(message)s', level=logging.INFO)
+
+ # get the options
+ parser = optparse.OptionParser()
+ parser.add_option("-s", "--sample", dest="sample", action="store", help="path to Galaxy universe_wsgi.ini.sample file")
+ parser.add_option("-c", "--config", dest="config", action="store", help="path to your own universe_wsgi.ini file")
+ parser.add_option("-o", "--output", dest="output", action="store", help="path to the new merged universe_wsgi.ini.new file")
+ (options, args) = parser.parse_args()
+
+ for option in ['sample', 'config']:
+ if getattr(options, option) == None:
+ print "Please supply a --%s parameter.\n" % (option)
+ parser.print_help()
+ sys.exit()
+
+ config_sample = ConfigParser.RawConfigParser()
+ config_sample.read(options.sample)
+ config_sample_content = open(options.sample, 'r').read()
+
+ config = ConfigParser.RawConfigParser()
+ config.read(options.config)
+
+ logging.info("Merging your own config file %s into the sample one %s." % (options.config, options.sample))
+ logging.info("---------- DIFFERENCE ANALYSIS BEGIN ----------")
+ for section in config.sections():
+ if not config_sample.has_section(section):
+ logging.warning("-MISSING- section [%s] not found in sample file. It will be ignored." % section)
+ else:
+ for (name, value) in config.items(section):
+ if not config_sample.has_option(section, name):
+ if not "#%s" % name in config_sample_content:
+ logging.warning("-MISSING- section [%s] option '%s' not found in sample file. It will be ignored." % (section, name))
+ else:
+ logging.info("-notset- section [%s] option '%s' not set in sample file. It will be added." % (section, name))
+ config_sample.set(section, name, value)
+ else:
+ if not config_sample.get(section, name) == value:
+ logging.info("- diff - section [%s] option '%s' has different value ('%s':'%s'). It will be modified." % (section, name, config_sample.get(section, name), value))
+ config_sample.set(section, name, value)
+ logging.info("---------- DIFFERENCE ANALYSIS END ----------")
+
+ if options.output:
+ outputfile = open(options.output, 'w')
+ config_sample.write(outputfile)
+ outputfile.close()
+ else:
+ #print "----------"
+ #config_sample.write(sys.stdout)
+ #print "----------"
+ logging.info("use -o OUTPUT to write the merged configuration into a file.")
+
+ logging.info("read Galaxy universe_wsgi.ini.sample for detailed information.")
+
+if __name__ == '__main__':
+ main()
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/4b6cc14f1bb9/
changeset: 4b6cc14f1bb9
user: greg
date: 2012-03-28 16:58:19
summary: Add script for merging specific local Galaxy config universe_wsgi.ini.cri with default Galaxy universe_wsgi.ini.sample contributed by Anne Pajon.
affected #: 1 file
diff -r a01497f68018ccc78b2a987b8514bae0e8cf70f1 -r 4b6cc14f1bb9bffda9859f2857909d8708b5d86f contrib/universe_merger.py
--- /dev/null
+++ b/contrib/universe_merger.py
@@ -0,0 +1,87 @@
+#! /usr/bin/env python
+'''
+universe_merger.py
+
+Created by Anne Pajon on 31 Jan 2012
+
+Copyright (c) 2012 Cancer Research UK - Cambridge Research Institute.
+
+This source file is licensed under the Academic Free License version
+3.0 available at http://www.opensource.org/licenses/AFL-3.0.
+
+Permission is hereby granted to reproduce, translate, adapt, alter,
+transform, modify, or arrange this source file (the "Original Work");
+to distribute or communicate copies of it under any license of your
+choice that does not contradict the terms and conditions; to perform
+or display the Original Work publicly.
+
+THE ORIGINAL WORK IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS
+AND WITHOUT WARRANTY, EITHER EXPRESS OR IMPLIED, INCLUDING, WITHOUT
+LIMITATION, THE WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY OR
+FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY OF
+THE ORIGINAL WORK IS WITH YOU.
+
+Script for merging specific local Galaxy config universe_wsgi.ini.cri with default Galaxy universe_wsgi.ini.sample
+'''
+import ConfigParser
+import sys
+import optparse
+import logging
+
+def main():
+ # logging configuration
+ logging.basicConfig(format='%(levelname)s: %(message)s', level=logging.INFO)
+
+ # get the options
+ parser = optparse.OptionParser()
+ parser.add_option("-s", "--sample", dest="sample", action="store", help="path to Galaxy universe_wsgi.ini.sample file")
+ parser.add_option("-c", "--config", dest="config", action="store", help="path to your own universe_wsgi.ini file")
+ parser.add_option("-o", "--output", dest="output", action="store", help="path to the new merged universe_wsgi.ini.new file")
+ (options, args) = parser.parse_args()
+
+ for option in ['sample', 'config']:
+ if getattr(options, option) == None:
+ print "Please supply a --%s parameter.\n" % (option)
+ parser.print_help()
+ sys.exit()
+
+ config_sample = ConfigParser.RawConfigParser()
+ config_sample.read(options.sample)
+ config_sample_content = open(options.sample, 'r').read()
+
+ config = ConfigParser.RawConfigParser()
+ config.read(options.config)
+
+ logging.info("Merging your own config file %s into the sample one %s." % (options.config, options.sample))
+ logging.info("---------- DIFFERENCE ANALYSIS BEGIN ----------")
+ for section in config.sections():
+ if not config_sample.has_section(section):
+ logging.warning("-MISSING- section [%s] not found in sample file. It will be ignored." % section)
+ else:
+ for (name, value) in config.items(section):
+ if not config_sample.has_option(section, name):
+ if not "#%s" % name in config_sample_content:
+ logging.warning("-MISSING- section [%s] option '%s' not found in sample file. It will be ignored." % (section, name))
+ else:
+ logging.info("-notset- section [%s] option '%s' not set in sample file. It will be added." % (section, name))
+ config_sample.set(section, name, value)
+ else:
+ if not config_sample.get(section, name) == value:
+ logging.info("- diff - section [%s] option '%s' has different value ('%s':'%s'). It will be modified." % (section, name, config_sample.get(section, name), value))
+ config_sample.set(section, name, value)
+ logging.info("---------- DIFFERENCE ANALYSIS END ----------")
+
+ if options.output:
+ outputfile = open(options.output, 'w')
+ config_sample.write(outputfile)
+ outputfile.close()
+ else:
+ #print "----------"
+ #config_sample.write(sys.stdout)
+ #print "----------"
+ logging.info("use -o OUTPUT to write the merged configuration into a file.")
+
+ logging.info("read Galaxy universe_wsgi.ini.sample for detailed information.")
+
+if __name__ == '__main__':
+ main()
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/a01497f68018/
changeset: a01497f68018
user: natefoo
date: 2012-03-28 16:02:55
summary: Have the cloud controller explicitly require boto.
affected #: 1 file
diff -r 377dd3efe3beb7f8d8ef06306fcadac0aafd6365 -r a01497f68018ccc78b2a987b8514bae0e8cf70f1 lib/galaxy/web/controllers/cloud.py
--- a/lib/galaxy/web/controllers/cloud.py
+++ b/lib/galaxy/web/controllers/cloud.py
@@ -6,10 +6,13 @@
"""
-import boto
import datetime
import logging
import time
+from galaxy import eggs
+import pkg_resources
+pkg_resources.require('boto')
+import boto
from galaxy import web
from galaxy.web.base.controller import BaseUIController
from boto.ec2.regioninfo import RegionInfo
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/0282e24997db/
changeset: 0282e24997db
user: dan
date: 2012-03-27 23:54:12
summary: Add FreeBayes to tool_conf.xml.main
affected #: 1 file
diff -r 8d1b7e28fd6027d7ef3c69d17592d6d49cdbcc57 -r 0282e24997db8e5b5a41a82b6e1904650af42934 tool_conf.xml.main
--- a/tool_conf.xml.main
+++ b/tool_conf.xml.main
@@ -318,6 +318,9 @@
<tool file="gatk/variant_eval.xml" /><tool file="gatk/variant_combine.xml" /></section>
+ <section name="NGS: Variant Detection" id="variant_detection">
+ <tool file="variant_detection/freebayes.xml" />
+ </section><section name="NGS: Indel Analysis" id="indel_analysis"><tool file="indels/sam_indel_filter.xml" /><tool file="indels/indel_sam2interval.xml" />
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/8d1b7e28fd60/
changeset: 8d1b7e28fd60
user: jgoecks
date: 2012-03-27 19:03:21
summary: Basics for API access to tools: (a) enable tools, tool panel labels, and tool panel sections to be dictified; and (b) add RESTful UI controller tools. Once session-based authentication is enabled in API, controller will be moved to API.
affected #: 2 files
diff -r f6010ee7c7f8d5a021cba09bbfef937c28265c82 -r 8d1b7e28fd6027d7ef3c69d17592d6d49cdbcc57 lib/galaxy/tools/__init__.py
--- a/lib/galaxy/tools/__init__.py
+++ b/lib/galaxy/tools/__init__.py
@@ -485,6 +485,13 @@
self.id = elem.get( "id" )
self.version = elem.get( "version" ) or ''
self.elems = odict()
+
+ def to_dict( self ):
+ """ Return a dict that includes section's attributes. """
+ section_elts = []
+ for key, val in self.elems.items():
+ section_elts.append( val.to_dict() )
+ return { 'type': 'section', 'id': self.id, 'name': self.name, 'version': self.version, 'elems': section_elts }
class ToolSectionLabel( object ):
"""
@@ -495,6 +502,10 @@
self.text = elem.get( "text" )
self.id = elem.get( "id" )
self.version = elem.get( "version" ) or ''
+
+ def to_dict( self ):
+ """ Return a dict that includes label's attributes. """
+ return { 'type': 'label', 'id': self.id, 'name': self.text, 'version': self.version }
class DefaultToolState( object ):
"""
@@ -2238,6 +2249,11 @@
self.sa_session.add( new_data )
self.sa_session.flush()
return primary_datasets
+
+ def to_dict( self, **kwds ):
+ """ Return dict that includes tool's attributes. """
+ return { 'type': 'tool', 'id': self.id, 'name': self.name,
+ 'version': self.version, 'description': self.description }
class DataSourceTool( Tool ):
"""
diff -r f6010ee7c7f8d5a021cba09bbfef937c28265c82 -r 8d1b7e28fd6027d7ef3c69d17592d6d49cdbcc57 lib/galaxy/web/controllers/tools.py
--- /dev/null
+++ b/lib/galaxy/web/controllers/tools.py
@@ -0,0 +1,32 @@
+from galaxy import config, tools, web, util
+from galaxy.web.base.controller import BaseController, BaseUIController
+
+class ToolsController( BaseUIController ):
+ """
+ RESTful controller for interactions with tools. Once session-based
+ authentication can be done with API controllers, this will be moved
+ to be part of the API.
+ """
+
+ @web.json
+ def index( self, trans, **kwds ):
+ """
+ GET /api/tools: returns a list of tools defined by parameters
+ parameters:
+ in_panel - if true, tools are returned in panel structure, including sections and labels
+ """
+ in_panel = util.string_as_bool( kwds.get( 'in_panel', 'True' ) )
+ if in_panel:
+ panel_elts = []
+ # Taken from tool_menu.mako:
+ for key, val in self.app.toolbox.tool_panel.items():
+ panel_elts.append( val.to_dict() )
+ rval = panel_elts
+ else:
+ tools = []
+ for id, tool in self.app.toolbox.tools_by_id.items():
+ tools.append( tool.to_dict() )
+ rval = tools
+
+ return rval
+
\ No newline at end of file
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/241353a85198/
changeset: 241353a85198
user: greg
date: 2012-03-27 16:53:45
summary: Missed the copyright - removed from the distribution.
affected #: 1 file
diff -r 28641bb419101ca7d83f9d1ca92b134866155cf2 -r 241353a8519857a4db755a7cad8227f825b98d4e contrib/universe_merger.py
--- a/contrib/universe_merger.py
+++ /dev/null
@@ -1,71 +0,0 @@
-#! /usr/bin/env python
-'''
-universe_merger.py
-
-Created by Anne Pajon on 31 Jan 2012
-Copyright (c) 2012 Cancer Research UK - Cambridge Research Institute. All rights reserved.
-
-Script for merging specific local Galaxy config universe_wsgi.ini.cri with default Galaxy universe_wsgi.ini.sample
-'''
-import ConfigParser
-import sys
-import optparse
-import logging
-
-def main():
- # logging configuration
- logging.basicConfig(format='%(levelname)s: %(message)s', level=logging.INFO)
-
- # get the options
- parser = optparse.OptionParser()
- parser.add_option("-s", "--sample", dest="sample", action="store", help="the path to the Galaxy universe_wsgi.ini.sample file")
- parser.add_option("-c", "--config", dest="config", action="store", help="the path to your own universe_wsgi.ini.cri file")
- parser.add_option("-o", "--output", dest="output", action="store", help="the path to the new merged universe_wsgi.ini file")
- (options, args) = parser.parse_args()
-
- for option in ['sample', 'config']:
- if getattr(options, option) == None:
- print "Please supply a --%s parameter.\n" % (option)
- parser.print_help()
- sys.exit()
-
- config_sample = ConfigParser.RawConfigParser()
- config_sample.read(options.sample)
- config_sample_content = open(options.sample, 'r').read()
-
- config = ConfigParser.RawConfigParser()
- config.read(options.config)
-
- logging.info("Merging your own config file %s into the sample one %s." % (options.config, options.sample))
- logging.info("---------- DIFFERENCE ANALYSIS BEGIN ----------")
- for section in config.sections():
- if not config_sample.has_section(section):
- logging.warning("-MISSING- section [%s] not found in sample file. It will be ignored." % section)
- else:
- for (name, value) in config.items(section):
- if not config_sample.has_option(section, name):
- if not "#%s" % name in config_sample_content:
- logging.warning("-MISSING- section [%s] option '%s' not found in sample file. It will be ignored." % (section, name))
- else:
- logging.info("-notset- section [%s] option '%s' not set in sample file. It will be added." % (section, name))
- config_sample.set(section, name, value)
- else:
- if not config_sample.get(section, name) == value:
- logging.info("- diff - section [%s] option '%s' has different value ('%s':'%s'). It will be modified." % (section, name, config_sample.get(section, name), value))
- config_sample.set(section, name, value)
- logging.info("---------- DIFFERENCE ANALYSIS END ----------")
-
- if options.output:
- outputfile = open(options.output, 'w')
- config_sample.write(outputfile)
- outputfile.close()
- else:
- #print "----------"
- #config_sample.write(sys.stdout)
- #print "----------"
- logging.info("use -o OUTPUT to write the merged configuration into a file.")
-
- logging.info("read Galaxy universe_wsgi.ini.sample for detailed information.")
-
-if __name__ == '__main__':
- main()
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/28641bb41910/
changeset: 28641bb41910
user: greg
date: 2012-03-27 16:19:04
summary: Add script for merging specific local Galaxy config universe_wsgi.ini.cri with default Galaxy universe_wsgi.ini.sample contributed by Anne Pajon.
affected #: 1 file
diff -r 7dc0e48e9105f19a564263c54684d51bee8ac16e -r 28641bb419101ca7d83f9d1ca92b134866155cf2 contrib/universe_merger.py
--- /dev/null
+++ b/contrib/universe_merger.py
@@ -0,0 +1,71 @@
+#! /usr/bin/env python
+'''
+universe_merger.py
+
+Created by Anne Pajon on 31 Jan 2012
+Copyright (c) 2012 Cancer Research UK - Cambridge Research Institute. All rights reserved.
+
+Script for merging specific local Galaxy config universe_wsgi.ini.cri with default Galaxy universe_wsgi.ini.sample
+'''
+import ConfigParser
+import sys
+import optparse
+import logging
+
+def main():
+ # logging configuration
+ logging.basicConfig(format='%(levelname)s: %(message)s', level=logging.INFO)
+
+ # get the options
+ parser = optparse.OptionParser()
+ parser.add_option("-s", "--sample", dest="sample", action="store", help="the path to the Galaxy universe_wsgi.ini.sample file")
+ parser.add_option("-c", "--config", dest="config", action="store", help="the path to your own universe_wsgi.ini.cri file")
+ parser.add_option("-o", "--output", dest="output", action="store", help="the path to the new merged universe_wsgi.ini file")
+ (options, args) = parser.parse_args()
+
+ for option in ['sample', 'config']:
+ if getattr(options, option) == None:
+ print "Please supply a --%s parameter.\n" % (option)
+ parser.print_help()
+ sys.exit()
+
+ config_sample = ConfigParser.RawConfigParser()
+ config_sample.read(options.sample)
+ config_sample_content = open(options.sample, 'r').read()
+
+ config = ConfigParser.RawConfigParser()
+ config.read(options.config)
+
+ logging.info("Merging your own config file %s into the sample one %s." % (options.config, options.sample))
+ logging.info("---------- DIFFERENCE ANALYSIS BEGIN ----------")
+ for section in config.sections():
+ if not config_sample.has_section(section):
+ logging.warning("-MISSING- section [%s] not found in sample file. It will be ignored." % section)
+ else:
+ for (name, value) in config.items(section):
+ if not config_sample.has_option(section, name):
+ if not "#%s" % name in config_sample_content:
+ logging.warning("-MISSING- section [%s] option '%s' not found in sample file. It will be ignored." % (section, name))
+ else:
+ logging.info("-notset- section [%s] option '%s' not set in sample file. It will be added." % (section, name))
+ config_sample.set(section, name, value)
+ else:
+ if not config_sample.get(section, name) == value:
+ logging.info("- diff - section [%s] option '%s' has different value ('%s':'%s'). It will be modified." % (section, name, config_sample.get(section, name), value))
+ config_sample.set(section, name, value)
+ logging.info("---------- DIFFERENCE ANALYSIS END ----------")
+
+ if options.output:
+ outputfile = open(options.output, 'w')
+ config_sample.write(outputfile)
+ outputfile.close()
+ else:
+ #print "----------"
+ #config_sample.write(sys.stdout)
+ #print "----------"
+ logging.info("use -o OUTPUT to write the merged configuration into a file.")
+
+ logging.info("read Galaxy universe_wsgi.ini.sample for detailed information.")
+
+if __name__ == '__main__':
+ main()
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.