<commit_before>require_relative 'ipp_report_builder'

#
# This class and it's usages can be removed after
# move to the new instrument price policy is complete
class IppReporter

  attr_accessor :changed
  attr_reader :details, :errors, :report_builder


  def initialize
    @changed = 0
    @errors = []
    @report_builder = IppReportBuilder.new
    @details = OrderDetail.joins(:reservation)
                          .where('price_policy_id IS NOT NULL')
                          .where(state: [ 'New', 'In Process', 'Complete' ])
  end


  def report_changes
    build_report
    report_builder.summarize self
    report_builder.report_errors self
    File.write 'price_change_report.html', report_builder.render
  end
<commit_msg>change state array in OrderDetail query; oracle is case sensitive<commit_after>require_relative 'ipp_report_builder'

#
# This class and it's usages can be removed after
# move to the new instrument price policy is complete
class IppReporter

  attr_accessor :changed
  attr_reader :details, :errors, :report_builder


  def initialize
    @changed = 0
    @errors = []
    @report_builder = IppReportBuilder.new
    @details = OrderDetail.joins(:reservation)
                          .where('price_policy_id IS NOT NULL')
                          .where(state: %w(new inprocess complete))
  end


  def report_changes
    build_report
    report_builder.summarize self
    report_builder.report_errors self
    File.write 'price_change_report.html', report_builder.render
  end

{'fraction_non_alphanumeric': 0.07109940750493746, 'fraction_numerical': 0.0013166556945358788, 'mean_word_length': 3.164383561643836, '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': '4095990', 'n_tokens_mistral': 442, 'n_tokens_neox': 426, 'n_words': 124}