[hg] galaxy 2598: Merge trunk
details: http://www.bx.psu.edu/hg/galaxy/rev/3049432643f4 changeset: 2598:3049432643f4 user: Kanwei Li <kanwei@gmail.com> date: Wed Aug 19 17:55:28 2009 -0400 description: Merge trunk 2 file(s) affected in this change: templates/history/shared_grid.mako templates/history/stored_grid.mako diffs (1946 lines): diff -r ea6708c96cd1 -r 3049432643f4 lib/galaxy/datatypes/coverage.py --- a/lib/galaxy/datatypes/coverage.py Wed Aug 19 17:27:00 2009 -0400 +++ b/lib/galaxy/datatypes/coverage.py Wed Aug 19 17:55:28 2009 -0400 @@ -5,7 +5,7 @@ import pkg_resources pkg_resources.require( "bx-python" ) -import logging, os, sys, time, sets, tempfile, shutil +import logging, os, sys, time, tempfile, shutil import data from galaxy import util from galaxy.datatypes.sniff import * diff -r ea6708c96cd1 -r 3049432643f4 lib/galaxy/datatypes/data.py --- a/lib/galaxy/datatypes/data.py Wed Aug 19 17:27:00 2009 -0400 +++ b/lib/galaxy/datatypes/data.py Wed Aug 19 17:55:28 2009 -0400 @@ -1,4 +1,4 @@ -import logging, os, sys, time, sets, tempfile +import logging, os, sys, time, tempfile from galaxy import util from galaxy.util.odict import odict from galaxy.util.bunch import Bunch diff -r ea6708c96cd1 -r 3049432643f4 lib/galaxy/datatypes/genetics.py --- a/lib/galaxy/datatypes/genetics.py Wed Aug 19 17:27:00 2009 -0400 +++ b/lib/galaxy/datatypes/genetics.py Wed Aug 19 17:55:28 2009 -0400 @@ -12,7 +12,7 @@ august 20 2007 """ -import logging, os, sys, time, sets, tempfile, shutil +import logging, os, sys, time, tempfile, shutil import data from galaxy import util from cgi import escape diff -r ea6708c96cd1 -r 3049432643f4 lib/galaxy/datatypes/interval.py --- a/lib/galaxy/datatypes/interval.py Wed Aug 19 17:27:00 2009 -0400 +++ b/lib/galaxy/datatypes/interval.py Wed Aug 19 17:55:28 2009 -0400 @@ -5,7 +5,7 @@ import pkg_resources pkg_resources.require( "bx-python" ) -import logging, os, sys, time, sets, tempfile, shutil +import logging, os, sys, time, tempfile, shutil import data from galaxy import util from galaxy.datatypes.sniff import * diff -r ea6708c96cd1 -r 3049432643f4 lib/galaxy/model/__init__.py --- a/lib/galaxy/model/__init__.py Wed Aug 19 17:27:00 2009 -0400 +++ b/lib/galaxy/model/__init__.py Wed Aug 19 17:55:28 2009 -0400 @@ -5,8 +5,7 @@ the relationship cardinalities are obvious (e.g. prefer Dataset to Data) """ -import os.path, os, errno -import sha +import os.path, os, errno, sys import galaxy.datatypes from galaxy.util.bunch import Bunch from galaxy import util @@ -14,8 +13,7 @@ import galaxy.datatypes.registry from galaxy.datatypes.metadata import MetadataCollection from galaxy.security import RBACAgent, get_permitted_actions - - +from galaxy.util.hash_util import * import logging log = logging.getLogger( __name__ ) @@ -40,10 +38,10 @@ def set_password_cleartext( self, cleartext ): """Set 'self.password' to the digest of 'cleartext'.""" - self.password = sha.new( cleartext ).hexdigest() + self.password = new_secure_hash( text_type=cleartext ) def check_password( self, cleartext ): """Check if 'cleartext' matches 'self.password' when hashed.""" - return self.password == sha.new( cleartext ).hexdigest() + return self.password == new_secure_hash( text_type=cleartext ) def all_roles( self ): roles = [ ura.role for ura in self.roles ] for group in [ uga.group for uga in self.groups ]: diff -r ea6708c96cd1 -r 3049432643f4 lib/galaxy/tools/__init__.py --- a/lib/galaxy/tools/__init__.py Wed Aug 19 17:27:00 2009 -0400 +++ b/lib/galaxy/tools/__init__.py Wed Aug 19 17:55:28 2009 -0400 @@ -1,15 +1,13 @@ """ Classes encapsulating galaxy tools and tool configuration. """ - import pkg_resources; pkg_resources.require( "simplejson" ) import logging, os, string, sys, tempfile, glob, shutil import simplejson -import sha, hmac, binascii - +import binascii from UserDict import DictMixin from galaxy.util.odict import odict from galaxy.util.bunch import Bunch @@ -26,6 +24,7 @@ from galaxy.util.none_like import NoneDataset from galaxy.datatypes import sniff from cgi import FieldStorage +from galaxy.util.hash_util import * log = logging.getLogger( __name__ ) @@ -211,7 +210,7 @@ value["__page__"] = self.page value = simplejson.dumps( value ) # Make it secure - a = hmac.new( app.config.tool_secret, value, sha ).hexdigest() + a = hmac_new( app.config.tool_secret, value ) b = binascii.hexlify( value ) return "%s:%s" % ( a, b ) def decode( self, value, tool, app ): @@ -221,7 +220,7 @@ # Extract and verify hash a, b = value.split( ":" ) value = binascii.unhexlify( b ) - test = hmac.new( app.config.tool_secret, value, sha ).hexdigest() + test = hmac_new( app.config.tool_secret, value ) assert a == test # Restore from string values = json_fix( simplejson.loads( value ) ) @@ -453,7 +452,6 @@ self.tests = None # Determine if this tool can be used in workflows self.is_workflow_compatible = self.check_workflow_compatible() - def parse_inputs( self, root ): """ diff -r ea6708c96cd1 -r 3049432643f4 lib/galaxy/util/hash_util.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/galaxy/util/hash_util.py Wed Aug 19 17:55:28 2009 -0400 @@ -0,0 +1,28 @@ +import sys, logging +using_24 = sys.version_info[:2] < ( 2, 5 ) +if using_24: + import sha +else: + import hashlib +import hmac + +log = logging.getLogger( __name__ ) + +""" +Utility functions for bi-directional Python version compatibility. Python 2.5 +introduced hashlib which replaced sha in Python 2.4 and previous versions. +""" +def new_secure_hash( text_type=None ): + if using_24: + if text_type: + return sha.new( text_type ).hexdigest() + return sha.new() + else: + if text_type: + return hashlib.sha1( text_type ).hexdigest() + return hashlib.sha1() +def hmac_new( key, value ): + if using_24: + return hmac.new( key, value, sha ).hexdigest() + else: + return hmac.new( key, value, hashlib.sha1 ).hexdigest() diff -r ea6708c96cd1 -r 3049432643f4 lib/galaxy/web/controllers/admin.py --- a/lib/galaxy/web/controllers/admin.py Wed Aug 19 17:27:00 2009 -0400 +++ b/lib/galaxy/web/controllers/admin.py Wed Aug 19 17:55:28 2009 -0400 @@ -1,9 +1,14 @@ -import shutil, StringIO, operator, urllib, gzip, tempfile, sets, string, sys +import shutil, StringIO, operator, urllib, gzip, tempfile, string, sys from datetime import datetime, timedelta from galaxy import util, datatypes from galaxy.web.base.controller import * from galaxy.model.orm import * from galaxy.web.controllers.forms import get_all_forms, get_form_widgets +# Older py compatibility +try: + set() +except: + from sets import Set as set import logging log = logging.getLogger( __name__ ) @@ -1236,16 +1241,16 @@ if v == trans.app.security_agent.permitted_actions.DATASET_ACCESS: if len( in_roles ) > 1: # Get the set of all users that are being associated with the dataset - in_roles_set = sets.Set() + in_roles_set = set() for role in in_roles: in_roles_set.add( role ) - users_set = sets.Set() + users_set = set() for role in in_roles: for ura in role.users: users_set.add( ura.user ) # Make sure that at least 1 user has every role being associated with the dataset for user in users_set: - user_roles_set = sets.Set() + user_roles_set = set() for ura in user.roles: user_roles_set.add( ura.role ) if in_roles_set.issubset( user_roles_set ): @@ -1421,16 +1426,16 @@ if v == trans.app.security_agent.permitted_actions.DATASET_ACCESS: if len( in_roles ) > 1: # Get the set of all users that are being associated with the dataset - in_roles_set = sets.Set() + in_roles_set = set() for role in in_roles: in_roles_set.add( role ) - users_set = sets.Set() + users_set = set() for role in in_roles: for ura in role.users: users_set.add( ura.user ) # Make sure that at least 1 user has every role being associated with the dataset for user in users_set: - user_roles_set = sets.Set() + user_roles_set = set() for ura in user.roles: user_roles_set.add( ura.role ) if in_roles_set.issubset( user_roles_set ): diff -r ea6708c96cd1 -r 3049432643f4 lib/galaxy/web/controllers/async.py --- a/lib/galaxy/web/controllers/async.py Wed Aug 19 17:27:00 2009 -0400 +++ b/lib/galaxy/web/controllers/async.py Wed Aug 19 17:55:28 2009 -0400 @@ -6,8 +6,8 @@ from galaxy import jobs, util, datatypes, web -import logging, urllib -import sha, hmac +import logging, urllib, sys +from galaxy.util.hash_util import * log = logging.getLogger( __name__ ) @@ -58,7 +58,7 @@ return "Data %s does not exist or has already been deleted" % data_id if STATUS == 'OK': - key = hmac.new( trans.app.config.tool_secret, "%d:%d" % ( data.id, data.history_id), sha ).hexdigest() + key = hmac_new( trans.app.config.tool_secret, "%d:%d" % ( data.id, data.history_id ) ) if key != data_secret: return "You do not have permission to alter data %s." % data_id # push the job into the queue @@ -116,7 +116,7 @@ trans.log_event( "Added dataset %d to history %d" %(data.id, trans.history.id ), tool_id=tool_id ) try: - key = hmac.new( trans.app.config.tool_secret, "%d:%d" % ( data.id, data.history_id), sha ).hexdigest() + key = hmac_new( trans.app.config.tool_secret, "%d:%d" % ( data.id, data.history_id ) ) galaxy_url = trans.request.base + '/async/%s/%s/%s' % ( tool_id, data.id, key ) params.update( { 'GALAXY_URL' :galaxy_url } ) params.update( { 'data_id' :data.id } ) diff -r ea6708c96cd1 -r 3049432643f4 lib/galaxy/web/controllers/dataset.py --- a/lib/galaxy/web/controllers/dataset.py Wed Aug 19 17:27:00 2009 -0400 +++ b/lib/galaxy/web/controllers/dataset.py Wed Aug 19 17:55:28 2009 -0400 @@ -1,4 +1,4 @@ -import logging, os, sets, string, shutil, re, socket, mimetypes, smtplib, urllib +import logging, os, string, shutil, re, socket, mimetypes, smtplib, urllib from galaxy.web.base.controller import * from galaxy import util, datatypes, jobs, web, model diff -r ea6708c96cd1 -r 3049432643f4 lib/galaxy/web/controllers/genetrack.py --- a/lib/galaxy/web/controllers/genetrack.py Wed Aug 19 17:27:00 2009 -0400 +++ b/lib/galaxy/web/controllers/genetrack.py Wed Aug 19 17:55:28 2009 -0400 @@ -1,11 +1,10 @@ -import time, glob, os +import time, glob, os, sys from itertools import cycle -import sha - from mako import exceptions from mako.template import Template from mako.lookup import TemplateLookup from galaxy.web.base.controller import * +from galaxy.util.hash_util import * try: import pkg_resources @@ -265,7 +264,7 @@ tmpl_name, track_maker = conf.PLOT_MAPPER[param.plot] # check against a hash, display an image that already exists if it was previously created. - hash = sha.new() + hash = new_secure_hash() hash.update(str(dataset_id)) for key in sorted(kwds.keys()): hash.update(str(kwds[key])) diff -r ea6708c96cd1 -r 3049432643f4 lib/galaxy/web/controllers/history.py --- a/lib/galaxy/web/controllers/history.py Wed Aug 19 17:27:00 2009 -0400 +++ b/lib/galaxy/web/controllers/history.py Wed Aug 19 17:55:28 2009 -0400 @@ -161,7 +161,7 @@ status, message = self._list_undelete( trans, histories ) trans.sa_session.flush() # Render the list view - return self.stored_list_grid( trans, status=status, message=message, template='/history/stored_grid.mako', **kwargs ) + return self.stored_list_grid( trans, status=status, message=message, template='/history/grid.mako', **kwargs ) def _list_delete( self, trans, histories ): """Delete histories""" n_deleted = 0 @@ -239,14 +239,14 @@ if operation == "clone": if not id: message = "Select a history to clone" - return self.shared_list_grid( trans, status='error', message=message, template='/history/shared_grid.mako', **kwargs ) + return self.shared_list_grid( trans, status='error', message=message, template='/history/grid.mako', **kwargs ) # When cloning shared histories, only copy active datasets new_kwargs = { 'clone_choice' : 'active' } return self.clone( trans, id, **new_kwargs ) elif operation == 'unshare': if not id: message = "Select a history to unshare" - return self.shared_list_grid( trans, status='error', message=message, template='/history/shared_grid.mako', **kwargs ) + return self.shared_list_grid( trans, status='error', message=message, template='/history/grid.mako', **kwargs ) ids = util.listify( id ) histories = [] for history_id in ids: @@ -260,7 +260,7 @@ message = "Unshared %d shared histories" % len( ids ) status = 'done' # Render the list view - return self.shared_list_grid( trans, status=status, message=message, template='/history/shared_grid.mako', **kwargs ) + return self.shared_list_grid( trans, status=status, message=message, template='/history/grid.mako', **kwargs ) @web.expose def delete_current( self, trans ): """Delete just the active history -- this does not require a logged in user.""" diff -r ea6708c96cd1 -r 3049432643f4 lib/galaxy/web/controllers/requests.py --- a/lib/galaxy/web/controllers/requests.py Wed Aug 19 17:27:00 2009 -0400 +++ b/lib/galaxy/web/controllers/requests.py Wed Aug 19 17:55:28 2009 -0400 @@ -152,16 +152,12 @@ helptext='')) # library associated if request.library: - request_details.append(dict(label='Library', - value=request.library.name, - helptext='Associated library where the resultant \ - dataset will be stored')) + value = request.library.name else: - request_details.append(dict(label='Library', - value=None, - helptext='Associated library where the resultant \ - dataset will be stored')) - + value = None + request_details.append( dict( label='Data library', + value=value, + helptext='Data library where the resultant dataset will be stored' ) ) # form fields for index, field in enumerate(request.type.request_form.fields): if field['required']: @@ -492,18 +488,17 @@ else: lib_list.add_option(lib.name, lib.id) if lib_id == 'new': - lib_list.add_option('Create a new library', 'new', selected=True) + lib_list.add_option('Create a new data library', 'new', selected=True) else: - lib_list.add_option('Create a new library', 'new') - widget = dict(label='Library', + lib_list.add_option('Create a new data library', 'new') + widget = dict(label='Data library', widget=lib_list, - helptext='Associated library where the resultant \ - dataset will be stored.') + helptext='Data library where the resultant dataset will be stored.') if lib_id == 'new': - new_lib = dict(label='Create a new Library', + new_lib = dict(label='Create a new data library', widget=TextField('new_library_name', 40, util.restore_text( params.get( 'new_library_name', '' ) )), - helptext='Enter a library name here to request a new library') + helptext='Enter a name here to request a new data library') return [widget, new_lib] else: return [widget] @@ -558,7 +553,7 @@ ''' empty_fields = [] if not request.library: - empty_fields.append('Library') + empty_fields.append('Data library') # check rest of the fields of the form for index, field in enumerate(request.type.request_form.fields): if field['required'] == 'required' and request.values.content[index] in ['', None]: diff -r ea6708c96cd1 -r 3049432643f4 lib/galaxy/web/controllers/requests_admin.py --- a/lib/galaxy/web/controllers/requests_admin.py Wed Aug 19 17:27:00 2009 -0400 +++ b/lib/galaxy/web/controllers/requests_admin.py Wed Aug 19 17:55:28 2009 -0400 @@ -144,10 +144,9 @@ value=str(request.user.email), helptext='')) # library associated - request_details.append(dict(label='Library', + request_details.append(dict(label='Data library', value=trans.app.model.Library.get(request.library_id).name, - helptext='Associated library where the resultant \ - dataset will be stored')) + helptext='Data library where the resultant dataset will be stored')) # form fields for index, field in enumerate(request.type.request_form.fields): if field['required']: diff -r ea6708c96cd1 -r 3049432643f4 lib/galaxy/web/controllers/root.py --- a/lib/galaxy/web/controllers/root.py Wed Aug 19 17:27:00 2009 -0400 +++ b/lib/galaxy/web/controllers/root.py Wed Aug 19 17:55:28 2009 -0400 @@ -1,7 +1,7 @@ """ Contains the main interface in the Universe class """ -import logging, os, sets, string, shutil, urllib, re, socket +import logging, os, string, shutil, urllib, re, socket from cgi import escape, FieldStorage from galaxy import util, datatypes, jobs, web, util from galaxy.web.base.controller import * @@ -60,7 +60,6 @@ trans.response.set_content_type('text/xml') return trans.fill_template_mako( "root/history_as_xml.mako", history=history, show_deleted=util.string_as_bool( show_deleted ) ) else: - template = "root/history.mako" show_deleted = util.string_as_bool( show_deleted ) query = trans.sa_session.query( model.HistoryDatasetAssociation ) \ .filter( model.HistoryDatasetAssociation.history == history ) \ diff -r ea6708c96cd1 -r 3049432643f4 lib/galaxy/web/controllers/tool_runner.py --- a/lib/galaxy/web/controllers/tool_runner.py Wed Aug 19 17:27:00 2009 -0400 +++ b/lib/galaxy/web/controllers/tool_runner.py Wed Aug 19 17:55:28 2009 -0400 @@ -117,7 +117,6 @@ tool_state_string = util.object_to_string(state.encode(tool, trans.app)) # Setup context for template history = trans.get_history() - template = "tool_form.mako" vars = dict( tool_state=state, errors = {} ) # Is the "add frame" stuff neccesary here? add_frame = AddFrameData() @@ -125,17 +124,13 @@ if from_noframe is not None: add_frame.wiki_url = trans.app.config.wiki_url add_frame.from_noframe = True - return trans.fill_template( template, history=history, toolbox=toolbox, tool=tool, util=util, add_frame=add_frame, **vars ) - - + return trans.fill_template( "tool_form.mako", history=history, toolbox=toolbox, tool=tool, util=util, add_frame=add_frame, **vars ) @web.expose def redirect( self, trans, redirect_url=None, **kwd ): if not redirect_url: return trans.show_error_message( "Required URL for redirection missing" ) trans.log_event( "Redirecting to: %s" % redirect_url ) return trans.fill_template( 'root/redirect.mako', redirect_url=redirect_url ) - - @web.json def upload_async_create( self, trans, tool_id=None, **kwd ): """ diff -r ea6708c96cd1 -r 3049432643f4 lib/galaxy/web/framework/__init__.py --- a/lib/galaxy/web/framework/__init__.py Wed Aug 19 17:27:00 2009 -0400 +++ b/lib/galaxy/web/framework/__init__.py Wed Aug 19 17:55:28 2009 -0400 @@ -93,8 +93,8 @@ """ Exception to make throwing errors from deep in controllers easier """ - def __init__( self, message, type="info" ): - self.message = message + def __init__( self, err_msg, type="info" ): + self.err_msg = err_msg self.type = type def error( message ): @@ -117,7 +117,7 @@ self.security = galaxy_app.security def handle_controller_exception( self, e, trans, **kwargs ): if isinstance( e, MessageException ): - return trans.show_message( e.message, e.type ) + return trans.show_message( e.err_msg, e.type ) def make_body_iterable( self, trans, body ): if isinstance( body, FormBuilder ): body = trans.show_form( body ) diff -r ea6708c96cd1 -r 3049432643f4 lib/galaxy/webapps/reports/controllers/root.py --- a/lib/galaxy/webapps/reports/controllers/root.py Wed Aug 19 17:27:00 2009 -0400 +++ b/lib/galaxy/webapps/reports/controllers/root.py Wed Aug 19 17:55:28 2009 -0400 @@ -1,8 +1,8 @@ -import sys, os, operator, sets, string, shutil, re, socket, urllib +import sys, os, operator, string, shutil, re, socket, urllib, time from galaxy import web from cgi import escape, FieldStorage from galaxy.webapps.reports.base.controller import * -import logging, sets, time +import logging log = logging.getLogger( __name__ ) class Report( BaseController ): diff -r ea6708c96cd1 -r 3049432643f4 templates/admin/center.mako --- a/templates/admin/center.mako Wed Aug 19 17:27:00 2009 -0400 +++ b/templates/admin/center.mako Wed Aug 19 17:55:28 2009 -0400 @@ -17,7 +17,7 @@ <li> <strong>Manage groups</strong> - provides a view of all groups along with the members of the group and the roles associated with each group (both private and non-private roles). Non-private roles include a link to a page that allows you to manage the users - and groups that are associated with the role. The page also includes a view of the library datasets that are associated with the + and groups that are associated with the role. The page also includes a view of the data library datasets that are associated with the role and the permissions applied to each dataset. </li> <p/> @@ -32,9 +32,9 @@ <p/> <ul> <li> - <strong>Manage libraries</strong> - Dataset libraries enable a Galaxy administrator to upload datasets into a library. Currently, - only administrators can create dataset libraries, but permission to perform the following functions on the library can be granted to - users (a library item is one of: a library, a library folder, a library dataset). + <strong>Manage data libraries</strong> - Data libraries enable a Galaxy administrator to upload datasets into a data library. Currently, + only administrators can create data libraries, but permission to perform the following functions on the data library can be granted to + users (a library item is one of: a data library, a library folder, a library dataset). <p/> <ul> <li><strong>add library item</strong> - Role members can add library items to this library or folder</li> @@ -42,12 +42,12 @@ <li><strong>manage library permissions</strong> - Role members can manage permissions applied to this library item</li> </ul> <p/> - The default behavior is for no permissions to be applied to a library item, but applied permissions are inherited downward, so it is - important to set desired permissions on a new library when it is created. When this is done, new folders and datasets added to the - library will automatically inherit those permissions. In the same way, permissions can be applied to a folder, which will be + The default behavior is for no permissions to be applied to a data library item, but applied permissions are inherited downward, so it is + important to set desired permissions on a new data library when it is created. When this is done, new folders and datasets added to the + data library will automatically inherit those permissions. In the same way, permissions can be applied to a folder, which will be automatically inherited by all contained datasets and sub-folders. <p/> - The "Libraries" menu item allows users to access the datasets in a library as long as they are not restricted from accessing them. + The "Data Libraries" menu item allows users to access the datasets in a data library as long as they are not restricted from accessing them. Importing a library dataset into a history will not make a copy of the dataset, but will be a "pointer" to the dataset on disk. This approach allows for multiple users to use a single (possibly very large) dataset file. </li> @@ -72,7 +72,7 @@ </ul> </li> </ul> -<p><strong>Data Security and Dataset Libraries</strong></p> +<p><strong>Data Security and Data Libraries</strong></p> <p/> <strong>Security</strong> - Data security in Galaxy is a new feature, so familiarize yourself with the details which can be found here or in our <a href="http://g2.trac.bx.psu.edu/wiki/SecurityFeatures" target="_blank">data security page</a>. The data security @@ -121,8 +121,8 @@ <strong>access</strong> - users associated with the role can import this dataset into their history for analysis. <p> If no roles with the "access" permission are associated with a dataset, the dataset is "public" and may be accessed by - anyone. Public library datasets will be accessible to all users (as well as anyone not logged in during a Galaxy session) - from the list of libraries displayed when the "Libraries" menu item is selected. + anyone. Public data library datasets will be accessible to all users (as well as anyone not logged in during a Galaxy session) + from the list of data libraries displayed when the "Data Libraries" menu item is selected. </p> <p> Associating a dataset with a role that includes the "access" permission restricts the set of users that can access it. diff -r ea6708c96cd1 -r 3049432643f4 templates/admin/dataset_security/role.mako --- a/templates/admin/dataset_security/role.mako Wed Aug 19 17:27:00 2009 -0400 +++ b/templates/admin/dataset_security/role.mako Wed Aug 19 17:55:28 2009 -0400 @@ -84,7 +84,7 @@ <br clear="left"/> <br/> %if len( library_dataset_actions ) > 0: - <h3>Library datasets associated with role '${role.name}'</h3> + <h3>Data library datasets associated with role '${role.name}'</h3> <table class="manage-table colored" border="0" cellspacing="0" cellpadding="0" width="100%"> <tr> <td> diff -r ea6708c96cd1 -r 3049432643f4 templates/admin/index.mako --- a/templates/admin/index.mako Wed Aug 19 17:27:00 2009 -0400 +++ b/templates/admin/index.mako Wed Aug 19 17:55:28 2009 -0400 @@ -89,7 +89,7 @@ </div> <div class="toolSectionBody"> <div class="toolSectionBg"> - <div class="toolTitle"><a href="${h.url_for( controller='admin', action='browse_libraries' )}" target="galaxy_main">Manage libraries</a></div> + <div class="toolTitle"><a href="${h.url_for( controller='admin', action='browse_libraries' )}" target="galaxy_main">Manage data libraries</a></div> </div> </div> <div class="toolSectionPad"></div> diff -r ea6708c96cd1 -r 3049432643f4 templates/admin/library/browse_libraries.mako --- a/templates/admin/library/browse_libraries.mako Wed Aug 19 17:27:00 2009 -0400 +++ b/templates/admin/library/browse_libraries.mako Wed Aug 19 17:55:28 2009 -0400 @@ -1,19 +1,19 @@ <%inherit file="/base.mako"/> <%namespace file="/message.mako" import="render_msg" /> -<%def name="title()">Browse Libraries</%def> +<%def name="title()">Browse Data Libraries</%def> <h2> %if deleted: Deleted %endif - Libraries + Data Libraries </h2> <ul class="manage-table-actions"> %if not deleted: <li> - <a class="action-button" href="${h.url_for( controller='admin', action='library', new=True )}"><span>Create a new library</span></a> + <a class="action-button" href="${h.url_for( controller='admin', action='library', new=True )}"><span>Create a new data library</span></a> </li> <li> <a class="action-button" href="${h.url_for( controller='admin', action='deleted_libraries' )}"><span>Manage deleted libraries</span></a> diff -r ea6708c96cd1 -r 3049432643f4 templates/admin/library/browse_library.mako --- a/templates/admin/library/browse_library.mako Wed Aug 19 17:27:00 2009 -0400 +++ b/templates/admin/library/browse_library.mako Wed Aug 19 17:55:28 2009 -0400 @@ -162,16 +162,16 @@ %if deleted: Deleted %endif - Library '${library.name}' + Data Library “${library.name}” </h2> <ul class="manage-table-actions"> %if not deleted: <li> - <a class="action-button" href="${h.url_for( controller='admin', action='library_dataset_dataset_association', library_id=library.id, folder_id=library.root_folder.id )}"><span>Add datasets to this library</span></a> + <a class="action-button" href="${h.url_for( controller='admin', action='library_dataset_dataset_association', library_id=library.id, folder_id=library.root_folder.id )}"><span>Add datasets to this data library</span></a> </li> <li> - <a class="action-button" href="${h.url_for( controller='admin', action='folder', new=True, id=library.root_folder.id, library_id=library.id )}">Add a folder to this library</a> + <a class="action-button" href="${h.url_for( controller='admin', action='folder', new=True, id=library.root_folder.id, library_id=library.id )}">Add a folder to this data library</a> </li> %endif </ul> @@ -200,24 +200,24 @@ library_item_ids = {} library_item_ids[ 'library' ] = library.id %> - <a class="action-button" href="${h.url_for( controller='admin', action='library', id=library.id, information=True )}">Edit this library's information</a> + <a class="action-button" href="${h.url_for( controller='admin', action='library', id=library.id, information=True )}">Edit this data library's information</a> ## Editing templates disabled until we determine optimal approach to re-linking library item to new version of form definition ##%if library.info_association: ## <% form_id = library.info_association[0].template.id %> - ## <a class="action-button" href="${h.url_for( controller='forms', action='edit', form_id=form_id, show_form=True )}">Edit this library's information template</a> + ## <a class="action-button" href="${h.url_for( controller='forms', action='edit', form_id=form_id, show_form=True )}">Edit this data library's information template</a> ##%else: %if not library.info_association: - <a class="action-button" href="${h.url_for( controller='admin', action='info_template', library_id=library.id, add=True )}">Add an information template to this library</a> + <a class="action-button" href="${h.url_for( controller='admin', action='info_template', library_id=library.id, add=True )}">Add an information template to this data library</a> %endif - <a class="action-button" href="${h.url_for( controller='admin', action='library', id=library.id, permissions=True )}">Edit this library's permissions</a> - <a class="action-button" confirm="Click OK to delete the library named '${library.name}'." href="${h.url_for( controller='admin', action='delete_library_item', library_id=library.id, library_item_id=library.id, library_item_type='library' )}">Delete this library and its contents</a> + <a class="action-button" href="${h.url_for( controller='admin', action='library', id=library.id, permissions=True )}">Edit this data library's permissions</a> + <a class="action-button" confirm="Click OK to delete the library named '${library.name}'." href="${h.url_for( controller='admin', action='delete_library_item', library_id=library.id, library_item_id=library.id, library_item_type='library' )}">Delete this data library and its contents</a> %if show_deleted: - <a class="action-button" href="${h.url_for( controller='admin', action='browse_library', id=library.id, show_deleted=False )}">Hide deleted library items</a> + <a class="action-button" href="${h.url_for( controller='admin', action='browse_library', id=library.id, show_deleted=False )}">Hide deleted data library items</a> %else: - <a class="action-button" href="${h.url_for( controller='admin', action='browse_library', id=library.id, show_deleted=True )}">Show deleted library items</a> + <a class="action-button" href="${h.url_for( controller='admin', action='browse_library', id=library.id, show_deleted=True )}">Show deleted data library items</a> %endif %elif not library.purged: - <a class="action-button" href="${h.url_for( controller='admin', action='undelete_library_item', library_id=library.id, library_item_id=library.id, library_item_type='library' )}">Undelete this library</a> + <a class="action-button" href="${h.url_for( controller='admin', action='undelete_library_item', library_id=library.id, library_item_id=library.id, library_item_type='library' )}">Undelete this data library</a> %endif </div> </th> diff -r ea6708c96cd1 -r 3049432643f4 templates/admin/library/folder_info.mako --- a/templates/admin/library/folder_info.mako Wed Aug 19 17:27:00 2009 -0400 +++ b/templates/admin/library/folder_info.mako Wed Aug 19 17:55:28 2009 -0400 @@ -5,7 +5,7 @@ <br/><br/> <ul class="manage-table-actions"> <li> - <a class="action-button" href="${h.url_for( controller='admin', action='browse_library', id=library_id )}"><span>Browse this library</span></a> + <a class="action-button" href="${h.url_for( controller='admin', action='browse_library', id=library_id )}"><span>Browse this data library</span></a> </li> </ul> diff -r ea6708c96cd1 -r 3049432643f4 templates/admin/library/folder_permissions.mako --- a/templates/admin/library/folder_permissions.mako Wed Aug 19 17:27:00 2009 -0400 +++ b/templates/admin/library/folder_permissions.mako Wed Aug 19 17:55:28 2009 -0400 @@ -5,7 +5,7 @@ <br/><br/> <ul class="manage-table-actions"> <li> - <a class="action-button" href="${h.url_for( controller='admin', action='browse_library', id=library_id )}"><span>Browse this library</span></a> + <a class="action-button" href="${h.url_for( controller='admin', action='browse_library', id=library_id )}"><span>Browse this data library</span></a> </li> </ul> diff -r ea6708c96cd1 -r 3049432643f4 templates/admin/library/ldda_edit_info.mako --- a/templates/admin/library/ldda_edit_info.mako Wed Aug 19 17:27:00 2009 -0400 +++ b/templates/admin/library/ldda_edit_info.mako Wed Aug 19 17:55:28 2009 -0400 @@ -12,7 +12,7 @@ <ul class="manage-table-actions"> <li> - <a class="action-button" href="${h.url_for( controller='admin', action='browse_library', id=library_id )}"><span>Browse this library</span></a> + <a class="action-button" href="${h.url_for( controller='admin', action='browse_library', id=library_id )}"><span>Browse this data library</span></a> </li> </ul> diff -r ea6708c96cd1 -r 3049432643f4 templates/admin/library/ldda_info.mako --- a/templates/admin/library/ldda_info.mako Wed Aug 19 17:27:00 2009 -0400 +++ b/templates/admin/library/ldda_info.mako Wed Aug 19 17:55:28 2009 -0400 @@ -20,7 +20,7 @@ <ul class="manage-table-actions"> <li> - <a class="action-button" href="${h.url_for( controller='admin', action='browse_library', id=library_id, deleted=library.deleted, show_deleted=show_deleted )}"><span>Browse this library</span></a> + <a class="action-button" href="${h.url_for( controller='admin', action='browse_library', id=library_id, deleted=library.deleted, show_deleted=show_deleted )}"><span>Browse this data library</span></a> </li> </ul> diff -r ea6708c96cd1 -r 3049432643f4 templates/admin/library/ldda_permissions.mako --- a/templates/admin/library/ldda_permissions.mako Wed Aug 19 17:27:00 2009 -0400 +++ b/templates/admin/library/ldda_permissions.mako Wed Aug 19 17:55:28 2009 -0400 @@ -15,7 +15,7 @@ <br/><br/> <ul class="manage-table-actions"> <li> - <a class="action-button" href="${h.url_for( controller='admin', action='browse_library', id=library_id )}"><span>Browse this library</span></a> + <a class="action-button" href="${h.url_for( controller='admin', action='browse_library', id=library_id )}"><span>Browse this data library</span></a> </li> </ul> diff -r ea6708c96cd1 -r 3049432643f4 templates/admin/library/library_dataset_info.mako --- a/templates/admin/library/library_dataset_info.mako Wed Aug 19 17:27:00 2009 -0400 +++ b/templates/admin/library/library_dataset_info.mako Wed Aug 19 17:55:28 2009 -0400 @@ -11,7 +11,7 @@ <ul class="manage-table-actions"> <li> - <a class="action-button" href="${h.url_for( controller='admin', action='browse_library', id=library_id )}"><span>Browse this library</span></a> + <a class="action-button" href="${h.url_for( controller='admin', action='browse_library', id=library_id )}"><span>Browse this data library</span></a> </li> </ul> diff -r ea6708c96cd1 -r 3049432643f4 templates/admin/library/library_dataset_permissions.mako --- a/templates/admin/library/library_dataset_permissions.mako Wed Aug 19 17:27:00 2009 -0400 +++ b/templates/admin/library/library_dataset_permissions.mako Wed Aug 19 17:55:28 2009 -0400 @@ -11,7 +11,7 @@ <ul class="manage-table-actions"> <li> - <a class="action-button" href="${h.url_for( controller='admin', action='browse_library', id=library_id )}"><span>Browse this library</span></a> + <a class="action-button" href="${h.url_for( controller='admin', action='browse_library', id=library_id )}"><span>Browse this data library</span></a> </li> </ul> diff -r ea6708c96cd1 -r 3049432643f4 templates/admin/library/library_info.mako --- a/templates/admin/library/library_info.mako Wed Aug 19 17:27:00 2009 -0400 +++ b/templates/admin/library/library_info.mako Wed Aug 19 17:55:28 2009 -0400 @@ -5,7 +5,7 @@ <br/><br/> <ul class="manage-table-actions"> <li> - <a class="action-button" href="${h.url_for( controller='admin', action='browse_library', id=library.id )}"><span>Browse this library</span></a> + <a class="action-button" href="${h.url_for( controller='admin', action='browse_library', id=library.id )}"><span>Browse this data library</span></a> </li> </ul> diff -r ea6708c96cd1 -r 3049432643f4 templates/admin/library/library_permissions.mako --- a/templates/admin/library/library_permissions.mako Wed Aug 19 17:27:00 2009 -0400 +++ b/templates/admin/library/library_permissions.mako Wed Aug 19 17:55:28 2009 -0400 @@ -5,7 +5,7 @@ <br/><br/> <ul class="manage-table-actions"> <li> - <a class="action-button" href="${h.url_for( controller='admin', action='browse_library', id=library.id )}"><span>Browse this library</span></a> + <a class="action-button" href="${h.url_for( controller='admin', action='browse_library', id=library.id )}"><span>Browse this data library</span></a> </li> </ul> diff -r ea6708c96cd1 -r 3049432643f4 templates/admin/library/new_dataset.mako --- a/templates/admin/library/new_dataset.mako Wed Aug 19 17:27:00 2009 -0400 +++ b/templates/admin/library/new_dataset.mako Wed Aug 19 17:55:28 2009 -0400 @@ -4,7 +4,7 @@ <% import os, os.path %> -<b>Create new library datasets</b> +<b>Create new data library datasets</b> <a id="upload-librarydataset--popup" class="popup-arrow" style="display: none;">▼</a> <div popupmenu="upload-librarydataset--popup"> <a class="action-button" href="${h.url_for( controller='admin', action='library_dataset_dataset_association', library_id=library_id, folder_id=folder_id, replace_id=replace_id, upload_option='upload_file' )}">Upload files</a> @@ -16,7 +16,7 @@ <br/><br/> <ul class="manage-table-actions"> <li> - <a class="action-button" href="${h.url_for( controller='admin', action='browse_library', id=library_id )}"><span>Browse this library</span></a> + <a class="action-button" href="${h.url_for( controller='admin', action='browse_library', id=library_id )}"><span>Browse this data library</span></a> </li> </ul> @@ -142,7 +142,7 @@ <textarea name="message" rows="3" cols="35"></textarea> </div> <div class="toolParamHelp" style="clear: both;"> - This information will be displayed in the "Information" column for this dataset in the library browser + This information will be displayed in the "Information" column for this dataset in the data library browser </div> <div style="clear: both"></div> </div> diff -r ea6708c96cd1 -r 3049432643f4 templates/admin/library/new_folder.mako --- a/templates/admin/library/new_folder.mako Wed Aug 19 17:27:00 2009 -0400 +++ b/templates/admin/library/new_folder.mako Wed Aug 19 17:55:28 2009 -0400 @@ -4,7 +4,7 @@ <br/<br/> <ul class="manage-table-actions"> <li> - <a class="action-button" href="${h.url_for( controller='admin', action='browse_library', id=library_id )}"><span>Browse this library</span></a> + <a class="action-button" href="${h.url_for( controller='admin', action='browse_library', id=library_id )}"><span>Browse this data library</span></a> </li> </ul> diff -r ea6708c96cd1 -r 3049432643f4 templates/admin/library/new_library.mako --- a/templates/admin/library/new_library.mako Wed Aug 19 17:27:00 2009 -0400 +++ b/templates/admin/library/new_library.mako Wed Aug 19 17:55:28 2009 -0400 @@ -6,13 +6,13 @@ %endif <div class="toolForm"> - <div class="toolFormTitle">Create a new library</div> + <div class="toolFormTitle">Create a new data library</div> <div class="toolFormBody"> <form name="library" action="${h.url_for( controller='admin', action='library' )}" method="post" > <div class="form-row"> <label>Name:</label> <div style="float: left; width: 250px; margin-right: 10px;"> - <input type="text" name="name" value="New Library" size="40"/> + <input type="text" name="name" value="New data library" size="40"/> </div> <div style="clear: both"></div> </div> diff -r ea6708c96cd1 -r 3049432643f4 templates/admin/library/select_info_template.mako --- a/templates/admin/library/select_info_template.mako Wed Aug 19 17:27:00 2009 -0400 +++ b/templates/admin/library/select_info_template.mako Wed Aug 19 17:55:28 2009 -0400 @@ -4,7 +4,7 @@ <br/><br/> <ul class="manage-table-actions"> <li> - <a class="action-button" href="${h.url_for( controller='admin', action='browse_library', id=library_id )}"><span>Browse this library</span></a> + <a class="action-button" href="${h.url_for( controller='admin', action='browse_library', id=library_id )}"><span>Browse this data library</span></a> </li> </ul> diff -r ea6708c96cd1 -r 3049432643f4 templates/admin/requests/show_request.mako --- a/templates/admin/requests/show_request.mako Wed Aug 19 17:27:00 2009 -0400 +++ b/templates/admin/requests/show_request.mako Wed Aug 19 17:55:28 2009 -0400 @@ -48,7 +48,7 @@ %if not rd['value']: <i>None</i> %else: - %if rd['label'] == 'Library': + %if rd['label'] == 'Data library': <a href="${h.url_for( controller='admin', action='browse_library', id=request.library.id )}">${rd['value']}</a> %else: ${rd['value']} diff -r ea6708c96cd1 -r 3049432643f4 templates/base_panels.mako --- a/templates/base_panels.mako Wed Aug 19 17:27:00 2009 -0400 +++ b/templates/base_panels.mako Wed Aug 19 17:55:28 2009 -0400 @@ -139,14 +139,14 @@ ${tab( "workflow", "Workflow", h.url_for( controller='workflow', action='index' ))} - ${tab( "libraries", "Libraries", h.url_for( controller='library', action='index' ))} + ${tab( "libraries", "Data Libraries", h.url_for( controller='library', action='index' ))} %if trans.request_types(): <td class="tab"> <a>Lab</a> <div class="submenu"> <ul> - <li><a target="requests" href="${h.url_for( controller='requests', action='index' )}">Sequencing Requests</a></li> + <li><a href="${h.url_for( controller='requests', action='index' )}">Sequencing Requests</a></li> </ul> </div> </td> diff -r ea6708c96cd1 -r 3049432643f4 templates/history/grid.mako --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/templates/history/grid.mako Wed Aug 19 17:55:28 2009 -0400 @@ -0,0 +1,196 @@ +<%inherit file="/base.mako"/> +<%def name="title()">${grid.title}</%def> + +%if message: + <p> + <div class="${message_type}message transient-message">${message}</div> + <div style="clear: both"></div> + </p> +%endif + +<%def name="javascripts()"> + ${parent.javascripts()} + <script type="text/javascript"> + ## TODO: generalize and move into galaxy.base.js + $(document).ready(function() { + $(".grid").each( function() { + var grid = this; + var checkboxes = $(this).find("input.grid-row-select-checkbox"); + var update = $(this).find( "span.grid-selected-count" ); + $(checkboxes).each( function() { + $(this).change( function() { + var n = $(checkboxes).filter("[checked]").size(); + update.text( n ); + }); + }) + }); + }); + ## Can this be moved into base.mako? + %if refresh_frames: + %if 'masthead' in refresh_frames: + ## Refresh masthead == user changes (backward compatibility) + if ( parent.user_changed ) { + %if trans.user: + parent.user_changed( "${trans.user.email}", ${int( app.config.is_admin_user( trans.user ) )} ); + %else: + parent.user_changed( null, false ); + %endif + } + %endif + %if 'history' in refresh_frames: + if ( parent.frames && parent.frames.galaxy_history ) { + parent.frames.galaxy_history.location.href="${h.url_for( controller='root', action='history')}"; + if ( parent.force_right_panel ) { + parent.force_right_panel( 'show' ); + } + } + %endif + %if 'tools' in refresh_frames: + if ( parent.frames && parent.frames.galaxy_tools ) { + parent.frames.galaxy_tools.location.href="${h.url_for( controller='root', action='tool_menu')}"; + if ( parent.force_left_panel ) { + parent.force_left_panel( 'show' ); + } + } + %endif + %endif + </script> +</%def> + +<%def name="stylesheets()"> + <link href="${h.url_for('/static/style/base.css')}" rel="stylesheet" type="text/css" /> + <style> + ## Not generic to all grids -- move to base? + .count-box { + min-width: 1.1em; + padding: 5px; + border-width: 1px; + border-style: solid; + text-align: center; + display: inline-block; + } + </style> +</%def> + +%if grid.standard_filters: + <div class="grid-header"> + <h2>${grid.title}</h2> + <span class="title">Filter:</span> + %for i, filter in enumerate( grid.standard_filters ): + %if i > 0: + <span>|</span> + %endif + <span class="filter"><a href="${url( filter.get_url_args() )}">${filter.label}</a></span> + %endfor + </div> +%endif + +<form name="history_actions" action="${url()}" method="post" > + <table class="grid"> + <thead> + <tr> + <th></th> + %for column in grid.columns: + %if column.visible: + <% + href = "" + extra = "" + if column.sortable: + if sort_key == column.key: + if sort_order == "asc": + href = url( sort=( "-" + column.key ) ) + extra = "↓" + else: + href = url( sort=( column.key ) ) + extra = "↑" + else: + href = url( sort=column.key ) + %> + <th\ + %if column.ncells > 1: + colspan="${column.ncells}" + %endif + > + %if href: + <a href="${href}">${column.label}</a> + %else: + ${column.label} + %endif + <span>${extra}</span> + </th> + %endif + %endfor + <th></th> + </tr> + </thead> + <tbody> + %for i, item in enumerate( query ): + <tr \ + %if current_item == item: + class="current" \ + %endif + > + ## Item selection column + <td style="width: 1.5em;"> + <input type="checkbox" name="id" value=${trans.security.encode_id( item.id )} class="grid-row-select-checkbox" /> + </td> + ## Data columns + %for column in grid.columns: + %if column.visible: + <% + # Link + link = column.get_link( trans, grid, item ) + if link: + href = url( **link ) + else: + href = None + # Value (coerced to list so we can loop) + value = column.get_value( trans, grid, item ) + if column.ncells == 1: + value = [ value ] + %> + %for cellnum, v in enumerate( value ): + <% + # Attach popup menu? + if column.attach_popup and cellnum == 0: + extra = '<a id="grid-%d-popup" class="popup-arrow" style="display: none;">▼</a>' % i + else: + extra = "" + %> + %if href: + <td><a href="${href}">${v}</a> ${extra}</td> + %else: + <td >${v}${extra}</td> + %endif + </td> + %endfor + %endif + %endfor + ## Actions column + <td> + <div popupmenu="grid-${i}-popup"> + %for operation in grid.operations: + %if operation.allowed( item ): + <a class="action-button" href="${url( operation=operation.label, id=item.id )}">${operation.label}</a> + %endif + %endfor + </div> + </td> + </tr> + %endfor + </tbody> + <tfoot> + <tr> + <td></td> + <td colspan="100"> + For <span class="grid-selected-count"></span> selected histories: + %for operation in grid.operations: + %if operation.allow_multiple: + <input type="submit" name="operation" value="${operation.label}" class="action-button"> + %endif + %endfor + </td> + </tr> + </tfoot> + </table> +</form> diff -r ea6708c96cd1 -r 3049432643f4 templates/history/shared_grid.mako --- a/templates/history/shared_grid.mako Wed Aug 19 17:27:00 2009 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,197 +0,0 @@ -<%inherit file="/base.mako"/> -<%namespace file="/message.mako" import="render_msg" /> - -<%def name="title()">${grid.title}</%def> - -<%def name="javascripts()"> - ${parent.javascripts()} - <script type="text/javascript"> - ## TODO: generalize and move into galaxy.base.js - $(document).ready(function() { - $(".grid").each( function() { - var grid = this; - var checkboxes = $(this).find("input.grid-row-select-checkbox"); - var update = $(this).find( "span.grid-selected-count" ); - $(checkboxes).each( function() { - $(this).change( function() { - var n = $(checkboxes).filter("[checked]").size(); - update.text( n ); - }); - }) - }); - }); - ## Can this be moved into base.mako? - %if refresh_frames: - %if 'masthead' in refresh_frames: - ## Refresh masthead == user changes (backward compatibility) - if ( parent.user_changed ) { - %if trans.user: - parent.user_changed( "${trans.user.email}", ${int( app.config.is_admin_user( trans.user ) )} ); - %else: - parent.user_changed( null, false ); - %endif - } - %endif - %if 'history' in refresh_frames: - if ( parent.frames && parent.frames.galaxy_history ) { - parent.frames.galaxy_history.location.href="${h.url_for( controller='root', action='history')}"; - if ( parent.force_right_panel ) { - parent.force_right_panel( 'show' ); - } - } - %endif - %if 'tools' in refresh_frames: - if ( parent.frames && parent.frames.galaxy_tools ) { - parent.frames.galaxy_tools.location.href="${h.url_for( controller='root', action='tool_menu')}"; - if ( parent.force_left_panel ) { - parent.force_left_panel( 'show' ); - } - } - %endif - %endif - </script> -</%def> - -<%def name="stylesheets()"> - <link href="${h.url_for('/static/style/base.css')}" rel="stylesheet" type="text/css" /> - <style> - ## Not generic to all grids -- move to base? - .count-box { - min-width: 1.1em; - padding: 5px; - border-width: 1px; - border-style: solid; - text-align: center; - display: inline-block; - } - </style> -</%def> - -%if grid.standard_filters: - <div class="grid-header"> - <h2>${grid.title}</h2> - <span class="title">Filter:</span> - %for i, filter in enumerate( grid.standard_filters ): - %if i > 0: - <span>|</span> - %endif - <span class="filter"><a href="${url( filter.get_url_args() )}">${filter.label}</a></span> - %endfor - </div> -%endif - -%if message: - <p> - <div class="${message_type}message transient-message">${message}</div> - <div style="clear: both"></div> - </p> -%endif -%if msg: - ${render_msg( msg, messagetype )} -%endif - -<form name="history_shared_by_others" action="${url()}" method="post" > - <table class="grid"> - <thead> - <tr> - <th></th> - %for column in grid.columns: - %if column.visible: - <% - href = "" - extra = "" - if column.sortable: - if sort_key == column.key: - if sort_order == "asc": - href = url( sort=( "-" + column.key ) ) - extra = "↓" - else: - href = url( sort=( column.key ) ) - extra = "↑" - else: - href = url( sort=column.key ) - %> - <th\ - %if column.ncells > 1: - colspan="${column.ncells}" - %endif - > - %if href: - <a href="${href}">${column.label}</a> - %else: - ${column.label} - %endif - <span>${extra}</span> - </th> - %endif - %endfor - <th></th> - </tr> - </thead> - <tbody> - %for i, history in enumerate( query ): - <tr> - ## Item selection column - <td style="width: 1.5em;"> - <input type="checkbox" name="id" value=${trans.security.encode_id( history.id )} class="grid-row-select-checkbox" /> - </td> - ## Data columns - %for column in grid.columns: - %if column.visible: - <% - # Link - link = column.get_link( trans, grid, history ) - if link: - href = url( **link ) - else: - href = None - # Value (coerced to list so we can loop) - value = column.get_value( trans, grid, history ) - if column.ncells == 1: - value = [ value ] - %> - %for cellnum, v in enumerate( value ): - <% - # Attach popup menu? - if column.attach_popup and cellnum == 0: - extra = '<a id="grid-%d-popup" class="popup-arrow" style="display: none;">▼</a>' % i - else: - extra = "" - %> - %if href: - <td><a href="${href}">${v}</a> ${extra}</td> - %else: - <td >${v}${extra}</td> - %endif - </td> - %endfor - %endif - %endfor - ## Actions column - <td> - <div popupmenu="grid-${i}-popup"> - %for operation in grid.operations: - %if operation.allowed( history ): - <a class="action-button" href="${url( operation=operation.label, id=history.id )}">${operation.label}</a> - %endif - %endfor - </div> - </td> - </tr> - %endfor - </tbody> - <tfoot> - <tr> - <td></td> - <td colspan="100"> - For <span class="grid-selected-count"></span> selected histories: - %for operation in grid.operations: - %if operation.allow_multiple: - <input type="submit" name="operation" value="${operation.label}" class="action-button"> - %endif - %endfor - </td> - </tr> - </tfoot> - </table> -</form> diff -r ea6708c96cd1 -r 3049432643f4 templates/history/stored_grid.mako --- a/templates/history/stored_grid.mako Wed Aug 19 17:27:00 2009 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,196 +0,0 @@ -<%inherit file="/base.mako"/> -<%def name="title()">${grid.title}</%def> - -%if message: - <p> - <div class="${message_type}message transient-message">${message}</div> - <div style="clear: both"></div> - </p> -%endif - -<%def name="javascripts()"> - ${parent.javascripts()} - <script type="text/javascript"> - ## TODO: generalize and move into galaxy.base.js - $(document).ready(function() { - $(".grid").each( function() { - var grid = this; - var checkboxes = $(this).find("input.grid-row-select-checkbox"); - var update = $(this).find( "span.grid-selected-count" ); - $(checkboxes).each( function() { - $(this).change( function() { - var n = $(checkboxes).filter("[checked]").size(); - update.text( n ); - }); - }) - }); - }); - ## Can this be moved into base.mako? - %if refresh_frames: - %if 'masthead' in refresh_frames: - ## Refresh masthead == user changes (backward compatibility) - if ( parent.user_changed ) { - %if trans.user: - parent.user_changed( "${trans.user.email}", ${int( app.config.is_admin_user( trans.user ) )} ); - %else: - parent.user_changed( null, false ); - %endif - } - %endif - %if 'history' in refresh_frames: - if ( parent.frames && parent.frames.galaxy_history ) { - parent.frames.galaxy_history.location.href="${h.url_for( controller='root', action='history')}"; - if ( parent.force_right_panel ) { - parent.force_right_panel( 'show' ); - } - } - %endif - %if 'tools' in refresh_frames: - if ( parent.frames && parent.frames.galaxy_tools ) { - parent.frames.galaxy_tools.location.href="${h.url_for( controller='root', action='tool_menu')}"; - if ( parent.force_left_panel ) { - parent.force_left_panel( 'show' ); - } - } - %endif - %endif - </script> -</%def> - -<%def name="stylesheets()"> - <link href="${h.url_for('/static/style/base.css')}" rel="stylesheet" type="text/css" /> - <style> - ## Not generic to all grids -- move to base? - .count-box { - min-width: 1.1em; - padding: 5px; - border-width: 1px; - border-style: solid; - text-align: center; - display: inline-block; - } - </style> -</%def> - -%if grid.standard_filters: - <div class="grid-header"> - <h2>${grid.title}</h2> - <span class="title">Filter:</span> - %for i, filter in enumerate( grid.standard_filters ): - %if i > 0: - <span>|</span> - %endif - <span class="filter"><a href="${url( filter.get_url_args() )}">${filter.label}</a></span> - %endfor - </div> -%endif - -<form name="history_actions" action="${url()}" method="post" > - <table class="grid"> - <thead> - <tr> - <th></th> - %for column in grid.columns: - %if column.visible: - <% - href = "" - extra = "" - if column.sortable: - if sort_key == column.key: - if sort_order == "asc": - href = url( sort=( "-" + column.key ) ) - extra = "↓" - else: - href = url( sort=( column.key ) ) - extra = "↑" - else: - href = url( sort=column.key ) - %> - <th\ - %if column.ncells > 1: - colspan="${column.ncells}" - %endif - > - %if href: - <a href="${href}">${column.label}</a> - %else: - ${column.label} - %endif - <span>${extra}</span> - </th> - %endif - %endfor - <th></th> - </tr> - </thead> - <tbody> - %for i, item in enumerate( query ): - <tr \ - %if current_item == item: - class="current" \ - %endif - > - ## Item selection column - <td style="width: 1.5em;"> - <input type="checkbox" name="id" value=${trans.security.encode_id( item.id )} class="grid-row-select-checkbox" /> - </td> - ## Data columns - %for column in grid.columns: - %if column.visible: - <% - # Link - link = column.get_link( trans, grid, item ) - if link: - href = url( **link ) - else: - href = None - # Value (coerced to list so we can loop) - value = column.get_value( trans, grid, item ) - if column.ncells == 1: - value = [ value ] - %> - %for cellnum, v in enumerate( value ): - <% - # Attach popup menu? - if column.attach_popup and cellnum == 0: - extra = '<a id="grid-%d-popup" class="popup-arrow" style="display: none;">▼</a>' % i - else: - extra = "" - %> - %if href: - <td><a href="${href}">${v}</a> ${extra}</td> - %else: - <td >${v}${extra}</td> - %endif - </td> - %endfor - %endif - %endfor - ## Actions column - <td> - <div popupmenu="grid-${i}-popup"> - %for operation in grid.operations: - %if operation.allowed( item ): - <a class="action-button" href="${url( operation=operation.label, id=item.id )}">${operation.label}</a> - %endif - %endfor - </div> - </td> - </tr> - %endfor - </tbody> - <tfoot> - <tr> - <td></td> - <td colspan="100"> - For <span class="grid-selected-count"></span> selected histories: - %for operation in grid.operations: - %if operation.allow_multiple: - <input type="submit" name="operation" value="${operation.label}" class="action-button"> - %endif - %endfor - </td> - </tr> - </tfoot> - </table> -</form> diff -r ea6708c96cd1 -r 3049432643f4 templates/library/browse_libraries.mako --- a/templates/library/browse_libraries.mako Wed Aug 19 17:27:00 2009 -0400 +++ b/templates/library/browse_libraries.mako Wed Aug 19 17:55:28 2009 -0400 @@ -1,9 +1,9 @@ <%inherit file="/base.mako"/> <%namespace file="/message.mako" import="render_msg" /> -<%def name="title()">Browse Libraries</%def> +<%def name="title()">Browse Data Libraries</%def> -<h2>Libraries</h2> +<h2>Data Libraries</h2> %if msg: ${render_msg( msg, messagetype )} diff -r ea6708c96cd1 -r 3049432643f4 templates/library/browse_library.mako --- a/templates/library/browse_library.mako Wed Aug 19 17:27:00 2009 -0400 +++ b/templates/library/browse_library.mako Wed Aug 19 17:55:28 2009 -0400 @@ -2,7 +2,7 @@ <%namespace file="/message.mako" import="render_msg" /> <% from galaxy import util %> -<%def name="title()">Browse Library</%def> +<%def name="title()">Browse data library</%def> <%def name="stylesheets()"> <link href="${h.url_for('/static/style/base.css')}" rel="stylesheet" type="text/css" /> <link href="${h.url_for('/static/style/library.css')}" rel="stylesheet" type="text/css" /> @@ -38,14 +38,21 @@ descendents = descendents.add( child_descendents ); }); // Set up expand / hide link + // HACK: assume descendents are invisible. The caller actually + // ensures this for the root node. However, if we start + // remembering folder states, we'll need something + // more sophisticated here. + var visible = false; $(q).find( "span.expandLink").click( function() { - if ( children.is( ":visible" ) ) { + if ( visible ) { descendents.hide(); descendents.removeClass( "expanded" ); q.removeClass( "expanded" ); + visible = false; } else { children.show(); q.addClass( "expanded" ); + visible = true; } }); // Check/uncheck boxes in subfolders. @@ -211,7 +218,7 @@ %endfor </%def> -<h2>Library “${library.name}”</h2> +<h2>Data Library “${library.name}”</h2> <ul class="manage-table-actions"> %if trans.app.security_agent.allow_action( trans.user, trans.app.security_agent.permitted_actions.LIBRARY_ADD, library_item=library ): diff -r ea6708c96cd1 -r 3049432643f4 templates/library/folder_info.mako --- a/templates/library/folder_info.mako Wed Aug 19 17:27:00 2009 -0400 +++ b/templates/library/folder_info.mako Wed Aug 19 17:55:28 2009 -0400 @@ -5,7 +5,7 @@ <br/><br/> <ul class="manage-table-actions"> <li> - <a class="action-button" href="${h.url_for( controller='library', action='browse_library', id=library_id )}"><span>Browse this library</span></a> + <a class="action-button" href="${h.url_for( controller='library', action='browse_library', id=library_id )}"><span>Browse this data library</span></a> </li> </ul> diff -r ea6708c96cd1 -r 3049432643f4 templates/library/folder_permissions.mako --- a/templates/library/folder_permissions.mako Wed Aug 19 17:27:00 2009 -0400 +++ b/templates/library/folder_permissions.mako Wed Aug 19 17:55:28 2009 -0400 @@ -5,7 +5,7 @@ <br/><br/> <ul class="manage-table-actions"> <li> - <a class="action-button" href="${h.url_for( controller='library', action='browse_library', id=library_id )}"><span>Browse this library</span></a> + <a class="action-button" href="${h.url_for( controller='library', action='browse_library', id=library_id )}"><span>Browse this data library</span></a> </li> </ul> diff -r ea6708c96cd1 -r 3049432643f4 templates/library/ldda_edit_info.mako --- a/templates/library/ldda_edit_info.mako Wed Aug 19 17:27:00 2009 -0400 +++ b/templates/library/ldda_edit_info.mako Wed Aug 19 17:55:28 2009 -0400 @@ -12,7 +12,7 @@ <ul class="manage-table-actions"> <li> - <a class="action-button" href="${h.url_for( controller='library', action='browse_library', id=library_id )}"><span>Browse this library</span></a> + <a class="action-button" href="${h.url_for( controller='library', action='browse_library', id=library_id )}"><span>Browse this data library</span></a> </li> </ul> diff -r ea6708c96cd1 -r 3049432643f4 templates/library/ldda_info.mako --- a/templates/library/ldda_info.mako Wed Aug 19 17:27:00 2009 -0400 +++ b/templates/library/ldda_info.mako Wed Aug 19 17:55:28 2009 -0400 @@ -19,7 +19,7 @@ <ul class="manage-table-actions"> <li> - <a class="action-button" href="${h.url_for( controller='library', action='browse_library', id=library_id )}"><span>Browse this library</span></a> + <a class="action-button" href="${h.url_for( controller='library', action='browse_library', id=library_id )}"><span>Browse this data library</span></a> </li> </ul> diff -r ea6708c96cd1 -r 3049432643f4 templates/library/ldda_permissions.mako --- a/templates/library/ldda_permissions.mako Wed Aug 19 17:27:00 2009 -0400 +++ b/templates/library/ldda_permissions.mako Wed Aug 19 17:55:28 2009 -0400 @@ -15,7 +15,7 @@ <br/><br/> <ul class="manage-table-actions"> <li> - <a class="action-button" href="${h.url_for( controller='library', action='browse_library', id=library_id )}"><span>Browse this library</span></a> + <a class="action-button" href="${h.url_for( controller='library', action='browse_library', id=library_id )}"><span>Browse this data library</span></a> </li> </ul> diff -r ea6708c96cd1 -r 3049432643f4 templates/library/library_dataset_info.mako --- a/templates/library/library_dataset_info.mako Wed Aug 19 17:27:00 2009 -0400 +++ b/templates/library/library_dataset_info.mako Wed Aug 19 17:55:28 2009 -0400 @@ -11,7 +11,7 @@ <ul class="manage-table-actions"> <li> - <a class="action-button" href="${h.url_for( controller='library', action='browse_library', id=library_id )}"><span>Browse this library</span></a> + <a class="action-button" href="${h.url_for( controller='library', action='browse_library', id=library_id )}"><span>Browse this data library</span></a> </li> </ul> diff -r ea6708c96cd1 -r 3049432643f4 templates/library/library_dataset_permissions.mako --- a/templates/library/library_dataset_permissions.mako Wed Aug 19 17:27:00 2009 -0400 +++ b/templates/library/library_dataset_permissions.mako Wed Aug 19 17:55:28 2009 -0400 @@ -11,7 +11,7 @@ <ul class="manage-table-actions"> <li> - <a class="action-button" href="${h.url_for( controller='library', action='browse_library', id=library_id )}"><span>Browse this library</span></a> + <a class="action-button" href="${h.url_for( controller='library', action='browse_library', id=library_id )}"><span>Browse this data library</span></a> </li> </ul> diff -r ea6708c96cd1 -r 3049432643f4 templates/library/library_info.mako --- a/templates/library/library_info.mako Wed Aug 19 17:27:00 2009 -0400 +++ b/templates/library/library_info.mako Wed Aug 19 17:55:28 2009 -0400 @@ -5,7 +5,7 @@ <br/><br/> <ul class="manage-table-actions"> <li> - <a class="action-button" href="${h.url_for( controller='library', action='browse_library', id=library.id )}"><span>Browse this library</span></a> + <a class="action-button" href="${h.url_for( controller='library', action='browse_library', id=library.id )}"><span>Browse this data library</span></a> </li> </ul> diff -r ea6708c96cd1 -r 3049432643f4 templates/library/library_permissions.mako --- a/templates/library/library_permissions.mako Wed Aug 19 17:27:00 2009 -0400 +++ b/templates/library/library_permissions.mako Wed Aug 19 17:55:28 2009 -0400 @@ -5,7 +5,7 @@ <br/><br/> <ul class="manage-table-actions"> <li> - <a class="action-button" href="${h.url_for( controller='library', action='browse_library', id=library.id )}"><span>Browse this library</span></a> + <a class="action-button" href="${h.url_for( controller='library', action='browse_library', id=library.id )}"><span>Browse this data library</span></a> </li> </ul> diff -r ea6708c96cd1 -r 3049432643f4 templates/library/new_dataset.mako --- a/templates/library/new_dataset.mako Wed Aug 19 17:27:00 2009 -0400 +++ b/templates/library/new_dataset.mako Wed Aug 19 17:55:28 2009 -0400 @@ -16,7 +16,7 @@ <br/><br/> <ul class="manage-table-actions"> <li> - <a class="action-button" href="${h.url_for( controller='library', action='browse_library', id=library_id )}"><span>Browse this library</span></a> + <a class="action-button" href="${h.url_for( controller='library', action='browse_library', id=library_id )}"><span>Browse this data library</span></a> </li> </ul> @@ -68,7 +68,7 @@ %elif upload_option == 'upload_directory': <div class="form-row"> <% - # Directories of files from the Libraries view are restricted to a + # Directories of files from the Data Libraries view are restricted to a # sub-directory named the same as the current user's email address # contained within the configured setting for user_library_import_dir user_library_import_dir = os.path.join( trans.app.config.user_library_import_dir, trans.user.email ) diff -r ea6708c96cd1 -r 3049432643f4 templates/library/new_folder.mako --- a/templates/library/new_folder.mako Wed Aug 19 17:27:00 2009 -0400 +++ b/templates/library/new_folder.mako Wed Aug 19 17:55:28 2009 -0400 @@ -4,7 +4,7 @@ <br/<br/> <ul class="manage-table-actions"> <li> - <a class="action-button" href="${h.url_for( controller='library', action='browse_library', id=library_id )}"><span>Browse this library</span></a> + <a class="action-button" href="${h.url_for( controller='library', action='browse_library', id=library_id )}"><span>Browse this data library</span></a> </li> </ul> diff -r ea6708c96cd1 -r 3049432643f4 templates/library/select_info_template.mako --- a/templates/library/select_info_template.mako Wed Aug 19 17:27:00 2009 -0400 +++ b/templates/library/select_info_template.mako Wed Aug 19 17:55:28 2009 -0400 @@ -4,7 +4,7 @@ <br/><br/> <ul class="manage-table-actions"> <li> - <a class="action-button" href="${h.url_for( controller='library', action='browse_library', id=library_id )}"><span>Browse this library</span></a> + <a class="action-button" href="${h.url_for( controller='library', action='browse_library', id=library_id )}"><span>Browse this data library</span></a> </li> </ul> diff -r ea6708c96cd1 -r 3049432643f4 templates/requests/edit_request.mako --- a/templates/requests/edit_request.mako Wed Aug 19 17:27:00 2009 -0400 +++ b/templates/requests/edit_request.mako Wed Aug 19 17:55:28 2009 -0400 @@ -58,7 +58,7 @@ <div class="form-row"> <label>${field['label']}</label> ${field['widget'].get_html()} - %if field['label'] == 'Library' and new_library: + %if field['label'] == 'Data library' and new_library: ${new_library.get_html()} %endif <div class="toolParamHelp" style="clear: both;"> diff -r ea6708c96cd1 -r 3049432643f4 templates/requests/new_request.mako --- a/templates/requests/new_request.mako Wed Aug 19 17:27:00 2009 -0400 +++ b/templates/requests/new_request.mako Wed Aug 19 17:55:28 2009 -0400 @@ -58,7 +58,7 @@ <div class="form-row"> <label>${field['label']}</label> ${field['widget'].get_html()} - %if field['label'] == 'Library' and new_library: + %if field['label'] == 'Data library' and new_library: ${new_library.get_html()} %endif <div class="toolParamHelp" style="clear: both;"> diff -r ea6708c96cd1 -r 3049432643f4 templates/requests/show_request.mako --- a/templates/requests/show_request.mako Wed Aug 19 17:27:00 2009 -0400 +++ b/templates/requests/show_request.mako Wed Aug 19 17:55:28 2009 -0400 @@ -79,7 +79,7 @@ %if not rd['value']: <i>None</i> %else: - %if rd['label'] == 'Library': + %if rd['label'] == 'Data library': %if rd['value']: <a href="${h.url_for( controller='library', action='browse_library', id=request.library.id )}">${rd['value']}</a> %else: diff -r ea6708c96cd1 -r 3049432643f4 test/base/twilltestcase.py --- a/test/base/twilltestcase.py Wed Aug 19 17:27:00 2009 -0400 +++ b/test/base/twilltestcase.py Wed Aug 19 17:55:28 2009 -0400 @@ -1003,7 +1003,7 @@ """Create a new library""" self.home() self.visit_url( "%s/admin/library?new=True" % self.url ) - self.check_page_for_string( 'Create a new library' ) + self.check_page_for_string( 'Create a new data library' ) tc.fv( "1", "1", name ) # form field 1 is the field named name... tc.fv( "1", "2", description ) # form field 1 is the field named name... tc.submit( "create_library_button" ) diff -r ea6708c96cd1 -r 3049432643f4 test/functional/test_security_and_libraries.py --- a/test/functional/test_security_and_libraries.py Wed Aug 19 17:27:00 2009 -0400 +++ b/test/functional/test_security_and_libraries.py Wed Aug 19 17:55:28 2009 -0400 @@ -1451,7 +1451,7 @@ check_edit_page2( latest_3_lddas ) self.home() def test_195_upload_directory_of_files_from_libraries_view( self ): - """Testing uploading a directory of files to a root folder from the Libraries view""" + """Testing uploading a directory of files to a root folder from the Data Libraries view""" # admin_user will not have the option sto upload a directory of files from the # Libraries view since a sub-directory named the same as their email is not contained # in the configured user_library_import_dir. However, since members of role_one have diff -r ea6708c96cd1 -r 3049432643f4 tools/data_source/genbank.py --- a/tools/data_source/genbank.py Wed Aug 19 17:27:00 2009 -0400 +++ b/tools/data_source/genbank.py Wed Aug 19 17:55:28 2009 -0400 @@ -1,6 +1,6 @@ #!/usr/bin/env python from Bio import GenBank -import sys, os, sets, textwrap +import sys, os, textwrap assert sys.version_info[:2] >= ( 2, 4 ) diff -r ea6708c96cd1 -r 3049432643f4 tools/data_source/ucsc_proxy.py --- a/tools/data_source/ucsc_proxy.py Wed Aug 19 17:27:00 2009 -0400 +++ b/tools/data_source/ucsc_proxy.py Wed Aug 19 17:55:28 2009 -0400 @@ -1,6 +1,6 @@ #!/usr/bin/env python import urllib -import sys, os, sets +import sys, os assert sys.version_info[:2] >= ( 2, 4 ) diff -r ea6708c96cd1 -r 3049432643f4 tools/new_operations/get_flanks.py --- a/tools/new_operations/get_flanks.py Wed Aug 19 17:27:00 2009 -0400 +++ b/tools/new_operations/get_flanks.py Wed Aug 19 17:55:28 2009 -0400 @@ -9,7 +9,7 @@ -o, --off=N: Offset """ -import sys, sets, re, os +import sys, re, os from galaxy import eggs import pkg_resources; pkg_resources.require( "bx-python" ) from bx.cookbook import doc_optparse diff -r ea6708c96cd1 -r 3049432643f4 tools/new_operations/operation_filter.py --- a/tools/new_operations/operation_filter.py Wed Aug 19 17:27:00 2009 -0400 +++ b/tools/new_operations/operation_filter.py Wed Aug 19 17:55:28 2009 -0400 @@ -1,8 +1,13 @@ # runs after the job (and after the default post-filter) -import sets, os +import os from galaxy import eggs from galaxy import jobs from galaxy.tools.parameters import DataToolParameter +# Older py compatibility +try: + set() +except: + from sets import Set as set #def exec_before_process(app, inp_data, out_data, param_dict, tool=None): # """Sets the name of the data""" @@ -11,8 +16,8 @@ # raise Exception, '<p><font color="yellow">Both Queries must be from the same genome build</font></p>' def validate_input( trans, error_map, param_values, page_param_map ): - dbkeys = sets.Set() - data_param_names = sets.Set() + dbkeys = set() + data_param_names = set() data_params = 0 for name, param in page_param_map.iteritems(): if isinstance( param, DataToolParameter ): diff -r ea6708c96cd1 -r 3049432643f4 tools/new_operations/subtract_query.py --- a/tools/new_operations/subtract_query.py Wed Aug 19 17:27:00 2009 -0400 +++ b/tools/new_operations/subtract_query.py Wed Aug 19 17:55:28 2009 -0400 @@ -5,12 +5,16 @@ Subtract an entire query from another query usage: %prog in_file_1 in_file_2 begin_col end_col output """ - -import sys, sets, re - +import sys, re from galaxy import eggs import pkg_resources; pkg_resources.require( "bx-python" ) from bx.cookbook import doc_optparse + +# Older py compatibility +try: + set() +except: + from sets import Set as set assert sys.version_info[:2] >= ( 2, 4 ) diff -r ea6708c96cd1 -r 3049432643f4 tools/regVariation/windowSplitter.py --- a/tools/regVariation/windowSplitter.py Wed Aug 19 17:27:00 2009 -0400 +++ b/tools/regVariation/windowSplitter.py Wed Aug 19 17:55:28 2009 -0400 @@ -7,7 +7,7 @@ -l, --cols=N,N,N,N: Columns for chrom, start, end, strand in file """ -import sys, sets, re, os +import sys, re, os from galaxy import eggs import pkg_resources; pkg_resources.require( "bx-python" ) diff -r ea6708c96cd1 -r 3049432643f4 tools/stats/column_maker.py --- a/tools/stats/column_maker.py Wed Aug 19 17:27:00 2009 -0400 +++ b/tools/stats/column_maker.py Wed Aug 19 17:55:28 2009 -0400 @@ -2,7 +2,7 @@ # This tool takes a tab-delimited textfile as input and creates another column in the file which is the result of # a computation performed on every row in the original file. The tool will skip over invalid lines within the file, # informing the user about the number of lines skipped. -import sys, sets, re, os.path +import sys, re, os.path from galaxy import eggs from galaxy.tools import validation from galaxy.datatypes import metadata diff -r ea6708c96cd1 -r 3049432643f4 tools/stats/filtering.py --- a/tools/stats/filtering.py Wed Aug 19 17:27:00 2009 -0400 +++ b/tools/stats/filtering.py Wed Aug 19 17:55:28 2009 -0400 @@ -2,8 +2,13 @@ # This tool takes a tab-delimited text file as input and creates filters on columns based on certain properties. # The tool will skip over invalid lines within the file, informing the user about the number of lines skipped. -import sys, sets, re, os.path +import sys, re, os.path from galaxy import eggs +# Older py compatibility +try: + set() +except: + from sets import Set as set assert sys.version_info[:2] >= ( 2, 4 ) @@ -13,7 +18,7 @@ for item in items_to_strip: if filter_condition.find( item ) >= 0: filter_condition = filter_condition.replace( item, ' ' ) - operands = sets.Set( filter_condition.split( ' ' ) ) + operands = set( filter_condition.split( ' ' ) ) return operands def stop_err( msg ): diff -r ea6708c96cd1 -r 3049432643f4 tools/stats/grouping.py --- a/tools/stats/grouping.py Wed Aug 19 17:27:00 2009 -0400 +++ b/tools/stats/grouping.py Wed Aug 19 17:55:28 2009 -0400 @@ -3,7 +3,7 @@ """ This tool provides the SQL "group by" functionality. """ -import sys, string, re, commands, tempfile, random, sets +import sys, string, re, commands, tempfile, random from rpy import * def stop_err(msg): diff -r ea6708c96cd1 -r 3049432643f4 tools/stats/gsummary.py --- a/tools/stats/gsummary.py Wed Aug 19 17:27:00 2009 -0400 +++ b/tools/stats/gsummary.py Wed Aug 19 17:55:28 2009 -0400 @@ -1,7 +1,12 @@ #!/usr/bin/python -import sys, sets, re, tempfile +import sys, re, tempfile from rpy import * +# Older py compatibility +try: + set() +except: + from sets import Set as set assert sys.version_info[:2] >= ( 2, 4 ) @@ -33,7 +38,7 @@ for word in re.compile( '[a-zA-Z]+' ).findall( expression ): if word and not word in math_allowed: stop_err( "Invalid expression '%s': term '%s' is not recognized or allowed" %( expression, word ) ) - symbols = sets.Set() + symbols = set() for symbol in re.compile( '[^a-z0-9\s]+' ).findall( expression ): if symbol and not symbol in ops_allowed: stop_err( "Invalid expression '%s': operator '%s' is not recognized or allowed" % ( expression, symbol ) ) diff -r ea6708c96cd1 -r 3049432643f4 tools/visualization/build_ucsc_custom_track_code.py --- a/tools/visualization/build_ucsc_custom_track_code.py Wed Aug 19 17:27:00 2009 -0400 +++ b/tools/visualization/build_ucsc_custom_track_code.py Wed Aug 19 17:55:28 2009 -0400 @@ -1,6 +1,10 @@ # runs after the job (and after the default post-filter) -from sets import Set as set +# Older py compatibility +try: + set() +except: + from sets import Set as set def validate_input( trans, error_map, param_values, page_param_map ): dbkeys = set() diff -r ea6708c96cd1 -r 3049432643f4 tools/visualization/genetrack_code.py --- a/tools/visualization/genetrack_code.py Wed Aug 19 17:27:00 2009 -0400 +++ b/tools/visualization/genetrack_code.py Wed Aug 19 17:55:28 2009 -0400 @@ -1,4 +1,4 @@ -import sets, os +import os from galaxy import eggs from galaxy import jobs from galaxy.tools.parameters import DataToolParameter
participants (1)
-
Greg Von Kuster