Beispiel #1
0
def cli(ctx, paths, **kwds):
    """Find all shed repositories in one or more directories.

    Currently, a shed repository is considered a directory with a .shed.yml
    file.
    """
    kwds["recursive"] = True
    repos = find_raw_repositories(ctx, paths, **kwds)
    raw_paths = [r.path for r in repos]
    paths = filter_paths(ctx, raw_paths, path_type="dir", **kwds)
    print_path_list(paths, **kwds)
def cli(ctx, paths, **kwds):
    """Find all shed repositories in one or more directories.

    Currently, a shed repository is considered a directory with a .shed.yml
    file.
    """
    kwds["recursive"] = True
    kwds["fail_fast"] = True
    repos = find_raw_repositories(ctx, paths, **kwds)
    # Since fail_fast is True, all repos are actual raw repo objects and
    # not exceptions.
    raw_paths = [r.path for r in repos]
    paths = filter_paths(ctx, raw_paths, path_type="dir", **kwds)
    print_path_list(paths, **kwds)
def cli(ctx, paths, **kwds):
    """Find all shed repositories in one or more directories.

    Currently, a shed repository is considered a directory with a .shed.yml
    file.
    """
    kwds["recursive"] = True
    kwds["fail_fast"] = True
    repos = find_raw_repositories(ctx, paths, **kwds)
    # Since fail_fast is True, all repos are actual raw repo objects and
    # not exceptions.
    raw_paths = [r.path for r in repos]
    paths = filter_paths(ctx, raw_paths, path_type="repo", **kwds)
    print_path_list(paths, **kwds)
Beispiel #4
0
def find_repos(paths, exclude=()):
    """\
    Find all workflow directories below each path in ``paths``.

    Same as ``planemo ci_find_repos``.
    """
    ctx = PlanemoContext()
    kwargs = dict(recursive=True,
                  fail_fast=True,
                  chunk_count=1,
                  chunk=0,
                  exclude=exclude)
    raw_repos = [_.path for _ in find_raw_repositories(ctx, paths, **kwargs)]
    return [
        Path(_)
        for _ in filter_paths(ctx, raw_repos, path_type="repo", **kwargs)
    ]
Beispiel #5
0
def cli(ctx, paths, **kwds):
    """Find all shed repositories in one or more directories and output as yaml.

    Currently, a shed repository is considered a directory with a .shed.yml
    file.
    """
    kwds["recursive"] = True
    kwds["fail_fast"] = True
    repos = find_raw_repositories(ctx, paths, **kwds)
    # Since fail_fast is True, all repos are actual raw repo objects and
    # not exceptions.
    raw_paths = [r.path for r in repos]
    realized_repos = []
    for repo_gen in (_realize_effective_repositories(r, path=p)
                     for r, p in zip(repos, raw_paths)):
        for repo in repo_gen:
            realized_repos.append({
                'name': repo.config['name'],
                'owner': repo.config['owner']
            })
    print_as_yaml(realized_repos, **kwds)