<commit_before>module BatchCommands

  class BuildBatchCommand < Imperator::Command

    attribute :project_id, Integer
    attribute :version, String
    attribute :build
    attribute :name, String
    attribute :target_information, Hash
    attribute :execution_variables, Hash
    attribute :generate_name, Boolean, default: false

    validates_presence_of :project_id, :version
    validates_presence_of :name, unless: lambda { |create_batch_command| create_batch_command.generate_name }

    class << self

      def build(*args)
        new(*args).perform
      end
    end

    action do
      builder.batch_builder.build(batch_builder_arguments)
    end

    private

    def builder
      @builder ||= project.builder
      @builder
    end

    def batch_builder_arguments
      {
          project_id:          project_id,
          name:                new_name,
          build:               save_build,
          version:             version,
          target_information:  target_information,
          execution_variables: processed_execution_variables
      }<commit_msg>Unnecessary line<commit_after>module BatchCommands

  class BuildBatchCommand < Imperator::Command

    attribute :project_id, Integer
    attribute :version, String
    attribute :build
    attribute :name, String
    attribute :target_information, Hash
    attribute :execution_variables, Hash
    attribute :generate_name, Boolean, default: false

    validates_presence_of :project_id, :version
    validates_presence_of :name, unless: lambda { |create_batch_command| create_batch_command.generate_name }

    class << self

      def build(*args)
        new(*args).perform
      end
    end

    action do
      builder.batch_builder.build(batch_builder_arguments)
    end

    private

    def builder
      @builder ||= project.builder
    end

    def batch_builder_arguments
      {
          project_id:          project_id,
          name:                new_name,
          build:               save_build,
          version:             version,
          target_information:  target_information,
          execution_variables: processed_execution_variables
      }
{'fraction_non_alphanumeric': 0.05852534562211981, 'fraction_numerical': 0.0, 'mean_word_length': 2.4296998420221168, 'pattern_counts': {'":': 0, '<': 9, '<?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': '3515071', 'n_tokens_mistral': 571, 'n_tokens_neox': 549, 'n_words': 136}