Permalink
Browse files

Enable repo type update (not supported by TS API yet)

  • Loading branch information...
nsoranzo committed Aug 12, 2016
1 parent 057f4f0 commit 3ceaa4092ad714ef057d7b01103abfe1f6bef9c4
Showing with 11 additions and 8 deletions.
  1. +11 −8 planemo/shed/__init__.py
@@ -602,10 +602,11 @@ def _build_suite_repo(config, repos, suite_config):


def update_repository_for(ctx, tsi, id, repo_config):
# TODO: enforce no "type" change.
from bioblend.galaxy.client import Client
name = repo_config["name"]
description = repo_config.get("description", None)
long_description = repo_config.get("long_description", None)
repo_type = shed_repo_type(repo_config, name)
remote_repository_url = repo_config.get("remote_repository_url", None)
homepage_url = repo_config.get("homepage_url", None)
categories = repo_config.get("categories", [])
@@ -614,8 +615,9 @@ def update_repository_for(ctx, tsi, id, repo_config):
_ensure_shed_description(description)

kwds = dict(
name=repo_config["name"],
name=name,
synopsis=description,
type=repo_type,
)
if long_description is not None:
kwds["description"] = long_description
@@ -722,12 +724,13 @@ def path_to_repo_name(path):

def shed_repo_type(config, name):
repo_type = config.get("type", None)
if repo_type is None and name.startswith("package_"):
repo_type = REPO_TYPE_TOOL_DEP
elif repo_type is None and name.startswith("suite_"):
repo_type = REPO_TYPE_SUITE
elif repo_type is None:
repo_type = REPO_TYPE_UNRESTRICTED
if repo_type is None:
if name.startswith("package_"):
repo_type = REPO_TYPE_TOOL_DEP
elif name.startswith("suite_"):
repo_type = REPO_TYPE_SUITE
else:
repo_type = REPO_TYPE_UNRESTRICTED
return repo_type


0 comments on commit 3ceaa40

Please sign in to comment.