Skip to content

Commit

Permalink
Merge pull request #1379 from nsoranzo/bioblend_1.2.0
Browse files Browse the repository at this point in the history
Fix for change of base_url in BioBlend 1.2.0
  • Loading branch information
nsoranzo committed Jul 19, 2023
2 parents 4fa2820 + 7615ad6 commit 2f828a1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 2 additions & 1 deletion planemo/runnable_resolve.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ def for_runnable_identifiers(ctx, runnable_identifiers, kwds):
def install_args_list_to_runnables(ctx, install_args_list, kwds):
runnables = []
for repo in install_args_list:
url = f'{repo["tool_shed_url"]}api/repositories/get_repository_revision_install_info'
base_tool_shed_url = repo["tool_shed_url"].rstrip("/")
url = f"{base_tool_shed_url}/api/repositories/get_repository_revision_install_info"
response = requests.get(
url, params={"name": repo["name"], "owner": repo["owner"], "changeset_revision": repo["changeset_revision"]}
)
Expand Down
6 changes: 2 additions & 4 deletions planemo/shed/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

from planemo.io import untar_to

REPOSITORY_DOWNLOAD_TEMPLATE = "%srepository/download?repository_id=%s" "&changeset_revision=default&file_type=gz"
REPOSITORY_DOWNLOAD_TEMPLATE = "%s/repository/download?repository_id=%s&changeset_revision=default&file_type=gz"


def tool_shed_instance(url, key, email, password):
Expand Down Expand Up @@ -80,9 +80,7 @@ def find_category_ids(tsi, categories):


def download_tar(tsi, repo_id, destination, to_directory):
base_url = tsi.base_url
if not base_url.endswith("/"):
base_url += "/"
base_url = tsi.base_url.rstrip("/")
download_url = REPOSITORY_DOWNLOAD_TEMPLATE % (base_url, repo_id)
if to_directory:
tar_args = ["-xzf", "-", "--strip-components=1"]
Expand Down

0 comments on commit 2f828a1

Please sign in to comment.