<commit_before>module JobFilters

  DEV_CATEGORY = 'Web, Mobile & Software Dev'.freeze
  DEV_SUBCATEGORIES = ['Web Development', 'Ecommerce Development', 'Other - Software Development',
                       'Scripts & Utilities', 'QA & Testing'].freeze
  FIXED_JOB_TYPE = 'Fixed'.freeze

  class Main

    attr_reader :jobs

    def initialize(jobs)
      @jobs = jobs
    end

    def filter
      result = jobs.select do |job|
        good_job?(job)
      end
      log "#{result.size} jobs left by #{self.class.name}"
      result
    end

    def good_job?(job)
      return false unless DEV_SUBCATEGORIES.push(DEV_CATEGORY).include?(job['subcategory2'])

      unless job['title']
        Rails.logger.error("job #{job.inspect} has no title, strange")
        return false
      end
<commit_msg>fix: JobFilter issue that became an error due to style fixes, yay<commit_after>module JobFilters

  DEV_CATEGORY = 'Web, Mobile & Software Dev'.freeze
  DEV_SUBCATEGORIES = ['Web Development', 'Ecommerce Development', 'Other - Software Development',
                       'Scripts & Utilities', 'QA & Testing'].freeze
  FIXED_JOB_TYPE = 'Fixed'.freeze

  class Main

    attr_reader :jobs

    def initialize(jobs)
      @jobs = jobs
    end

    def filter
      result = jobs.select do |job|
        good_job?(job)
      end
      log "#{result.size} jobs left by #{self.class.name}"
      result
    end

    def good_job?(job)
      return false unless (DEV_SUBCATEGORIES + [DEV_CATEGORY]).include?(job['subcategory2'])

      unless job['title']
        Rails.logger.error("job #{job.inspect} has no title, strange")
        return false
      end

{'fraction_non_alphanumeric': 0.10628019323671498, 'fraction_numerical': 0.0012077294685990338, 'mean_word_length': 2.6740576496674056, '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': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7623911', 'n_tokens_mistral': 532, 'n_tokens_neox': 507, 'n_words': 138}