commit/galaxy-central: 6 new changesets

6 new commits in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/b0255200ef92/ Changeset: b0255200ef92 Branch: release_15.03 User: carlfeberhard Date: 2015-02-24 22:20:10+00:00 Summary: Fix to layering of dropdown buttons and menus Affected #: 3 files diff -r 4a42638e8cd45652db9dc1f1eed54be6aa2c20b1 -r b0255200ef921a6de641b303ef486ac56c0d8740 static/style/blue/base.css --- a/static/style/blue/base.css +++ b/static/style/blue/base.css @@ -2030,8 +2030,8 @@ .list-panel .controls .list-actions:after{clear:both} .list-panel .controls .list-actions:before,.list-panel .controls .list-actions:after{content:" ";display:table;} .list-panel .controls .list-actions:after{clear:both} -.list-panel .controls .list-actions .btn{padding-top:2px;padding-bottom:2px;font-size:90%;z-index:inherit} -.list-panel .controls .list-actions .list-action-menu{float:right}.list-panel .controls .list-actions .list-action-menu .dropdown-menu{z-index:inherit} +.list-panel .controls .list-actions .btn{padding-top:2px;padding-bottom:2px;font-size:90%} +.list-panel .controls .list-actions .list-action-menu{float:right} .list-panel .list-items .list-item:not(:last-child){border-bottom-width:0px} .list-panel .empty-message{display:none;margin:0px} .list-item .details .list-panel{margin-top:8px;border-radius:3px;background:white;padding:4px}.list-item .details .list-panel .list-items{border:1px solid #bfbfbf;border-radius:3px}.list-item .details .list-panel .list-items .list-item:first-child{border-top-width:0px;border-radius:3px 3px 0px 0px} @@ -2138,9 +2138,10 @@ .multi-panel-history .control-column.control-column-right{text-align:right} .multi-panel-history .outer-middle{overflow:auto} .multi-panel-history .middle{min-width:100%;margin:0px 0px 0px 0px;background-color:white;padding:8px} -.multi-panel-history .history-column{width:312px;margin:0 8px 0 0}.multi-panel-history .history-column:first-child{position:fixed;z-index:2}.multi-panel-history .history-column:first-child .history-panel{border:1px solid black;box-shadow:4px 4px 4px rgba(96,96,96,0.3)} +.multi-panel-history .history-column{width:312px;margin:0 8px 0 0}.multi-panel-history .history-column:first-child{position:fixed;z-index:10}.multi-panel-history .history-column:first-child .history-panel{border:1px solid black;box-shadow:4px 4px 4px rgba(96,96,96,0.3)} .multi-panel-history .history-column:nth-child(2){margin-left:320px} .multi-panel-history .history-column:last-child{margin-right:0px} +.multi-panel-history .history-column .dropdown-menu{z-index:inherit} .multi-panel-history .history-column .panel-controls{width:100%;height:24px;border-radius:3px;background-color:white;text-align:center;flex:0 0 auto;-webkit-align-self:auto;-ms-flex-item-align:auto;align-self:auto}.multi-panel-history .history-column .panel-controls .btn{height:20px;line-height:normal;font-size:90%;padding-top:0px;padding-bottom:0px} .multi-panel-history .history-column .panel-controls .pull-left .btn{margin-right:4px} .multi-panel-history .history-column .panel-controls .pull-right .btn{margin-left:4px} diff -r 4a42638e8cd45652db9dc1f1eed54be6aa2c20b1 -r b0255200ef921a6de641b303ef486ac56c0d8740 static/style/src/less/history.less --- a/static/style/src/less/history.less +++ b/static/style/src/less/history.less @@ -744,7 +744,7 @@ // current history &:first-child { position: fixed; - z-index : 2; + z-index : 10; // visually differentiate the current history .history-panel { @@ -759,6 +759,9 @@ &:last-child { margin-right: 0px; } + .dropdown-menu { + z-index: inherit; + } .panel-controls { width: 100%; diff -r 4a42638e8cd45652db9dc1f1eed54be6aa2c20b1 -r b0255200ef921a6de641b303ef486ac56c0d8740 static/style/src/less/list-item.less --- a/static/style/src/less/list-item.less +++ b/static/style/src/less/list-item.less @@ -167,13 +167,9 @@ padding-top: 2px; padding-bottom: 2px; font-size: 90%; - z-index: inherit; } .list-action-menu { float: right; - .dropdown-menu { - z-index: inherit; - } } } } https://bitbucket.org/galaxy/galaxy-central/commits/a83c0d80639e/ Changeset: a83c0d80639e Branch: release_15.03 User: dannon Date: 2015-02-24 23:55:50+00:00 Summary: More tweaks to mutable capabilities, adding back in a copy and stripping pickle from MutationList Affected #: 1 file diff -r b0255200ef921a6de641b303ef486ac56c0d8740 -r a83c0d80639eb92228ead6a47e3b6a26c2f1b94e lib/galaxy/model/custom_types.py --- a/lib/galaxy/model/custom_types.py +++ b/lib/galaxy/model/custom_types.py @@ -1,4 +1,5 @@ import binascii +import copy import json import logging import uuid @@ -62,6 +63,12 @@ else: return self.impl + def copy_value( self, value ): + return copy.deepcopy( value ) + + def compare_values( self, x, y ): + return ( x == y ) + class MutationObj(Mutable): """ @@ -196,12 +203,6 @@ list.remove(self, value) self.changed() - def __getstate__(self): - return list(self) - - def __setstate__(self, state): - self.update(state) - MutationObj.associate_with(JSONType) https://bitbucket.org/galaxy/galaxy-central/commits/48012dc829bb/ Changeset: 48012dc829bb Branch: release_15.03 User: jmchilton Date: 2015-02-18 16:34:23+00:00 Summary: Tool diagnostic API endpoints. It is easy to get Galaxy's database and shed tool files out of sync and the results are bad. I don't think this is new but I may have made it worse this cycle by trying to slowly walk back Galaxy's use of the database to track lineages (e.g. https://bitbucket.org/galaxy/galaxy-central/commits/08f8850853d004bf8a456a14...). New API endpoints include: /api/configuration/dynamic_tool_confs /api/configuration/tool_lineages /api/<tool_id>/diagnostics Affected #: 6 files diff -r a83c0d80639eb92228ead6a47e3b6a26c2f1b94e -r 48012dc829bb437e7bcb7c6507d91647a32a26ef lib/galaxy/tools/toolbox/lineages/interface.py --- a/lib/galaxy/tools/toolbox/lineages/interface.py +++ b/lib/galaxy/tools/toolbox/lineages/interface.py @@ -40,3 +40,9 @@ externally). """ return self.version is None + + def to_dict(self): + return dict( + id=self.id, + version=self.version, + ) diff -r a83c0d80639eb92228ead6a47e3b6a26c2f1b94e -r 48012dc829bb437e7bcb7c6507d91647a32a26ef lib/galaxy/tools/toolbox/lineages/stock.py --- a/lib/galaxy/tools/toolbox/lineages/stock.py +++ b/lib/galaxy/tools/toolbox/lineages/stock.py @@ -38,6 +38,13 @@ # method for comparing tool versions. return sorted( versions, key=_to_loose_version ) + def to_dict(self): + return dict( + tool_id=self.tool_id, + tool_versions=list(self.tool_versions), + lineage_type='stock', + ) + def _to_loose_version( tool_lineage_version ): version = str( tool_lineage_version.version ) diff -r a83c0d80639eb92228ead6a47e3b6a26c2f1b94e -r 48012dc829bb437e7bcb7c6507d91647a32a26ef lib/galaxy/tools/toolbox/lineages/tool_shed.py --- a/lib/galaxy/tools/toolbox/lineages/tool_shed.py +++ b/lib/galaxy/tools/toolbox/lineages/tool_shed.py @@ -8,9 +8,11 @@ """ Representation of tool lineage derived from tool shed repository installations. """ - def __init__(self, app, tool_version): + def __init__(self, app, tool_version, tool_shed_repository=None): self.app = app self.tool_version_id = tool_version.id + # Only used for logging + self._tool_shed_repository = tool_shed_repository @staticmethod def from_tool( app, tool, tool_shed_repository ): @@ -36,6 +38,16 @@ def get_versions( self, reverse=False ): return map( ToolLineageVersion.from_guid, self.get_version_ids( reverse=reverse ) ) + def to_dict(self): + tool_shed_repository = self._tool_shed_repository + rval = dict( + tool_version_id=self.tool_version_id, + tool_versions=map(lambda v: v.to_dict(), self.get_versions()), + tool_shed_repository=tool_shed_repository if tool_shed_repository is not None else None, + lineage_type='tool_shed', + ) + return rval + def get_install_tool_version( app, tool_id ): return app.install_model.context.query( diff -r a83c0d80639eb92228ead6a47e3b6a26c2f1b94e -r 48012dc829bb437e7bcb7c6507d91647a32a26ef lib/galaxy/webapps/galaxy/api/configuration.py --- a/lib/galaxy/webapps/galaxy/api/configuration.py +++ b/lib/galaxy/webapps/galaxy/api/configuration.py @@ -4,6 +4,8 @@ """ from galaxy.web import _future_expose_api_anonymous as expose_api_anonymous +from galaxy.web import _future_expose_api as expose_api +from galaxy.web import require_admin from galaxy.web.base.controller import BaseAPIController from galaxy.managers import base @@ -33,6 +35,13 @@ @expose_api_anonymous def version( self, trans, **kwds ): + """ + GET /api/version + Return a description of the major version of Galaxy (e.g. 15.03). + + :rtype: dict + :returns: dictionary with major version keyed on 'version_major' + """ return {"version_major": self.app.config.version_major } def get_config_dict( self, trans, return_admin=False, view=None, keys=None, default_view='all' ): @@ -52,6 +61,29 @@ view=view, keys=keys, default_view=default_view ) return serialized + @expose_api + @require_admin + def dynamic_tool_confs(self, trans): + confs = self.app.toolbox.dynamic_confs(include_migrated_tool_conf=True) + return map(_tool_conf_to_dict, confs) + + @expose_api + @require_admin + def tool_lineages(self, trans): + rval = [] + for id, tool in self.app.toolbox.tools(): + if hasattr( tool, 'lineage' ): + lineage_dict = tool.lineage.to_dict() + else: + lineage_dict = None + + entry = dict( + id=id, + lineage=lineage_dict + ) + rval.append(entry) + return rval + #TODO: for lack of a manager file for the config. May well be better in config.py? Circ imports? class ConfigSerializer( base.ModelSerializer ): @@ -122,3 +154,10 @@ 'allow_user_creation' : _defaults_to( False ), 'allow_user_deletion' : _defaults_to( False ), }) + + +def _tool_conf_to_dict(conf): + return dict( + config_filename=conf['config_filename'], + tool_path=conf['tool_path'], + ) diff -r a83c0d80639eb92228ead6a47e3b6a26c2f1b94e -r 48012dc829bb437e7bcb7c6507d91647a32a26ef lib/galaxy/webapps/galaxy/api/tools.py --- a/lib/galaxy/webapps/galaxy/api/tools.py +++ b/lib/galaxy/webapps/galaxy/api/tools.py @@ -94,6 +94,36 @@ message, status = trans.app.toolbox.reload_tool_by_id( tool_id ) return { status: message } + @_future_expose_api + @web.require_admin + def diagnostics( self, trans, id, **kwd ): + """ + GET /api/tools/{tool_id}/diagnostics + Return diagnostic information to help debug panel + and dependency related problems. + """ + to_dict = lambda x: x.to_dict() + tool = self._get_tool( id, user=trans.user ) + if hasattr( tool, 'lineage' ): + lineage_dict = tool.lineage.to_dict() + else: + lineage_dict = None + tool_shed_dependencies = tool.installed_tool_dependencies + if tool_shed_dependencies: + tool_shed_dependencies_dict = map(to_dict, tool_shed_dependencies) + else: + tool_shed_dependencies_dict = None + tool = self._get_tool( id, user=trans.user ) + return { + "tool_id": tool.id, + "tool_version": tool.version, + "dependency_shell_commands": tool.build_dependency_shell_commands(), + "lineage": lineage_dict, + "requirements": map(to_dict, tool.requirements), + "installed_tool_shed_dependencies": tool_shed_dependencies_dict, + "tool_dir": tool.tool_dir, + } + @_future_expose_api_anonymous def citations( self, trans, id, **kwds ): tool = self._get_tool( id, user=trans.user ) diff -r a83c0d80639eb92228ead6a47e3b6a26c2f1b94e -r 48012dc829bb437e7bcb7c6507d91647a32a26ef lib/galaxy/webapps/galaxy/buildapp.py --- a/lib/galaxy/webapps/galaxy/buildapp.py +++ b/lib/galaxy/webapps/galaxy/buildapp.py @@ -210,6 +210,7 @@ webapp.mapper.resource_with_deleted( 'quota', 'quotas', path_prefix='/api' ) webapp.mapper.connect( '/api/tools/{id:.+?}/build', action='build', controller="tools" ) webapp.mapper.connect( '/api/tools/{id:.+?}/reload', action='reload', controller="tools" ) + webapp.mapper.connect( '/api/tools/{id:.+?}/diagnostics', action='diagnostics', controller="tools" ) webapp.mapper.connect( '/api/tools/{id:.+?}/citations', action='citations', controller="tools" ) webapp.mapper.connect( '/api/tools/{id:.+?}/download', action='download', controller="tools" ) webapp.mapper.connect( '/api/tools/{id:.+?}', action='show', controller="tools" ) @@ -221,6 +222,18 @@ webapp.mapper.resource( 'workflow', 'workflows', path_prefix='/api' ) webapp.mapper.resource_with_deleted( 'history', 'histories', path_prefix='/api' ) webapp.mapper.connect( '/api/histories/{history_id}/citations', action='citations', controller="histories" ) + webapp.mapper.connect( + 'dynamic_tool_confs', + '/api/configuration/dynamic_tool_confs', + controller="configuration", + action="dynamic_tool_confs" + ) + webapp.mapper.connect( + 'tool_lineages', + '/api/configuration/tool_lineages', + controller="configuration", + action="tool_lineages" + ) webapp.mapper.resource( 'configuration', 'configuration', path_prefix='/api' ) webapp.mapper.connect( "configuration_version", "/api/version", controller="configuration", https://bitbucket.org/galaxy/galaxy-central/commits/e0916bcf81bb/ Changeset: e0916bcf81bb Branch: release_15.03 User: jmchilton Date: 2015-02-24 00:52:17+00:00 Summary: Improved tool diagnostics API. Affected #: 1 file diff -r 48012dc829bb437e7bcb7c6507d91647a32a26ef -r e0916bcf81bb3a27e31c919e7cc5d2ee6b987a28 lib/galaxy/webapps/galaxy/api/tools.py --- a/lib/galaxy/webapps/galaxy/api/tools.py +++ b/lib/galaxy/webapps/galaxy/api/tools.py @@ -102,6 +102,7 @@ Return diagnostic information to help debug panel and dependency related problems. """ + # TODO: Move this into tool. to_dict = lambda x: x.to_dict() tool = self._get_tool( id, user=trans.user ) if hasattr( tool, 'lineage' ): @@ -113,7 +114,6 @@ tool_shed_dependencies_dict = map(to_dict, tool_shed_dependencies) else: tool_shed_dependencies_dict = None - tool = self._get_tool( id, user=trans.user ) return { "tool_id": tool.id, "tool_version": tool.version, @@ -122,6 +122,11 @@ "requirements": map(to_dict, tool.requirements), "installed_tool_shed_dependencies": tool_shed_dependencies_dict, "tool_dir": tool.tool_dir, + "tool_shed": tool.tool_shed, + "repository_name": tool.repository_name, + "repository_owner": tool.repository_owner, + "installed_changeset_revision": None, + "guid": tool.guid, } @_future_expose_api_anonymous https://bitbucket.org/galaxy/galaxy-central/commits/4de6535bd780/ Changeset: 4de6535bd780 Branch: release_15.03 User: jmchilton Date: 2015-02-25 14:10:17+00:00 Summary: Expand out meta parameters when validating for tool.to_json(). Bring this code closer inline with what handle_input() does and should solve the problem with column validation of parameters that are being 'batched'. See https://trello.com/c/8NweTvLh and comment on https://github.com/galaxyproject/galaxy/commit/d57088409c7b23e55ead4c9f2fad3.... Affected #: 1 file diff -r e0916bcf81bb3a27e31c919e7cc5d2ee6b987a28 -r 4de6535bd78019ce34511f4f4ee2784f74963396 lib/galaxy/tools/__init__.py --- a/lib/galaxy/tools/__init__.py +++ b/lib/galaxy/tools/__init__.py @@ -2299,6 +2299,8 @@ # create parameter object params = galaxy.util.Params( kwd, sanitize = False ) + expanded_incomings, _ = expand_meta_parameters( trans, self, params.__dict__ ) + params.__dict__ = expanded_incomings[ 0 ] # convert value to jsonifiable value def jsonify(v): https://bitbucket.org/galaxy/galaxy-central/commits/9dcc6d00e76e/ Changeset: 9dcc6d00e76e Branch: release_15.03 User: dan Date: 2015-02-25 17:07:39+00:00 Summary: Fix for ToolShed not having config.shed_tool_data_path Affected #: 1 file diff -r 4de6535bd78019ce34511f4f4ee2784f74963396 -r 9dcc6d00e76eae06705d79ec7d276202494ad545 lib/galaxy/webapps/tool_shed/config.py --- a/lib/galaxy/webapps/tool_shed/config.py +++ b/lib/galaxy/webapps/tool_shed/config.py @@ -137,6 +137,10 @@ self.citation_cache_lock_dir = resolve_path( kwargs.get( "citation_cache_lock_dir", "database/tool_shed_citations/locks" ), self.root ) @property + def shed_tool_data_path( self ): + return self.tool_data_path + + @property def sentry_dsn_public( self ): """ Sentry URL with private key removed for use in client side scripts, 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.
participants (1)
-
commits-noreply@bitbucket.org