<commit_before># Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.


"""Recipe module to ensure a checkout is consistant on a bot."""


from slave import recipe_api


# To allow us to enable masters/builders/slaves independently.
# This list override the bot_update version and recipe bots can only be
# enabled here rather than in bot_update.py.
ENABLED_MASTERS = ['chromium.git']
ENABLED_BUILDERS = {
    'tryserver.chromium': [
        'linux_rel_alt',
    ],
    'chromium.linux': [
        'Android Builder (dbg)',
        'Android Builder',
        'Android Clang Builder (dbg)',
        'Android Webview AOSP Builder',
        'Linux Builder (dbg)',
        'Linux Builder (dbg)(32)',
        'Linux Builder',
    ]
}
ENABLED_SLAVES = {}


# This is just for testing, to indicate if a master is using a Git scheduler
# or not.
GIT_MASTERS = ['chromium.git']


def jsonish_to_python(spec, is_top=False):
  """Turn a json spec into a python parsable object.

  This exists because Gclient specs, while resembling json, is actually
  ingested using a python "eval()".  Therefore a bit of plumming is required
  to turn our newly constructed Gclient spec into a gclient-readable spec.
  """
  ret = ''
  if is_top:  # We're the 'top' level, so treat this dict as a suite.
    ret = '\n'.join(
      '%s = %s' % (k, jsonish_to_python(spec[k])) for k in sorted(spec)
    )
  else:<commit_msg>Revert of Revert of Enable bot update on slave[250:256]-c4 on the tryserver (https://codereview.chromium.org/240353004/)<commit_after># Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.


"""Recipe module to ensure a checkout is consistant on a bot."""


from slave import recipe_api


# To allow us to enable masters/builders/slaves independently.
# This list override the bot_update version and recipe bots can only be
# enabled here rather than in bot_update.py.
ENABLED_MASTERS = ['chromium.git']
ENABLED_BUILDERS = {
    'tryserver.chromium': [
        'linux_rel_alt',
    ],
    'chromium.linux': [
        'Android Builder (dbg)',
        'Android Builder',
        'Android Clang Builder (dbg)',
        'Android Webview AOSP Builder',
        'Linux Builder (dbg)',
        'Linux Builder (dbg)(32)',
        'Linux Builder',
    ]
}
ENABLED_SLAVES = {
    'tryserver.chromium': ['slave%d-c4' % i for i in range(250, 256)]
}


# This is just for testing, to indicate if a master is using a Git scheduler
# or not.
GIT_MASTERS = ['chromium.git']


def jsonish_to_python(spec, is_top=False):
  """Turn a json spec into a python parsable object.

  This exists because Gclient specs, while resembling json, is actually
  ingested using a python "eval()".  Therefore a bit of plumming is required
  to turn our newly constructed Gclient spec into a gclient-readable spec.
  """
  ret = ''
  if is_top:  # We're the 'top' level, so treat this dict as a suite.
    ret = '\n'.join(
      '%s = %s' % (k, jsonish_to_python(spec[k])) for k in sorted(spec)
    )
  else:
{'fraction_non_alphanumeric': 0.10144472361809045, 'fraction_numerical': 0.01099246231155779, 'mean_word_length': 3.2694369973190347, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, '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': '3217593', 'n_tokens_mistral': 1029, 'n_tokens_neox': 973, 'n_words': 389}