Example #1
0
def common_options(func):
    @click.group(context_settings={"help_option_names": ["--help", "-h"]})
    @click_log.simple_verbosity_option(logger)
    @option(
        "--repository",
        "-r",
        default=lambda: find_root(MARKER_DIRECTORIES),
        type=Path(exists=True, file_okay=False),
        help="Root of the repository (regardless of the directory analyzed)",
    )
    @option(
        "--database-name",
        "--dbname",
        callback=default_database,
        type=Path(dir_okay=False),
    )
    @wraps(func)
    # pyre-fixme[53]: Captured variable `func` is not annotated.
    # pyre-fixme[3]: Return type must be annotated.
    # pyre-fixme[2]: Parameter must be annotated.
    # pyre-fixme[2]: Parameter must be annotated.
    def wrapper(*args, **kwargs):
        return func(*args, **kwargs)

    return wrapper
Example #2
0
def global_option(f):
    @functools.wraps(f)
    def internal(*args, **kwargs):
        load_config(kwargs.pop('config'))
        f(*args, **kwargs)

    config = option('--config', '-c', type=Path(exists=True),
                    help=u'설정 파일 (.py)')
    return config(internal)
Example #3
0
def sync_destination_option(func):
    """
    Add the sync destination option to the decorated command func.

    :param func: Click CLI command to decorate
    :return: decorated CLI command
    """
    return option('--dest',
                  '-d',
                  'sync_destination',
                  type=Path(file_okay=False),
                  help='Remote directory to sync to. Optional.')(func)
Example #4
0
def sync_source_option(func):
    """
    Add the sync source option to the decorated command func.

    :param func: Click CLI command to decorate
    :return: decorated CLI command
    """
    return option('--src',
                  '-s',
                  'sync_source',
                  type=Path(exists=True, file_okay=False, resolve_path=True),
                  help='Local directory from which to sync. Optional.')(func)
Example #5
0
class VolumeMountParamType(click.ParamType):

    name = "vol"

    source_spec = Path(exists=True,
                       dir_okay=True,
                       readable=True,
                       writable=True,
                       allow_dash=False)
    destination_spec = Path(exists=False, allow_dash=False)

    def __init__(self):
        pass

    def convert(self, value, param, ctx):
        [source, destination] = value.split(":")
        return VolumeMount(
            self.source_spec.convert(source.strip(), None, None),
            self.destination_spec.convert(destination.strip(), None, None))

    def __repr__(self):
        return 'SOURCE:DESTINATION'
def make_directory_override_option(func):
    """
    Add the make destination option to the decorated command func.

    :param func: Click CLI command to decorate
    :return: decorated CLI command
    """
    return option(
        '--dest',
        '-d',
        'make_destination',
        type=Path(file_okay=False, ),
        help='Remote directory to run make in. Optional.',
    )(func)
Example #7
0
def config(func):
    """Provide :option:`--config` or :option:`-c` option and
    run :func:`initialize_app()` automatically.

    :param func: a command function to decorate
    :type func: :class:`collections.abc.Callable`
    :returns: decorated ``func``

    """
    @functools.wraps(func)
    def internal(*args, **kwargs):
        initialize_app(kwargs.pop('config'))
        func(*args, **kwargs)

    deco = option('--config', '-c', type=Path(exists=True),
                  help='Configuration file (YAML or Python)')
    return deco(internal)
Example #8
0
import re

from click import argument, command, File, option, Path

from ..utils import samples_from_dir


@command()
@argument('in_directory', type=Path(exists=True, file_okay=False))
@option('--base-dir',
        '-b',
        type=Path(exists=True, file_okay=False),
        help='The directory to create relative paths from.')
@option(
    '--out-file',
    '-o',
    type=File(mode='w'),
    default=None,
    help='A file for saving the printed filenames for easy future reference.')
@option('--show-urls',
        '-u',
        default=False,
        is_flag=True,
        help='Also show the original URL of each sample.')
def main(in_directory, base_dir, out_file, show_urls):
    """
    Recursively list paths of HTML files in IN_DIRECTORY relative to BASE_DIR,
    one path per line. If BASE_DIR is not specified, paths are relative to
    IN_DIRECTORY. Optionally saves output to OUT_FILE.

    This is useful for vectorizing samples using FathomFox. FathomFox expects
Example #9
0
import json
import os

from click import command, group, argument, Path, echo, pass_context

from filecode.flake_master.utils.presets import fetch_preset, apply_preset_to_path


@group()
def cli():
    pass  # pragma: no cover


@command()
@argument('preset_name')
@argument('project_path', type=Path(exists=True))
@pass_context
def flake_setup(ctx, preset_name, project_path):
    """Setup flake8 preset to specified directory."""
    preset_file_name = ctx.obj['preset_file_name']
    preset_file_path = os.path.join(project_path, preset_file_name)
    if os.path.exists(preset_file_path):
        echo(
            f'Preset file ({preset_file_path}) already exists. Looks like flake master '
            f'has already been deployed to {project_path}. May be you mean `upgrade`, not `setup`?',
            err=True,
        )
        exit(1)
    preset = fetch_preset(preset_name_or_url_or_path=preset_name)
    if not preset:
        echo(f'Error fetching preset {preset_name}.', err=True)
Example #10
0
import pathlib
from random import sample
from shutil import move

from click import argument, command, Path, UsageError


@command()
@argument('from_dir',
          type=Path(exists=True, file_okay=False, writable=True,
                    dir_okay=True))
@argument('to_dir',
          type=Path(exists=True, file_okay=False, writable=True,
                    dir_okay=True))
@argument('number', type=int)
def main(from_dir, to_dir, number):
    """Move a random selection of HTML files and their extracted resources, if
    any, from one directory to another. Ignore hidden files.

    This is useful for dividing a corpus into training, validation, and testing
    sets.

    """
    # Make these strings into ``Path``s so they are easier to work with
    from_dir = pathlib.Path(from_dir)
    to_dir = pathlib.Path(to_dir)

    for file in sample(list(from_dir.glob('*.html')), number):
        # If the file has resources, we must move those as well:
        if (from_dir / 'resources' / file.stem).exists():
            # Make sure we don't overwrite an existing resources directory
Example #11
0
    if ctx.params["database_engine"] == DBType.MEMORY:
        return ":memory:"

    if ctx.params["repository"]:
        return os.path.join(ctx.params["repository"], DB.DEFAULT_DB_FILE)

    raise click.BadParameter("Could not guess a database location")


@group()
@option(
    "--repository",
    "-r",
    default=lambda: find_root(MARKER_DIRECTORIES),
    type=Path(exists=True, file_okay=False),
    help="Root of the repository (regardless of the directory analyzed)",
)
@option(
    "--database-engine",
    "--database",
    type=Choice([DBType.SQLITE, DBType.MEMORY]),
    default=DBType.SQLITE,
    help="database engine to use",
)
@option(
    "--database-name", "--dbname", callback=default_database, type=Path(dir_okay=False)
)
@click.pass_context
def cli(
    ctx: click.Context,
Example #12
0
    if ctx.params["database_engine"] == DBType.MEMORY:
        return ":memory:"

    if ctx.params["repository"]:
        return os.path.join(ctx.params["repository"], DB.DEFAULT_DB_FILE)

    raise click.BadParameter("Could not guess a database location")


@group(context_settings={"help_option_names": ["--help", "-h"]})
@click_log.simple_verbosity_option(logger)
@option(
    "--repository",
    "-r",
    default=lambda: find_root(MARKER_DIRECTORIES),
    type=Path(exists=True, file_okay=False),
    help="Root of the repository (regardless of the directory analyzed)",
)
@option(
    "--database-engine",
    "--database",
    type=Choice([DBType.SQLITE, DBType.MEMORY]),
    default=DBType.SQLITE,
    help="database engine to use",
)
@option("--database-name",
        "--dbname",
        callback=default_database,
        type=Path(dir_okay=False))
@click.pass_context
def cli(
Example #13
0
import re

import click
from click import Path
from github import Github, UnknownObjectException


@click.command()
@click.option('-u', '--user', help='GitHub username')
@click.option('-p', '--pwd', help='GitHub password')
@click.option('-s', '--secret', help='GitHub access token')
@click.option('-r', '--repo-slug', help='Repo slug. i.e.: apple/swift')
@click.option('-cf', '--changelog-file', help='Changelog file path')
@click.option('-d', '--doc-url', help='Documentation url')
@click.option('-df', '--data-file', help='Data file to upload', type=Path(exists=True, file_okay=True, dir_okay=False,
                                                                          resolve_path=True))
@click.argument('tag')
def create_or_update_release(user, pwd, secret, repo_slug, changelog_file, doc_url, data_file, tag):
    """
    Creates or updates (TODO)
    a github release corresponding to git tag <TAG>.
    """
    # 1- AUTHENTICATION
    if user is not None and secret is None:
        # using username and password
        # validate('user', user, instance_of=str)
        assert isinstance(user, str)
        # validate('pwd', pwd, instance_of=str)
        assert isinstance(pwd, str)
        g = Github(user, pwd)
    elif user is None and secret is not None:
Example #14
0
    IPython.start_ipython(argv=ipython_args if ipython_args else [],
                          user_ns=scope_vars,
                          config=config)


@click.command(help="parse static analysis output and save to disk")
@pass_context
@option("--run-kind", type=str)
@option("--branch", type=str)
@option("--commit-hash", type=str)
@option("--job-id", type=str)
@option("--differential-id", type=int)
@option(
    "--previous-issue-handles",
    type=Path(exists=True),
    help=("file containing list of issue handles to compare INPUT_FILE to "
          "(preferred over --previous-input)"),
)
@option(
    "--previous-input",
    type=Path(exists=True),
    help="static analysis output to compare INPUT_FILE to",
)
@option(
    "--linemap",
    type=Path(exists=True),
    help="json file mapping new locations to old locations",
)
@option(
    "--store-unused-models",
Example #15
0
              "for HTTP traffic.")
@click.option("--https-port",
              type=int,
              help="A port number (standalone) or base port number (cluster) "
              "for HTTPS traffic.")
@click.option("-i",
              "--image",
              help="The Docker image tag to use for building containers. The "
              "repository name can be included before the colon, but will "
              "default to 'neo4j' if omitted. Note that a Neo4j "
              "Enterprise Edition image is required for building "
              "clusters. File URLs can also be passed, which can "
              "allow for loading images from local tar files.")
@click.option("-I",
              "--import-dir",
              type=Path(exists=True, dir_okay=True, writable=True),
              help="Share a local directory for use by server import.")
@click.option("-L",
              "--logs-dir",
              type=Path(exists=True, dir_okay=True, writable=True),
              help="Share a local directory for use by server logs. A "
              "subdirectory will be created for each machine.")
@click.option("-n",
              "--name",
              help="A Docker network name to which all servers will be "
              "attached. If omitted, an auto-generated name will be "
              "used.")
@click.option("-N",
              "--neo4j-source-dir",
              type=Path(exists=True, dir_okay=True),
              help="Path to neo4j source repo. Mounts and uses the "
Example #16
0
import click
from click import Path

from biome.text import Pipeline


@click.command()
@click.argument("pipeline_path", type=Path(exists=True))
@click.option(
    "--port",
    "-p",
    type=int,
    default=8888,
    show_default=True,
    help="Port on which to serve the REST API.",
)
@click.option(
    "--predictions_dir",
    "-pd",
    type=click.Path(),
    default=None,
    help="Path to log raw predictions from the service.",
)
def serve(pipeline_path: str, port: int, predictions_dir: str) -> None:
    """Serves the pipeline predictions as a REST API

    PIPELINE_PATH is the path to a pretrained pipeline (model.tar.gz file).
    """
    pipeline = Pipeline.from_pretrained(pipeline_path)

    if predictions_dir:
Example #17
0
    INPUT is a path to fasta file or "-" to specify STDIN.

    """
    query = str(site2dna(site))
    for (name, seq, qual) in readfq(input):
        start = clip_left
        end = len(seq) - clip_right
        idx = seq[start:end].find(query)
        if idx >= 0:
            print(f"{name}|{site}|{idx + start}", file=sys.stdout)


@cli.command(short_help="build de Bruijn graph")
@argument_input
@argument("output_path", type=Path(exists=False))
@option("-k", "--kmer-size", type=int, required=True, help="k-mer size")
def builddbg(input, output_path, kmer_size):
    """Build a de bruijn graph on a set of protein sequences

    This process ignores input sequences shorter than the specified kmer size.

    If the output path ends with .gz, the output will be compressed.

    INPUT is a path to fasta file or "-" to specify STDIN. OUTPUT_PATH must
    point to a valid path.

    """
    try:
        import networkx as nx
        from pepsyn.dbg import fasta_handle_to_dbg
Example #18
0
@option(
    '-s',
    '--api-secret',
    help='Last.fm/Libre.fm API secret key.',
)
@option(
    '-L',
    '--libre.fm',
    'librefm',
    is_flag=True,
    default=False,
    help='Connect to Libre.fm network instead of Last.fm network.',
)
@option(
    '--config',
    type=Path(file_okay=True, dir_okay=False, writable=True),
    default=os.path.join(user_config_dir(APP_NAME), 'config.json'),
    show_default=True,
    help='The path to configuration file.',
)
@option(
    '--cache-dir',
    type=Path(file_okay=False, dir_okay=True, writable=True),
    metavar='DIR',
    default=user_cache_dir(APP_NAME),
    show_default=True,
    help='The directory path to store cache files.',
)
@option(
    '-b',
    '--back',
Example #19
0
        try:
            username = User.uncache('authentication')['username']
        except FileNotFoundError:
            username = '******'

        args = (settings.USER_DIR, username)
        secho('Deleted %s (%s)' % args, **DEFAULT_STYLE)


# Validate
# -----------------------------------------------------------------------------


@command(context_settings=CONTEXT_SETTINGS)
@argument('filepath', required=True, type=Path(exists=True, resolve_path=True))
@option('-s', '--schema', help='Validate only the schema.', is_flag=True)
def validate(filepath, schema):
    """Validate a fiscal data-package.

    The FILEPATH is the relative or absolute path to a datapackage. By default,
    the command validates both the schema and the data files.
    """
    _, extension = splitext(filepath)
    filename = basename(filepath)

    if extension != '.json':
        secho('Expecting %s to be JSON file' % filepath, **ERROR_STYLE)
        sys.exit(1)

    package = FiscalDataPackage(filepath)
Example #20
0
TEMPLATES_REPO = '[email protected]:ThreadsStylingLtd/stylist.git'

GIT_IGNORE = """
.stylist/environment
terraform/.terraform/environment
terraform/.terraform/modules
terraform/.terraform/plugins/*
!terraform/.terraform/plugins/*/lock.json
"""


@cli.command(help='Initialise new project')
@click.argument('git_repository', default='.')
@click.option(
    '--path',
    type=Path(),
    help='Destination directory in which project should be initialised')
@stylist_context
def init(ctx, git_repository, path):
    """
    @@ignore_check@@
    """
    try:
        if git_repository == '.':
            path = os.getcwd()
        elif not path:
            path = os.path.join(
                os.getcwd(),
                git_repository.split('/')[-1].replace('.git', ''))

        ctx.working_dir = path
Example #21
0
        return gzip.open(*args, **kwargs)
    else:
        return open(*args, **kwargs)


@group(context_settings={'help_option_names': ['-h', '--help']})
def cli():
    """phip -- PhIP-seq analysis tools"""
    pass


@cli.command(name='truncate-fasta')
@option('-i',
        '--input',
        required=True,
        type=Path(exists=True, dir_okay=False),
        help='input fasta')
@option('-o',
        '--output',
        required=True,
        type=Path(exists=False),
        help='output fasta')
@option('-k',
        '--length',
        required=True,
        type=int,
        help='length of starting subsequence to extract')
def truncate_fasta(input, output, length):
    """truncate each sequence of a fasta file"""
    from Bio import SeqIO
    with open(output, 'w') as op:
Example #22
0
def make_extraction_dir(path):
    suffix = 0
    ideal_name = without_suffix(basename(path), '.zip')
    while True:
        try:
            dir_name = ideal_name + ((' ' + str(suffix)) if suffix else '')
            mkdir(dir_name)
        except FileExistsError:
            suffix += 1
        else:
            return dir_name


@command()
@argument('zip_file',
          type=Path(exists=True, dir_okay=False, allow_dash=True))
def main(zip_file):
    """Unzip a zip archive containing files with names too long for your
    filesystem. Rename the files as they emerge to get around that limit,
    retaining only leading numbers (though stripping leading zeroes) and the
    extension. If a file doesn't match that pattern, extract it with its
    original name."""
    dir_name = make_extraction_dir(zip_file)
    with ZipFile(zip_file) as archive:
        with progressbar(archive.namelist()) as bar:
            for name in bar:
                base = basename(name)
                match = re.match('0*(\d+) .*(\.[a-zA-Z0-9]+$)', base)
                if match:
                    extracted_name = match.group(1) + match.group(2)
                else:
Example #23
0
_ENV_PREFIX = "PREACHER_CLI_"
_ENV_BASE_URL = f"{_ENV_PREFIX}BASE_URL"
_ENV_ARGUMENT = f"{_ENV_PREFIX}ARGUMENT"
_ENV_LEVEL = f"{_ENV_PREFIX}LEVEL"
_ENV_RETRY = f"{_ENV_PREFIX}RETRY"
_ENV_DELAY = f"{_ENV_PREFIX}DELAY"
_ENV_TIMEOUT = f"{_ENV_PREFIX}TIMEOUT"
_ENV_CONCURRENCY = f"{_ENV_PREFIX}CONCURRENCY"
_ENV_CONCURRENT_EXECUTOR = f"{_ENV_PREFIX}CONCURRENT_EXECUTOR"
_ENV_REPORT = f"{_ENV_PREFIX}REPORT"
_ENV_PLUGIN = f"{_ENV_PREFIX}PLUGIN"


@command()
@argument("paths", metavar="path", nargs=-1, type=Path(exists=True))
@option(
    "base_url",
    "-u",
    "--base-url",
    help="specify the base URL",
    envvar=_ENV_BASE_URL,
    default="",
)
@option(
    "arguments",
    "-a",
    "--argument",
    help='scenario arguments in format "NAME=VALUE"',
    type=ArgumentType(),
    envvar=_ENV_ARGUMENT,
Example #24
0
from click import argument, option, pass_context, Path, File
from functools import update_wrapper, partial
from pypandoc import convert
from .tex_renderer import TexRenderer
from .processors import load_spec, process_includes

_path = Path(exists=True)


def pandoc_processor(text, citation_backend=None, extra_args=[]):
    if citation_backend is not None:
        extra_args.append("--" + citation_backend)
    return convert(text, 'latex', format='md', extra_args=extra_args)


def standard_interface(f):
    @argument('defs', type=_path)
    @option('--captions', type=_path)
    @option('--collect-dir',
            type=_path,
            help="Directory in which figure files can be found by ID")
    # This is kinda a legacy option -- this type of thing can be controlled by
    # pointing to a new set of templates now.
    @option('--starred-floats/--no-starred-floats', default=True)
    @option('--natbib', 'citation_backend', flag_value='natbib', default=True)
    @option('--biblatex', 'citation_backend', flag_value='biblatex')
    @option("--order-by", default=None, type=File())
    @pass_context
    def cli_wrapper(ctx, defs, **kwargs):
        # Get captions file if defined
        spec = load_spec(defs, caption_file=kwargs.pop('captions', None))
Example #25
0
def write_events(location: str, files: Dict[str, List[str]]) -> None:
    makedirs(location)
    for fn, data in files.items():
        with open_file(f'{location}/{fn}.data', 'w', atomic=True) as f:
            f.writelines(data)


@command(
    epilog=('Please report bugs at '
            'https://github.com/JNRowe/rdial/issues'),
    context_settings={'help_option_names': ['-h', '--help']})
@option(
    '--database',
    default=user_data('rdial'),
    type=Path(exists=True, file_okay=False),
    help='Path to rdial database')
@argument('output', type=Path(exists=False))
def main(database: str, output: str) -> None:
    """Export rdial data for use with timew.

    Writes timew compatible data to ‘output’.
    """
    if exists(output):
        raise BadOptionUsage('output', 'Output path must not exist')
    files = process_events(database)
    write_events(output, files)


if __name__ == '__main__':
    main()
Example #26
0
            tokens: List[str] = line.strip().split()
            identifier = tokens[0]
            assert identifier in ('a', 'c'), \
                f'Unrecognized identifer: {identifier}'
            if identifier == 'a':
                assert len(tokens) == 4
                network.add_edge(*[int(token) for token in tokens[1:]])
                num_arcs += 1
    assert arcs == num_arcs, f'Expected {arcs} arcs, but got {num_arcs}.'
    return network


@command()
@option('--filename',
        '-f',
        type=Path(exists=True, file_okay=True, dir_okay=False, readable=True),
        required=True,
        help='Path to flow network specification.')
def main(filename: str):
    """Compute maximum flow on flow network."""
    network = create_network(filename)
    print(f'Received network with {network.vertices} nodes',
          f'and {np.count_nonzero(network.capacity)} arcs.')
    max_flow, flow_matrix = network.maximum_flow()
    print(f'Maximum flow = {max_flow}')
    dim_1, dim_2 = np.nonzero(network.capacity)
    for src, dst in zip(dim_1, dim_2):
        flow = flow_matrix[src, dst]
        capacity = network.capacity[src, dst]
        print(f'{src} -> {dst} : {flow} / {capacity}')
Example #27
0
from github import Github, UnknownObjectException
# from valid8 import validate  not compliant with python 2.7


@click.command()
@click.option('-u', '--user', help='GitHub username')
@click.option('-p', '--pwd', help='GitHub password')
@click.option('-s', '--secret', help='GitHub access token')
@click.option('-r', '--repo-slug', help='Repo slug. i.e.: apple/swift')
@click.option('-cf', '--changelog-file', help='Changelog file path')
@click.option('-d', '--doc-url', help='Documentation url')
@click.option('-df',
              '--data-file',
              help='Data file to upload',
              type=Path(exists=True,
                        file_okay=True,
                        dir_okay=False,
                        resolve_path=True))
@click.argument('tag')
def create_or_update_release(user, pwd, secret, repo_slug, changelog_file,
                             doc_url, data_file, tag):
    """
    Creates or updates (TODO)
    a github release corresponding to git tag <TAG>.
    """
    # 1- AUTHENTICATION
    if user is not None and secret is None:
        # using username and password
        # validate('user', user, instance_of=str)
        assert isinstance(user, str)
        # validate('pwd', pwd, instance_of=str)
        assert isinstance(pwd, str)
Example #28
0
from click import Path, argument, command, option, secho

from .clean_ipynb import clean_ipynb


@command(context_settings={"help_option_names": ("-h", )})
@argument("ipynb_file_paths", nargs=-1, type=Path(exists=True))
@option("--overwrite", is_flag=True)
def cli(ipynb_file_paths, overwrite):
    """
    Clean .ipynb.

    https://github.com/kwatme/clean_ipynb
    """

    for ipynb_file_path in ipynb_file_paths:

        secho(ipynb_file_path, bg="black", fg="bright_green")

        clean_ipynb(ipynb_file_path, overwrite)
Example #29
0
    _ = Patray(config)
    sys.exit(app.exec_())


style = Choice(["combo", "radio"])
options = [
    option("--profile-enabled", default=True, type=bool),
    option("--profile-style", default="combo", type=style),
    option("--port-enabled", default=True, type=bool),
    option("--port-style", default="radio", type=style),
    option("--port-maximum-volume", default=100, type=int),
    option("--port-hide-by-mask", multiple=True),
    option("--log-level", default="INFO"),
    option("--icon-path",
           default=None,
           required=False,
           type=Path(exists=True,
                     dir_okay=False,
                     readable=True,
                     resolve_path=True)),
    option("--icon-color",
           default="#fff",
           help="Use `random` value for random color on each click"),
    version_option(version, message="%(version)s"),
]
entrypoint = build_entrypoint(main,
                              options,
                              auto_envvar_prefix="PATRAY",
                              show_default=True)
entrypoint(prog_name="patray")
Example #30
0
"""Utility commands."""
import click
from click import Path
from tqdm import tqdm

from puppo import cli
from puppo.decorator_functions.display_decorators import command_handler
from puppo.puppo_commands.command_functions.clean_functions import \
    clean_directory


@cli.command()
@click.argument('directories', nargs=-1, required=True, type=Path(exists=True))
@click.option('-v',
              '--verbose',
              is_flag=True,
              help="Display additional information.")
@command_handler('clean')
def clean(directories, verbose):
    """Remove all cached files and directories.

    This command is used for deleting all of the '__pycache__' directories and
    '.pyc' files. Useful if you're getting errors do to with a mismatch between
    the python file and it's cached counterpart.

    :argument: directories -- the directories to search for '__pycache__'
                                   directories and '.pyc' files and remove.
    """
    for root_directory in tqdm(directories, desc="Directories cleaned"):
        clean_directory(root_directory, verbose)