<commit_before># Copyright 2013 The LUCI Authors. All rights reserved.
# Use of this source code is governed under the Apache License, Version 2.0
# that can be found in the LICENSE file.

import collections

from recipe_engine.config import List
from recipe_engine.config import (config_item_context, ConfigGroup, ConfigList,
                          Dict, Single, Set)
from recipe_engine.config_types import Path
from recipe_engine.util import Placeholder


def BaseConfig(**_kwargs):
  def render_cmd(lst):
    return [(x if isinstance(x, Placeholder) else str(x)) for x in lst]

  return ConfigGroup(
    # For compatibility with buildbot, the step name must be ascii, which is why
    # this is a 'str' and not a 'basestring'.
    name = Single(str),
    cmd = List(inner_type=(int,basestring,Path,Placeholder),
               jsonish_fn=render_cmd),
    timeout = Single(int, required=False),

    # optional<commit_msg>Make Step API support type long in commands<commit_after># Copyright 2013 The LUCI Authors. All rights reserved.
# Use of this source code is governed under the Apache License, Version 2.0
# that can be found in the LICENSE file.

import collections

from recipe_engine.config import List
from recipe_engine.config import (config_item_context, ConfigGroup, ConfigList,
                          Dict, Single, Set)
from recipe_engine.config_types import Path
from recipe_engine.util import Placeholder


def BaseConfig(**_kwargs):
  def render_cmd(lst):
    return [(x if isinstance(x, Placeholder) else str(x)) for x in lst]

  return ConfigGroup(
    # For compatibility with buildbot, the step name must be ascii, which is why
    # this is a 'str' and not a 'basestring'.
    name = Single(str),
    cmd = List(inner_type=(int,long,basestring,Path,Placeholder),
               jsonish_fn=render_cmd),
    timeout = Single(int, required=False),

    # optional
{'fraction_non_alphanumeric': 0.07676019057702488, 'fraction_numerical': 0.006352567496029645, 'mean_word_length': 3.748743718592965, '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': '3076795', 'n_tokens_mistral': 546, 'n_tokens_neox': 519, 'n_words': 206}