|
@@ -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