2 new commits in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/edab395a78b1/
Changeset: edab395a78b1
Branch: tool_api
User: Kyle Ellrott
Date: 2013-10-25 01:34:30
Summary: Adding output_name to /api/tool submit output. So files created by a tool can be mapped to the possible multiple output declaration it could have
Affected #: 1 file
diff -r bf0057b13f58f5c5438f1a6477b27bfceb14a2ce -r edab395a78b1f9d27bc2f2d233b2ded002b3080a lib/galaxy/webapps/galaxy/api/tools.py
--- a/lib/galaxy/webapps/galaxy/api/tools.py
+++ b/lib/galaxy/webapps/galaxy/api/tools.py
@@ -119,14 +119,18 @@
return { "message": { "type": "error", "data" : vars[ 'errors' ] } }
# TODO: check for errors and ensure that output dataset(s) are available.
- output_datasets = vars.get( 'out_data', {} ).values()
+ output_datasets = vars.get( 'out_data', {} ).iteritems()
rval = {
"outputs": []
}
outputs = rval[ "outputs" ]
#TODO:?? poss. only return ids?
- for output in output_datasets:
+ for output_name, output in output_datasets:
output_dict = output.to_dict()
+ #add the output name back into the output data structure
+ #so it's possible to figure out which newly created elements
+ #correspond with which tool file outputs
+ output_dict['output_name'] = output_name
outputs.append( trans.security.encode_dict_ids( output_dict ) )
return rval
https://bitbucket.org/galaxy/galaxy-central/commits/115a6924dc4c/
Changeset: 115a6924dc4c
User: jmchilton
Date: 2013-10-25 04:08:11
Summary: Merged in kellrott/galaxy-central/tool_api (pull request #243)
Adding output_name to /api/tool submit output
Matching client code added to blend4j: https://github.com/jmchilton/blend4j/commit/991ec2b30fd538c0b8e97aa55e681aa….
Thanks for the contribution Kyle!
Affected #: 1 file
diff -r 97cb7306dc345ce5e81861e421c5277701161802 -r 115a6924dc4c459467ca162e10ee24ba04001a1e lib/galaxy/webapps/galaxy/api/tools.py
--- a/lib/galaxy/webapps/galaxy/api/tools.py
+++ b/lib/galaxy/webapps/galaxy/api/tools.py
@@ -119,14 +119,18 @@
return { "message": { "type": "error", "data" : vars[ 'errors' ] } }
# TODO: check for errors and ensure that output dataset(s) are available.
- output_datasets = vars.get( 'out_data', {} ).values()
+ output_datasets = vars.get( 'out_data', {} ).iteritems()
rval = {
"outputs": []
}
outputs = rval[ "outputs" ]
#TODO:?? poss. only return ids?
- for output in output_datasets:
+ for output_name, output in output_datasets:
output_dict = output.to_dict()
+ #add the output name back into the output data structure
+ #so it's possible to figure out which newly created elements
+ #correspond with which tool file outputs
+ output_dict['output_name'] = output_name
outputs.append( trans.security.encode_dict_ids( output_dict ) )
return rval
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/commits/bf0057b13f58/
Changeset: bf0057b13f58
User: dannon
Date: 2013-10-24 21:18:51
Summary: Strip quota information and url from primary users collection -- not useful, and a ton of extra info that can be attained other ways. Issue deprecation warning with dist.
Affected #: 1 file
diff -r 05fb304579771af681eb1a89de633133364c5f7d -r bf0057b13f58f5c5438f1a6477b27bfceb14a2ce lib/galaxy/webapps/galaxy/api/users.py
--- a/lib/galaxy/webapps/galaxy/api/users.py
+++ b/lib/galaxy/webapps/galaxy/api/users.py
@@ -4,7 +4,7 @@
import logging
from paste.httpexceptions import HTTPBadRequest, HTTPNotImplemented
from galaxy import util, web
-from galaxy.web.base.controller import BaseAPIController, url_for
+from galaxy.web.base.controller import BaseAPIController
log = logging.getLogger( __name__ )
@@ -22,27 +22,19 @@
query = trans.sa_session.query( trans.app.model.User )
deleted = util.string_as_bool( deleted )
if deleted:
- route = 'deleted_user'
query = query.filter( trans.app.model.User.table.c.deleted == True )
# only admins can see deleted users
if not trans.user_is_admin():
return []
-
else:
- route = 'user'
query = query.filter( trans.app.model.User.table.c.deleted == False )
# special case: user can see only their own user
if not trans.user_is_admin():
item = trans.user.to_dict( value_mapper={ 'id': trans.security.encode_id } )
- item['url'] = url_for( route, id=item['id'] )
- item['quota_percent'] = trans.app.quota_agent.get_percent( trans=trans )
return [item]
-
for user in query:
item = user.to_dict( value_mapper={ 'id': trans.security.encode_id } )
#TODO: move into api_values
- item['quota_percent'] = trans.app.quota_agent.get_percent( trans=trans )
- item['url'] = url_for( route, id=item['id'] )
rval.append( item )
return rval
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/commits/83bed9c7dbbc/
Changeset: 83bed9c7dbbc
Branch: next-stable
User: greg
Date: 2013-10-24 15:47:04
Summary: Eliminate restriction to repository owner (make it to anyone that has write permission on the repository) for resetting metadata on the repository in the tool shed.
Affected #: 1 file
diff -r 71c35dbde130994265d85c34a00d9f845eda28cc -r 83bed9c7dbbc7fa5acfbced6491d63f8a50982b0 templates/webapps/tool_shed/common/repository_actions_menu.mako
--- a/templates/webapps/tool_shed/common/repository_actions_menu.mako
+++ b/templates/webapps/tool_shed/common/repository_actions_menu.mako
@@ -54,7 +54,7 @@
else:
can_download = False
- if ( is_admin or ( trans.user and trans.user == repository.user ) ) and not repository.deleted and not repository.deprecated and not is_new:
+ if ( is_admin or can_push ) and not repository.deleted and not repository.deprecated and not is_new:
can_reset_all_metadata = True
else:
can_reset_all_metadata = False
https://bitbucket.org/galaxy/galaxy-central/commits/7f048ac9d878/
Changeset: 7f048ac9d878
User: greg
Date: 2013-10-24 15:47:35
Summary: Merged from next-stable
Affected #: 1 file
diff -r 319c21e395a32f66b783578e43a4da2daa0b375c -r 7f048ac9d878c59734a7272364e7e580a44576a5 templates/webapps/tool_shed/common/repository_actions_menu.mako
--- a/templates/webapps/tool_shed/common/repository_actions_menu.mako
+++ b/templates/webapps/tool_shed/common/repository_actions_menu.mako
@@ -54,7 +54,7 @@
else:
can_download = False
- if ( is_admin or ( trans.user and trans.user == repository.user ) ) and not repository.deleted and not repository.deprecated and not is_new:
+ if ( is_admin or can_push ) and not repository.deleted and not repository.deprecated and not is_new:
can_reset_all_metadata = True
else:
can_reset_all_metadata = False
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.
3 new commits in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/200bd6479490/
Changeset: 200bd6479490
User: Dave Bouvier
Date: 2013-10-24 14:51:16
Summary: Check for the existence of a display application before attempting to delete it from the registry.
Affected #: 1 file
diff -r e5b91a357c909cb63b5bbb7fc922226f34255d31 -r 200bd6479490cb7c85e18e95beb5a1cb072af307 lib/galaxy/datatypes/registry.py
--- a/lib/galaxy/datatypes/registry.py
+++ b/lib/galaxy/datatypes/registry.py
@@ -547,8 +547,11 @@
display_app.id = tool_dict[ 'guid' ]
break
if deactivate:
- del self.display_applications[ display_app.id ]
- del self.datatypes_by_extension[ extension ].display_applications[ display_app.id ]
+ if display_app.id in self.display_applications:
+ del self.display_applications[ display_app.id ]
+ if extension in self.datatypes_by_extension:
+ if display_app.id in self.datatypes_by_extension[ extension ].display_applications:
+ del self.datatypes_by_extension[ extension ].display_applications[ display_app.id ]
if inherit and ( self.datatypes_by_extension[ extension ], display_app ) in self.inherit_display_application_by_class:
self.inherit_display_application_by_class.remove( ( self.datatypes_by_extension[ extension ], display_app ) )
self.log.debug( "Deactivated display application '%s' for datatype '%s'." % ( display_app.id, extension ) )
https://bitbucket.org/galaxy/galaxy-central/commits/71c35dbde130/
Changeset: 71c35dbde130
Branch: next-stable
User: Dave Bouvier
Date: 2013-10-24 14:51:16
Summary: Check for the existence of a display application before attempting to delete it from the registry.
Affected #: 1 file
diff -r 434254daaa091f4b9999e015ff090da518327a13 -r 71c35dbde130994265d85c34a00d9f845eda28cc lib/galaxy/datatypes/registry.py
--- a/lib/galaxy/datatypes/registry.py
+++ b/lib/galaxy/datatypes/registry.py
@@ -547,8 +547,11 @@
display_app.id = tool_dict[ 'guid' ]
break
if deactivate:
- del self.display_applications[ display_app.id ]
- del self.datatypes_by_extension[ extension ].display_applications[ display_app.id ]
+ if display_app.id in self.display_applications:
+ del self.display_applications[ display_app.id ]
+ if extension in self.datatypes_by_extension:
+ if display_app.id in self.datatypes_by_extension[ extension ].display_applications:
+ del self.datatypes_by_extension[ extension ].display_applications[ display_app.id ]
if inherit and ( self.datatypes_by_extension[ extension ], display_app ) in self.inherit_display_application_by_class:
self.inherit_display_application_by_class.remove( ( self.datatypes_by_extension[ extension ], display_app ) )
self.log.debug( "Deactivated display application '%s' for datatype '%s'." % ( display_app.id, extension ) )
https://bitbucket.org/galaxy/galaxy-central/commits/319c21e395a3/
Changeset: 319c21e395a3
User: Dave Bouvier
Date: 2013-10-24 14:55:55
Summary: Merge with next-stable.
Affected #: 0 files
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/commits/cbfae86c6def/
Changeset: cbfae86c6def
User: jmchilton
Date: 2013-04-23 16:57:14
Summary: Add exception handling for Binary sniffers. Image sniffers can fail for large files because signed integers are used internally, this catches that and other potential problems.
Traceback (most recent call last):
File "/opt/galaxy/web/tools/data_source/upload.py", line 432, in <module>
__main__()
File "/opt/galaxy/web/tools/data_source/upload.py", line 421, in __main__
add_file( dataset, registry, json_file, output_path )
File "/opt/galaxy/web/tools/data_source/upload.py", line 155, in add_file
type_info = Binary.is_sniffable_binary( dataset.path )
File "/opt/galaxy/web/lib/galaxy/datatypes/binary.py", line 38, in is_sniffable_binary
if format["class"]().sniff(filename):
File "/opt/galaxy/web/lib/galaxy/datatypes/images.py", line 203, in sniff
headers = get_headers(filename, None, 1)
File "/opt/galaxy/web/lib/galaxy/datatypes/sniff.py", line 179, in get_headers
for idx, line in enumerate(file(fname)):
SystemError: Negative size passed to PyString_FromStringAndSize
Affected #: 1 file
diff -r 1e3d92ec22b2794bfa2294edb74695c580791406 -r cbfae86c6def520dff8d922066054ede3072ebfb lib/galaxy/datatypes/binary.py
--- a/lib/galaxy/datatypes/binary.py
+++ b/lib/galaxy/datatypes/binary.py
@@ -33,11 +33,20 @@
Binary.unsniffable_binary_formats.append(ext)
@staticmethod
- def is_sniffable_binary(filename):
+ def is_sniffable_binary( filename ):
+ format_information = None
for format in Binary.sniffable_binary_formats:
- if format["class"]().sniff(filename):
- return (format["type"], format["ext"])
- return None
+ format_instance = format[ "class" ]()
+ try:
+ if format_instance.sniff(filename):
+ format_information = ( format["type"], format[ "ext" ] )
+ break
+ except Exception:
+ # Sniffer raised exception, could be any number of
+ # reasons for this so there is not much to do besides
+ # trying next sniffer.
+ pass
+ return format_information
@staticmethod
def is_ext_unsniffable(ext):
https://bitbucket.org/galaxy/galaxy-central/commits/4f400cb23860/
Changeset: 4f400cb23860
User: jmchilton
Date: 2013-04-23 19:24:16
Summary: Rework checking binary files. Why read in line by line if only going to check 100 characters? This approach to just read first 100 characters is cleaner, more efficient, and hopefully less error prone. Should avoid the following exception caused when checking large files:
Traceback (most recent call last):
File "/opt/galaxy/web/tools/data_source/upload.py", line 432, in <module>
__main__()
File "/opt/galaxy/web/tools/data_source/upload.py", line 421, in __main__
add_file( dataset, registry, json_file, output_path )
File "/opt/galaxy/web/tools/data_source/upload.py", line 283, in add_file
if check_binary( dataset.path ):
File "/opt/galaxy/web/lib/galaxy/datatypes/checkers.py", line 58, in check_binary
for chars in temp:
SystemError: Negative size passed to PyString_FromStringAndSize
Affected #: 1 file
diff -r cbfae86c6def520dff8d922066054ede3072ebfb -r 4f400cb238607d7563a001ab0cf0d3b24bb10f17 lib/galaxy/datatypes/checkers.py
--- a/lib/galaxy/datatypes/checkers.py
+++ b/lib/galaxy/datatypes/checkers.py
@@ -1,5 +1,6 @@
import os, gzip, re, gzip, zipfile, binascii, bz2, imghdr
from galaxy import util
+from StringIO import StringIO
try:
import Image as PIL
@@ -53,20 +54,15 @@
if file_path:
temp = open( name, "U" )
else:
- temp = name
+ temp = StringIO( name )
chars_read = 0
- for chars in temp:
- for char in chars:
- chars_read += 1
+ try:
+ for char in temp.read( 100 ):
if ord( char ) > 128:
is_binary = True
break
- if chars_read > 100:
- break
- if chars_read > 100:
- break
- if file_path:
- temp.close()
+ finally:
+ temp.close( )
return is_binary
def check_gzip( file_path ):
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.