2 new commits in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/1a43bcbff87c/ Changeset: 1a43bcbff87c Branch: next-stable User: dannon Date: 2014-05-23 18:00:21 Summary: pep8 api/users controller. Affected #: 1 file
diff -r 5b1e3075b05526b98529099d328501e9633a95f2 -r 1a43bcbff87c4580ac9d791d1b770e6e80a7c0d7 lib/galaxy/webapps/galaxy/api/users.py --- a/lib/galaxy/webapps/galaxy/api/users.py +++ b/lib/galaxy/webapps/galaxy/api/users.py @@ -42,7 +42,7 @@ return [item] for user in query: item = user.to_dict( value_mapper={ 'id': trans.security.encode_id } ) - #TODO: move into api_values + # TODO: move into api_values rval.append( item ) return rval
@@ -78,12 +78,11 @@ else: raise HTTPBadRequest( detail='Invalid user id ( %s ) specified' % id ) item = user.to_dict( view='element', value_mapper={ 'id': trans.security.encode_id, - 'total_disk_usage': float } ) - + 'total_disk_usage': float } ) # add a list of tags used by the user (as strings) item[ 'tags_used' ] = self.get_user_tags_used( trans, user=user ) - #TODO: move into api_values (needs trans, tho - can we do that with api_keys/@property??) - #TODO: works with other users (from admin)?? + # TODO: move into api_values (needs trans, tho - can we do that with api_keys/@property??) + # TODO: works with other users (from admin)?? item['quota_percent'] = trans.app.quota_agent.get_percent( trans=trans ) item['is_admin'] = trans.user_is_admin() return item @@ -103,8 +102,8 @@ email = payload[ 'email' ] password = payload[ 'password' ] message = "\n".join( [ validate_email( trans, email ), - validate_password( trans, password, password ), - validate_publicname( trans, username ) ] ).rstrip() + validate_password( trans, password, password ), + validate_publicname( trans, username ) ] ).rstrip() if message: raise exceptions.RequestParameterInvalidException( message ) else: @@ -138,15 +137,13 @@ def undelete( self, trans, **kwd ): raise HTTPNotImplemented()
- #TODO: move to more basal, common resource than this + # TODO: move to more basal, common resource than this def anon_user_api_value( self, trans ): """ Returns data for an anonymous user, truncated to only usage and quota_percent """ usage = trans.app.quota_agent.get_usage( trans ) percent = trans.app.quota_agent.get_percent( trans=trans, usage=usage ) - return { - 'total_disk_usage' : int( usage ), - 'nice_total_disk_usage' : util.nice_size( usage ), - 'quota_percent' : percent - } + return {'total_disk_usage': int( usage ), + 'nice_total_disk_usage': util.nice_size( usage ), + 'quota_percent': percent}
https://bitbucket.org/galaxy/galaxy-central/commits/1283375984ac/ Changeset: 1283375984ac User: dannon Date: 2014-05-23 18:00:40 Summary: Merge next-stable. Affected #: 1 file
diff -r 39217230c38250daa36e2a9554cdcd52c01542ef -r 1283375984ac83ce18e5a78259b12d49cf86d58d lib/galaxy/webapps/galaxy/api/users.py --- a/lib/galaxy/webapps/galaxy/api/users.py +++ b/lib/galaxy/webapps/galaxy/api/users.py @@ -42,7 +42,7 @@ return [item] for user in query: item = user.to_dict( value_mapper={ 'id': trans.security.encode_id } ) - #TODO: move into api_values + # TODO: move into api_values rval.append( item ) return rval
@@ -78,12 +78,11 @@ else: raise HTTPBadRequest( detail='Invalid user id ( %s ) specified' % id ) item = user.to_dict( view='element', value_mapper={ 'id': trans.security.encode_id, - 'total_disk_usage': float } ) - + 'total_disk_usage': float } ) # add a list of tags used by the user (as strings) item[ 'tags_used' ] = self.get_user_tags_used( trans, user=user ) - #TODO: move into api_values (needs trans, tho - can we do that with api_keys/@property??) - #TODO: works with other users (from admin)?? + # TODO: move into api_values (needs trans, tho - can we do that with api_keys/@property??) + # TODO: works with other users (from admin)?? item['quota_percent'] = trans.app.quota_agent.get_percent( trans=trans ) item['is_admin'] = trans.user_is_admin() return item @@ -103,8 +102,8 @@ email = payload[ 'email' ] password = payload[ 'password' ] message = "\n".join( [ validate_email( trans, email ), - validate_password( trans, password, password ), - validate_publicname( trans, username ) ] ).rstrip() + validate_password( trans, password, password ), + validate_publicname( trans, username ) ] ).rstrip() if message: raise exceptions.RequestParameterInvalidException( message ) else: @@ -138,15 +137,13 @@ def undelete( self, trans, **kwd ): raise HTTPNotImplemented()
- #TODO: move to more basal, common resource than this + # TODO: move to more basal, common resource than this def anon_user_api_value( self, trans ): """ Returns data for an anonymous user, truncated to only usage and quota_percent """ usage = trans.app.quota_agent.get_usage( trans ) percent = trans.app.quota_agent.get_percent( trans=trans, usage=usage ) - return { - 'total_disk_usage' : int( usage ), - 'nice_total_disk_usage' : util.nice_size( usage ), - 'quota_percent' : percent - } + return {'total_disk_usage': int( usage ), + 'nice_total_disk_usage': util.nice_size( usage ), + 'quota_percent': percent}
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.
galaxy-commits@lists.galaxyproject.org