Skip to content

Commit

Permalink
keep test
Browse files Browse the repository at this point in the history
  • Loading branch information
bernt-matthias committed Jul 18, 2024
1 parent 58707fe commit f0a6cb1
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions lib/galaxy/tool_util/deps/mulled/mulled_hash.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,18 @@
)


def _mulled_hash(hash, targets):
"""
>>> _mulled_hash(hash="v2", targets="samtools=1.3.1,bedtools=2.26.0")
'mulled-v2-8186960447c5cb2faa697666dc1e6d919ad23f3e:a6419f25efff953fc505dbd5ee734856180bb619'
>>> _mulled_hash(hash="v2", targets="samtools=1.3.1=h9071d68_10,bedtools=2.26.0=0")
'mulled-v2-8186960447c5cb2faa697666dc1e6d919ad23f3e:8e86df67d257ce6494ae12b2c60e1b94025ea529'
"""
targets = target_str_to_targets(targets)
image_name = v2_image_name if hash == "v2" else v1_image_name
return image_name(targets)


def main(argv=None):
"""Main entry-point for the CLI tool."""
parser = arg_parser(argv, globals())
Expand All @@ -25,8 +37,7 @@ def main(argv=None):
parser.add_argument("--hash", dest="hash", choices=["v1", "v2"], default="v2")
args = parser.parse_args()
targets = target_str_to_targets(args.targets)
image_name = v2_image_name if args.hash == "v2" else v1_image_name
print(image_name(targets))
print(_mulled_hash(args.hash, targets))


__all__ = ("main",)
Expand Down

0 comments on commit f0a6cb1

Please sign in to comment.