<commit_before>module StackMaster
  class Validator
    def self.valid?(stack_definition, config)
      new(stack_definition, config).perform
    end

    def initialize(stack_definition, config)
      @stack_definition = stack_definition
      @config = config
    end

    def perform
      StackMaster.stdout.print "#{@stack_definition.stack_name}: "
      template_body = TemplateCompiler.compile(@config, @stack_definition.template_file_path)<commit_msg>Compress the template when we attempt to validate it<commit_after>module StackMaster
  class Validator
    def self.valid?(stack_definition, config)
      new(stack_definition, config).perform
    end

    def initialize(stack_definition, config)
      @stack_definition = stack_definition
      @config = config
    end

    def perform
      StackMaster.stdout.print "#{@stack_definition.stack_name}: "
      template_body = Stack.generate(@stack_definition, @config).maybe_compressed_template_body
{'fraction_non_alphanumeric': 0.07716371220020855, 'fraction_numerical': 0.0, 'mean_word_length': 4.133689839572193, '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': '1658446', 'n_tokens_mistral': 257, 'n_tokens_neox': 253, 'n_words': 57}