<commit_before># Licensed under a 3-clause BSD style license - see LICENSE.rst
# -*- coding: utf-8 -*-
"""
hpsspy.validate
~~~~~~~~~~~~~~~

Functions for testing the validity of backup configurations before
actually running the backup.
"""
#
from __future__ import (absolute_import, division, print_function,
                        unicode_literals)


def main():
    """Entry-point for command-line scripts.

    Returns
    -------
    :class:`int`
        An integer suitable for passing to :func:`sys.exit`.
    """
    import logging
    import re
    import json
    from os import environ
    from os.path import basename, exists, isdir, join, splitext
    from sys import argv
    from argparse import ArgumentParser
    from . import __version__ as hpsspyVersion
    from .scan import compile_map, scan_disk
    desc = 'Validate HPSS backup configuration.'
    parser = ArgumentParser(prog=basename(argv[0]), description=desc)
    parser.add_argument('-c', '--cache-dir', action='store', dest='cache',
                        metavar='DIR',
                        default=join(environ['HOME'], 'scratch'),<commit_msg>fix import error [skip ci]<commit_after># Licensed under a 3-clause BSD style license - see LICENSE.rst
# -*- coding: utf-8 -*-
"""
hpsspy.validate
~~~~~~~~~~~~~~~

Functions for testing the validity of backup configurations before
actually running the backup.
"""
#
from __future__ import (absolute_import, division, print_function,
                        unicode_literals)


def main():
    """Entry-point for command-line scripts.

    Returns
    -------
    :class:`int`
        An integer suitable for passing to :func:`sys.exit`.
    """
    import logging
    import re
    import json
    from os import environ
    from os.path import basename, exists, isdir, join, splitext
    from sys import argv
    from argparse import ArgumentParser
    from . import __version__ as hpsspyVersion
    from .scan import compile_map, process_missing, scan_disk
    desc = 'Validate HPSS backup configuration.'
    parser = ArgumentParser(prog=basename(argv[0]), description=desc)
    parser.add_argument('-c', '--cache-dir', action='store', dest='cache',
                        metavar='DIR',
                        default=join(environ['HOME'], 'scratch'),
{'fraction_non_alphanumeric': 0.11592300962379702, 'fraction_numerical': 0.0026246719160104987, 'mean_word_length': 2.8501683501683504, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5856460', 'n_tokens_mistral': 626, 'n_tokens_neox': 607, 'n_words': 202}