How to use the bioblend.galaxy.toolshed.ToolShedClient function in bioblend

To help you get started, we’ve selected a few bioblend examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github galaxyproject / ansible-galaxy-tools / files / install_tool_shed_tools.py View on Github external
def tool_shed_client(gi=None):
    """
    Get an instance of the `ToolShedClient` on a given Galaxy instance. If no
    value is provided for the `galaxy_instance`, use the default provided via
    `load_input_file`.
    """
    if not gi:
        gi = galaxy_instance()
    return ToolShedClient(gi)
github phac-nml / irida / packaging / install_tool_shed_tools.py View on Github external
def tool_shed_client(gi=None):
    """
    Get an instance of the `ToolShedClient` on a given Galaxy instance. If no
    value is provided for the `galaxy_instance`, use the default provided via
    `load_input_file`.
    """
    if not gi:
        gi = galaxy_instance()
    return ToolShedClient(gi)
github galaxyproject / ephemeris / ephemeris / shed_tools_old.py View on Github external
def __init__(self,
                 repositories,
                 gi,
                 default_install_tool_dependencies=INSTALL_TOOL_DEPENDENCIES,
                 default_install_resolver_dependencies=INSTALL_RESOLVER_DEPENDENCIES,
                 default_install_repository_dependencies=INSTALL_REPOSITORY_DEPENDENCIES,
                 require_tool_panel_info=True,
                 force_latest_revision=False,
                 test=False,
                 test_user_api_key=None,
                 test_user="ephemeris@galaxyproject.org",
                 test_existing=False,
                 test_json="tool_test_output.json"):
        self.repositories = repositories
        self.gi = gi
        self.tsc = ToolShedClient(self.gi)
        self.require_tool_panel_info = require_tool_panel_info
        self.install_tool_dependencies = default_install_tool_dependencies
        self.install_resolver_dependencies = default_install_resolver_dependencies
        self.install_repository_dependencies = default_install_repository_dependencies
        self.force_latest_revision = force_latest_revision
        self.errored_repositories = []
        self.skipped_repositories = []
        self.installed_repositories = []
        self.test = test
        self.test_existing = test_existing
        self.test_json = test_json
        self.test_user_api_key = test_user_api_key
        self.test_user = test_user
        self.tests_passed = []
        self.test_exceptions = []
github galaxyproject / ephemeris / src / ephemeris / shed_tools.py View on Github external
def __init__(self,
                 galaxy_instance):
        """Initialize a new tool manager"""
        self.gi = galaxy_instance
        self.tool_shed_client = ToolShedClient(self.gi)
github galaxyproject / ephemeris / ephemeris / shed_tools_old.py View on Github external
Shed and are available from `/api/tool_shed_repositories` url on the
    given instance of Galaxy.
    :type gi: GalaxyInstance object
    :param gi: A GalaxyInstance object as retured by `galaxy_instance` method.
    :type omit: list of strings
    :param omit: A list of strings that, if found in a tool name, will result
                    in the tool not being included in the returned list.
    :rtype: list of dicts
    :return: Each dict in the returned list will have the following keys:
             `name`, `owner`, `tool_shed_url`, `revisions`.
    .. seealso:: this method returns a subset of data returned by
                 `installed_repositories` function
    """
    if not omit:
        omit = []
    tool_shed_client = ToolShedClient(gi)

    # Create dictionary to look up all tools based on repository information

    installed_revisions_list = []
    installed_repositories_list = tool_shed_client.get_repositories()
    for installed_repository in installed_repositories_list:
        if installed_repository['status'] == 'Installed':
            skip = False
            # Check if we already processed this tool and, if so, add the new
            # revision to the existing list entry
            for installed_revision in installed_revisions_list:
                if the_same_repository(installed_repository, installed_revision):
                    installed_revision['revisions'].append(installed_repository.get('changeset_revision', None))
                    skip = True
            # Check if the repo name is contained in the 'omit' list
            for omitted_repository in omit: