<commit_before>#=================================================================================
# Huxley Cluster Githook - Service Configuration
#=================================================================================
# This file contains helper functions related to managing deployment configuration.
{join} = require "path"
{async, read, write} = require "fairmont"
{render} = require "mustache"

{pull_configuration, get_dirs, make_key, get_branch_name} = require "./helpers"

module.exports =
  # Pull data from the context that gets rendered when the API server transfers this script to the cluster.
  pull_context: async () ->
    context = yield pull_configuration {name: "context", path: __dirname}
    context.app.id = make_key()
    context.app.branch = yield get_branch_name()
    context.app.path = join process.env.HOME, "repos", context.app.name
    context.app.launch = join process.env.HOME, "repos", context.app.name, "launch"
    return context

  # Gather services and their relevant information into one package so we can take appropriate action.
  get_services: async (app) ->
    names = yield get_dirs app.launch
    services = {}
    for name in names
      services[name] =<commit_msg>fixed typo<commit_after>#=================================================================================
# Huxley Cluster Githook - Service Configuration
#=================================================================================
# This file contains helper functions related to managing deployment configuration.
{join} = require "path"
{async, read, write, merge} = require "fairmont"
{render} = require "mustache"

{pull_configuration, get_dirs, make_key, get_branch_name} = require "./helpers"

module.exports =
  # Pull data from the context that gets rendered when the API server transfers this script to the cluster.
  pull_context: async () ->
    context = yield pull_configuration {name: "context", path: __dirname}
    context.app.id = make_key()
    context.app.branch = yield get_branch_name()
    context.app.path = join process.env.HOME, "repos", context.app.name
    context.app.launch = join process.env.HOME, "repos", context.app.name, "launch"
    return context

  # Gather services and their relevant information into one package so we can take appropriate action.
  get_services: async (app) ->
    names = yield get_dirs app.launch
    services = {}
    for name in names
      services[name] =
{'fraction_non_alphanumeric': 0.21691176470588236, 'fraction_numerical': 0.0, 'mean_word_length': 4.844868735083533, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '1080264', 'n_tokens_mistral': 635, 'n_tokens_neox': 602, 'n_words': 216}