committing backout from 5765 which included reversions from a broken galaxy-central repository

This commit is contained in:
Ross Lazarus
2011-07-06 09:45:41 +10:00
251 changed files with 91 additions and 160 deletions
+2 -3
View File
@@ -1005,8 +1005,7 @@ class HostAgent( RBACAgent ):
ucsc_main = ( 'hgw1.cse.ucsc.edu', 'hgw2.cse.ucsc.edu', 'hgw3.cse.ucsc.edu', 'hgw4.cse.ucsc.edu',
'hgw5.cse.ucsc.edu', 'hgw6.cse.ucsc.edu', 'hgw7.cse.ucsc.edu', 'hgw8.cse.ucsc.edu' ),
ucsc_test = ( 'hgwdev.cse.ucsc.edu', ),
ucsc_archaea = ( 'lowepub.cse.ucsc.edu', ),
ucsc_bhri = ('ucsc.omics.bhri.internal','galaxy.omics.bhri.internal'),
ucsc_archaea = ( 'lowepub.cse.ucsc.edu', )
)
def __init__( self, model, permitted_actions=None ):
self.model = model
@@ -1037,7 +1036,7 @@ class HostAgent( RBACAgent ):
# We're going to search in order, but if the remote site is load
# balancing their connections (as UCSC does), this is okay.
try:
if socket.gethostbyname( server ) == addr or server == '127.0.0.1' or server == '172.16.0.38':
if socket.gethostbyname( server ) == addr:
break # remote host is in the server list
except ( socket.error, socket.gaierror ):
pass # can't resolve, try next
-2
View File
@@ -922,8 +922,6 @@ class Tool:
if not self.check_values:
return
for input in self.inputs.itervalues():
if input.name not in value:
value[input.name] = input.get_initial_value( None, value )
if isinstance( input, ToolParameter ):
callback( "", input, value[input.name] )
else:
+18 -5
View File
@@ -748,6 +748,9 @@ class SelectToolParameter( ToolParameter ):
# Dependency on a value that does not yet exist
if isinstance( dep_value, RuntimeValue ):
return True
#dataset not ready yet
if hasattr( self, 'ref_input' ) and isinstance( dep_value, self.tool.app.model.HistoryDatasetAssociation ) and ( dep_value.is_pending or not isinstance( dep_value.datatype, self.ref_input.formats ) ):
return True
# Dynamic, but all dependenceis are known and have values
return False
def get_initial_value( self, trans, context ):
@@ -878,6 +881,7 @@ class ColumnListParameter( SelectToolParameter ):
self.force_select = string_as_bool( elem.get( "force_select", True ))
self.accept_default = string_as_bool( elem.get( "accept_default", False ))
self.data_ref = elem.get( "data_ref", None )
self.ref_input = None
self.default_value = elem.get( "default_value", None )
self.is_dynamic = True
def from_html( self, value, trans=None, context={} ):
@@ -973,7 +977,7 @@ class ColumnListParameter( SelectToolParameter ):
if not dataset.metadata.columns:
# Only allow late validation if the dataset is not yet ready
# (since we have reason to expect the metadata to be ready eventually)
if dataset.is_pending:
if dataset.is_pending or not isinstance( dataset.datatype, self.ref_input.formats ):
return True
# No late validation
return False
@@ -1353,7 +1357,7 @@ class DataToolParameter( ToolParameter ):
selected = ( value and ( hda in value ) )
field.add_option( "%s: %s" % ( hid, hda_name ), hda.id, selected )
else:
target_ext, converted_dataset = hda.find_conversion_destination( self.formats, converter_safe = self.converter_safe( other_values, trans ) )
target_ext, converted_dataset = hda.find_conversion_destination( self.formats )
if target_ext:
if converted_dataset:
hda = converted_dataset
@@ -1402,13 +1406,22 @@ class DataToolParameter( ToolParameter ):
pass #no valid options
def dataset_collector( datasets ):
def is_convertable( dataset ):
target_ext, converted_dataset = dataset.find_conversion_destination( self.formats, converter_safe = self.converter_safe( context, trans ) )
target_ext, converted_dataset = dataset.find_conversion_destination( self.formats )
if target_ext is not None:
return True
return False
for i, data in enumerate( datasets ):
if data.visible and not data.deleted and data.state not in [data.states.ERROR, data.states.DISCARDED] and ( isinstance( data.datatype, self.formats) or is_convertable( data ) ):
if self.options and self._options_filter_attribute( data ) != filter_value:
if data.visible and not data.deleted and data.state not in [data.states.ERROR, data.states.DISCARDED]:
is_valid = False
if isinstance( data.datatype, self.formats ):
is_valid = True
else:
target_ext, converted_dataset = data.find_conversion_destination( self.formats )
if target_ext:
is_valid = True
if converted_dataset:
data = converted_dataset
if not is_valid or ( self.options and self._options_filter_attribute( data ) != filter_value ):
continue
most_recent_dataset[0] = data
# Also collect children via association object
@@ -36,7 +36,6 @@ errorpage = """
"""
UCSC_MAIN_SERVERS = (
'omics.bhri.internal',
'hgw1.cse.ucsc.edu',
'hgw2.cse.ucsc.edu',
'hgw3.cse.ucsc.edu',
@@ -50,7 +49,6 @@ UCSC_ARCHAEA_SERVERS = (
'lowepub.cse.ucsc.edu',
)
class RemoteUser( object ):
def __init__( self, app, maildomain=None, ucsc_display_sites=[], admin_users=[] ):
self.app = app
@@ -58,7 +56,7 @@ class RemoteUser( object ):
self.allow_ucsc_main = False
self.allow_ucsc_archaea = False
self.admin_users = admin_users
if 'main' in ucsc_display_sites or 'test' in ucsc_display_sites or 'bhri' in ucsc_display_sites:
if 'main' in ucsc_display_sites or 'test' in ucsc_display_sites:
self.allow_ucsc_main = True
if 'archaea' in ucsc_display_sites:
self.allow_ucsc_archaea = True
+1 -2
View File
@@ -1,5 +1,4 @@
#!/bin/sh
cd `dirname $0`/../..
#python ./scripts/cleanup_datasets/cleanup_datasets.py ./universe_wsgi.ini -d 10 -4 -r $@ >> ./scripts/cleanup_datasets/purge_libraries.log
python ./scripts/cleanup_datasets/cleanup_datasets.py ./universe_wsgi.ini -d 2 -4 -r $@ >> ./scripts/cleanup_datasets/purge_libraries.log
python ./scripts/cleanup_datasets/cleanup_datasets.py ./universe_wsgi.ini -d 10 -4 -r $@ >> ./scripts/cleanup_datasets/purge_libraries.log
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
Executable → Regular
View File
View File
Executable → Regular
View File
View File
View File
Executable → Regular
View File
Executable → Regular
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
Executable → Regular
View File
View File
Executable → Regular
View File
Executable → Regular
View File
Executable → Regular
View File
View File
View File
Executable → Regular
View File
Executable → Regular
View File
Executable → Regular
View File
View File
View File
Executable → Regular
View File
Executable → Regular
View File
Executable → Regular
View File
View File
View File
View File
Executable → Regular
View File
Executable → Regular
View File
Executable → Regular
View File
Executable → Regular
View File
View File
View File
View File
Executable → Regular
View File
Executable → Regular
View File
Executable → Regular
View File
Executable → Regular
View File
Executable → Regular
View File
Executable → Regular
View File
Executable → Regular
View File
Executable → Regular
View File
Executable → Regular
View File
Executable → Regular
View File
View File
Executable → Regular
View File
Executable → Regular
View File
View File
View File
View File
Executable → Regular
View File
View File
Executable → Regular
View File
Executable → Regular
View File
Executable → Regular
View File
Executable → Regular
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File

Some files were not shown because too many files have changed in this diff Show More