Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix repository category update #1481

Merged
merged 1 commit into from
Oct 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 7 additions & 12 deletions planemo/shed/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -655,28 +655,23 @@ def update_repository_for(ctx, tsi, id, repo_config):
name = repo_config["name"]
description = repo_config.get("description")
long_description = repo_config.get("long_description")
repo_type = shed_repo_type(repo_config, name)
remote_repository_url = repo_config.get("remote_repository_url")
homepage_url = repo_config.get("homepage_url")
categories = repo_config.get("categories", [])
category_ids = find_category_ids(tsi, categories)

_ensure_shed_description(description)

kwds = dict(
repo = tsi.repositories.update_repository_metadata(
id,
name=name,
synopsis=description,
type=repo_type,
description=long_description,
remote_repository_url=remote_repository_url,
homepage_url=homepage_url,
category_ids=category_ids,
)
if long_description is not None:
kwds["description"] = long_description
if remote_repository_url is not None:
kwds["remote_repository_url"] = remote_repository_url
if homepage_url is not None:
kwds["homepage_url"] = homepage_url
if category_ids is not None:
kwds["category_ids[]"] = category_ids
return bioblend.galaxy.client.Client._put(tsi.repositories, id=id, payload=kwds)
return repo


def create_repository_for(ctx, tsi, name, repo_config):
Expand Down
Loading