How to use the planemo.options.optional_tools_arg function in planemo

To help you get started, we’ve selected a few planemo examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github galaxyproject / planemo / planemo / commands / cmd_lint.py View on Github external
@options.optional_tools_arg(multiple=True, allow_uris=True)
@options.report_level_option()
@options.report_xunit()
@options.fail_level_option()
@options.skip_option()
@options.lint_xsd_option()
@options.recursive_option()
@click.option(
    "--urls",
    is_flag=True,
    default=False,
    help="Check validity of URLs in XML files",
)
@click.option(
    "--doi",
    is_flag=True,
    default=False,
github galaxyproject / planemo / planemo / commands / cmd_shed_build.py View on Github external
@options.optional_tools_arg(multiple=False)
@command_function
def cli(ctx, path, **kwds):
    """Create a Galaxy tool tarball from a ``.shed.yml`` file.
    """

    def build(realized_repository):
        tarpath = shed.build_tarball(realized_repository.real_path)
        outpath = realized_repository.real_path + ".tar.gz"
        shutil.move(tarpath, outpath)
        print("Created: %s" % (outpath))
        return 0

    exit_code = shed.for_each_repository(ctx, build, [path], **kwds)
    sys.exit(exit_code)
github galaxyproject / planemo / planemo / commands / cmd_mull.py View on Github external
@options.optional_tools_arg(multiple=True)
@options.recursive_option()
@options.mulled_options()
@options.conda_ensure_channels_option()
@command_function
def cli(ctx, paths, **kwds):
    """Build containers for specified tools.

    Supplied tools will be inspected for referenced requirement packages. For
    each combination of requirements a "mulled" container will be built. Galaxy
    can automatically discover this container and subsequently use it to run
    or test the tool.

    For this to work, the tool's requirements will need to be present in a known
    Conda channel such as bioconda (https://github.com/bioconda/bioconda-recipes).
    This can be verified by running ``planemo lint --conda_requirements`` on the
    target tool(s).
github galaxyproject / planemo / planemo / commands / cmd_conda_env.py View on Github external
@options.optional_tools_arg()
@options.conda_target_options()
# @options.skip_install_option()  # TODO
@command_function
def cli(ctx, path, **kwds):
    """Activate a conda environment for tool.

    Source the output of this command to activate a conda environment for this
    tool.

    \b
        $ . <(planemo conda_env seqtk_seq.xml)
        Deactivate environment with conda_env_deactivate
        (seqtk_seq_v6) $ which seqtk
        /home/planemo/miniconda2/envs/jobdepsDkzcjjfecc6d406196737781ff4456ec60975c137e04884e4f4b05dc68192f7cec4656/bin/seqtk
        (seqtk_seq_v6) $ conda_env_deactivate
        $
github galaxyproject / planemo / planemo / commands / cmd_training_init.py View on Github external
@options.optional_tools_arg(multiple=True, allow_uris=True)
@options.training_init_options()
# @options.force_option()
@options.galaxy_serve_options()
@command_function
def cli(ctx, uris, **kwds):
    """Build training template from workflow."""
    kwds["no_dependency_resolution"] = True
    training = Training(kwds)
    training.init_training(ctx)
github galaxyproject / planemo / planemo / commands / cmd_training_generate_from_wf.py View on Github external
@options.optional_tools_arg(multiple=True, allow_uris=True)
@options.training_generate_tuto_from_wf_options()
@options.galaxy_serve_options()
@command_function
def cli(ctx, uris, **kwds):
    """Create tutorial skeleton from workflow."""
    kwds["no_dependency_resolution"] = True
    training = Training(kwds)
    training.generate_tuto_from_wf(ctx)
github galaxyproject / planemo / planemo / commands / cmd_serve.py View on Github external
@options.optional_tools_arg(multiple=True, allow_uris=True)
@options.galaxy_serve_options()
@options.enable_cwl_option()
@options.galaxy_cwl_root_option()
@command_function
def cli(ctx, uris, **kwds):
    """Launch Galaxy instance with specified tools.

    The Galaxy tool panel will include just the referenced tool or tools (by
    default all the tools in the current working directory) and the upload
    tool.

    planemo will search parent directories to see if any is a Galaxy instance
    - but one can pick the Galaxy instance to use with the ``--galaxy_root``
    option or force planemo to download a disposable instance with the
    ``--install_galaxy`` flag.