<commit_before># Copyright 2014-2016 Open Source Robotics Foundation, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import os


def add_argument_config_url(parser):
    parser.add_argument(
        'config_url',
        help='The url of the ROS buildfarm configuration index')


def add_argument_rosdistro_index_url(parser, required=False):
    help_msg = 'The URL to the ROS distro index'
    if not required:
        from rosdistro import get_index_url
        parser.add_argument(
            '--rosdistro-index-url',
            default=get_index_url(),
            help=("%s (default: '%s', based on the environment variable " +
                  "ROSDISTRO_INDEX_URL") % (help_msg, get_index_url()))
    else:
        parser.add_argument(
            '--rosdistro-index-url',
            required=True,
            help=help_msg)


def add_argument_rosdistro_name(parser):
    parser.add_argument(
        'rosdistro_name',
        help="The name of the ROS distro from the index")


def add_argument_other_rosdistro_name(parser):
    parser.add_argument(
        'other_rosdistro_name',
        help="The name of the other ROS distro from the index")


def add_argument_older_rosdistro_names(parser):
    parser.add_argument(
        'older_rosdistro_names',
        nargs='+',
        help='List of older rosdistro names to compare with')


def add_argument_build_name(parser, build_file_type):
    parser.add_argument(
        '%s_build_name' % build_file_type,
        help="The name / key of the '%s-build' file from the index" %
             build_file_type)


def add_argument_env_vars(parser):
    parser.add_argument(
        '--env-vars',
        nargs='*',
        help="Environment variables as 'key=value' for Dockerfile "
             'ENV directives')


def add_argument_repository_name(parser):
    parser.add_argument(
        'repository_name',
        help="The name of the 'repository' from the distribution file")


def add_argument_package_name(parser):
    parser.add_argument(
        'package_name',
        help="The name of the 'package' from the distribution file")<commit_msg>set default for --env-vars otherwise it can't be called without the option (#558)<commit_after># Copyright 2014-2016 Open Source Robotics Foundation, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import os


def add_argument_config_url(parser):
    parser.add_argument(
        'config_url',
        help='The url of the ROS buildfarm configuration index')


def add_argument_rosdistro_index_url(parser, required=False):
    help_msg = 'The URL to the ROS distro index'
    if not required:
        from rosdistro import get_index_url
        parser.add_argument(
            '--rosdistro-index-url',
            default=get_index_url(),
            help=("%s (default: '%s', based on the environment variable " +
                  "ROSDISTRO_INDEX_URL") % (help_msg, get_index_url()))
    else:
        parser.add_argument(
            '--rosdistro-index-url',
            required=True,
            help=help_msg)


def add_argument_rosdistro_name(parser):
    parser.add_argument(
        'rosdistro_name',
        help="The name of the ROS distro from the index")


def add_argument_other_rosdistro_name(parser):
    parser.add_argument(
        'other_rosdistro_name',
        help="The name of the other ROS distro from the index")


def add_argument_older_rosdistro_names(parser):
    parser.add_argument(
        'older_rosdistro_names',
        nargs='+',
        help='List of older rosdistro names to compare with')


def add_argument_build_name(parser, build_file_type):
    parser.add_argument(
        '%s_build_name' % build_file_type,
        help="The name / key of the '%s-build' file from the index" %
             build_file_type)


def add_argument_env_vars(parser):
    parser.add_argument(
        '--env-vars',
        nargs='*', default=[],
        help="Environment variables as 'key=value' for Dockerfile "
             'ENV directives')


def add_argument_repository_name(parser):
    parser.add_argument(
        'repository_name',
        help="The name of the 'repository' from the distribution file")


def add_argument_package_name(parser):
    parser.add_argument(
        'package_name',
        help="The name of the 'package' from the distribution file")
{'fraction_non_alphanumeric': 0.08788106887467068, 'fraction_numerical': 0.005080918328942416, 'mean_word_length': 3.097918272937548, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '2818843', 'n_tokens_mistral': 1558, 'n_tokens_neox': 1506, 'n_words': 478}