Пример #1
0
def get_all_installed_repositories( actually_installed=False ):
    if actually_installed:
        return install_session.query( galaxy.model.tool_shed_install.ToolShedRepository ) \
                         .filter( and_( galaxy.model.tool_shed_install.ToolShedRepository.table.c.deleted == False,
                                        galaxy.model.tool_shed_install.ToolShedRepository.table.c.uninstalled == False,
                                        galaxy.model.tool_shed_install.ToolShedRepository.table.c.status == galaxy.model.tool_shed_install.ToolShedRepository.installation_status.INSTALLED ) ) \
                         .all()
    else:
        return install_session.query( galaxy.model.tool_shed_install.ToolShedRepository ).all()
Пример #2
0
def get_installed_repository_by_name_owner( repository_name, owner, return_multiple=False ):
    query = install_session.query( galaxy.model.tool_shed_install.ToolShedRepository ) \
                           .filter( and_( galaxy.model.tool_shed_install.ToolShedRepository.table.c.name == repository_name,
                                          galaxy.model.tool_shed_install.ToolShedRepository.table.c.owner == owner ) )
    if return_multiple:
        return query.all()
    return query.first()
def get_galaxy_repository_by_name_owner_changeset_revision(
        repository_name, owner, changeset_revision):
    return install_session.query( galaxy.model.tool_shed_install.ToolShedRepository ) \
                     .filter( and_( galaxy.model.tool_shed_install.ToolShedRepository.table.c.name == repository_name,
                                    galaxy.model.tool_shed_install.ToolShedRepository.table.c.owner == owner,
                                    galaxy.model.tool_shed_install.ToolShedRepository.table.c.changeset_revision == changeset_revision ) ) \
                     .first()
Пример #4
0
def get_installed_repository_by_name_owner( repository_name, owner, return_multiple=False ):
    query = install_session.query( galaxy.model.tool_shed_install.ToolShedRepository ) \
                           .filter( and_( galaxy.model.tool_shed_install.ToolShedRepository.table.c.name == repository_name,
                                          galaxy.model.tool_shed_install.ToolShedRepository.table.c.owner == owner ) )
    if return_multiple:
        return query.all()
    return query.first()
Пример #5
0
def get_installed_repository_by_name_owner( repository_name, owner ):
    return install_session.query( galaxy.model.tool_shed_install.ToolShedRepository ) \
                     .filter( and_( galaxy.model.tool_shed_install.ToolShedRepository.table.c.name == repository_name,
                                    galaxy.model.tool_shed_install.ToolShedRepository.table.c.owner == owner ) ) \
                     .first()
Пример #6
0
def get_installed_repository_by_id( repository_id ):
    return install_session.query( galaxy.model.tool_shed_install.ToolShedRepository ) \
                     .filter( galaxy.model.tool_shed_install.ToolShedRepository.table.c.id == repository_id ) \
                     .first()
Пример #7
0
def get_galaxy_repository_by_name_owner_changeset_revision( repository_name, owner, changeset_revision ):
    return install_session.query( galaxy.model.tool_shed_install.ToolShedRepository ) \
                     .filter( and_( galaxy.model.tool_shed_install.ToolShedRepository.table.c.name == repository_name,
                                    galaxy.model.tool_shed_install.ToolShedRepository.table.c.owner == owner,
                                    galaxy.model.tool_shed_install.ToolShedRepository.table.c.changeset_revision == changeset_revision ) ) \
                     .first()