Skip to content

Commit 7b18f4d

Browse files
committed
Update container_register for mulled v2 and repo name changes.
1 parent 1d87260 commit 7b18f4d

2 files changed

Lines changed: 10 additions & 9 deletions

File tree

planemo/commands/cmd_container_register.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
import click
55

6-
from galaxy.tools.deps.mulled.util import image_name, quay_repository
6+
from galaxy.tools.deps.mulled.util import quay_repository, v2_image_name
77

88
from planemo import options
99
from planemo.cli import command_function
@@ -12,9 +12,9 @@
1212
from planemo.github_util import clone_fork_branch, get_repository_object, pull_request
1313
from planemo.mulled import conda_to_mulled_targets
1414

15-
REGISTERY_TARGET_NAME = "multireqcontainers"
15+
REGISTERY_TARGET_NAME = "multi-package-containers"
1616
REGISTERY_TARGET_PATH = "combinations"
17-
REGISTERY_REPOSITORY = "jmchilton/multireqcontainers"
17+
REGISTERY_REPOSITORY = "jmchilton/multi-package-containers"
1818
DEFAULT_MESSAGE = "Add %s (generated with Planemo)."
1919

2020

@@ -31,7 +31,7 @@
3131
resolve_path=True,
3232
),
3333
default=None,
34-
help=("Container registration directory (defaults to ~/.planemo/multireqcontainers."),
34+
help=("Container registration directory (defaults to ~/.planemo/multi-package-containers."),
3535
)
3636
@click.option(
3737
"-m",
@@ -81,9 +81,9 @@ def cli(ctx, paths, **kwds):
8181
if not best_practice_requirements:
8282
continue
8383

84-
name = image_name(mulled_targets)
84+
name = v2_image_name(mulled_targets)
8585
tag = "0"
86-
name_and_tag = "%s:%s" % (name, tag)
86+
name_and_tag = "%s-%s" % (name, tag)
8787
target_filename = os.path.join(registry_target.output_directory, "%s.tsv" % name_and_tag)
8888
ctx.vlog("Target filename for registeration is [%s]" % target_filename)
8989
if os.path.exists(target_filename):
@@ -132,15 +132,16 @@ def __init__(self, ctx, **kwds):
132132
def has_pull_request_for(self, name):
133133
has_pr = False
134134
if self.do_pull_request:
135-
if any([name in t for t in self.pr_titles]):
135+
name_as_branch = name.replace(":", "-")
136+
if any([name_as_branch in t for t in self.pr_titles]):
136137
has_pr = True
137138

138139
return has_pr
139140

140141
def handle_pull_request(self, ctx, name, target_filename, **kwds):
141142
if self.do_pull_request:
142143
message = kwds["message"] % name
143-
branch_name = name
144+
branch_name = name.replace(":", "-")
144145
branch(ctx, self.target_repository, branch_name, from_branch="master")
145146
add(ctx, self.target_repository, target_filename)
146147
commit(ctx, self.target_repository, message=message)

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ virtualenv
1313
lxml
1414
gxformat2>=0.1.1
1515
ephemeris>=0.2.0
16-
galaxy-lib>=17.5.10
16+
galaxy-lib>=17.9.0
1717
html5lib>=0.9999999,!=0.99999999,!=0.999999999,!=1.0b10,!=1.0b09 ; python_version == '2.7'
1818
cwltool==1.0.20170224141733 ; python_version == '2.7'

0 commit comments

Comments
 (0)