Mercurial > repos > shellac > sam_consensus_v3
view env/lib/python3.9/site-packages/planemo/commands/cmd_shed_create.py @ 0:4f3585e2f14b draft default tip
"planemo upload commit 60cee0fc7c0cda8592644e1aad72851dec82c959"
author | shellac |
---|---|
date | Mon, 22 Mar 2021 18:12:50 +0000 |
parents | |
children |
line wrap: on
line source
"""Module describing the planemo ``shed_create`` command.""" import sys import click from planemo import options from planemo import shed from planemo.cli import command_function from planemo.io import info @click.command("shed_create") @options.shed_publish_options() @options.shed_message_option() @options.shed_skip_upload() @command_function def cli(ctx, paths, **kwds): """Create a repository in a Galaxy Tool Shed. This will read the settings from the ``.shed.yml`` file. """ shed_context = shed.get_shed_context(ctx, **kwds) def create(realized_repository): repo_id = realized_repository.find_repository_id(ctx, shed_context) if repo_id is None: if realized_repository.create(ctx, shed_context): info("Repository created") if not kwds["skip_upload"]: return shed.upload_repository( ctx, realized_repository, **kwds ) else: return 0 else: return 2 else: return 1 exit_code = shed.for_each_repository(ctx, create, paths, **kwds) sys.exit(exit_code)