<commit_before>META_INDICATORS_FILEPATH = 'cait_indc_2/CW_NDC_CAIT_metadata.csv'.freeze
META_LEGEND_FILEPATH = 'cait_indc_2/CW_NDC_CAIT_legend.csv'.freeze
META_MAP_FILEPATH = 'cait_indc_2/CW_NDC_map.csv'.freeze
DATA_FILEPATH = 'cait_indc_2/CW_NDC_CAIT_data.csv'.freeze
SUBMISSIONS_FILEPATH = 'cait_indc_2/CW_NDC_Submission_URL.csv'.freeze
DEFAULT_CATEGORY = 'General'.freeze

class ImportCaitIndc
  def call
    cleanup

    load_csvs

    import_categories
    import_charts
    import_indicators

    load_indicator_keys
    import_labels
    import_values
    import_submissions
  end

  private

  def load_csvs
    @indicators = S3CSVReader.read(META_INDICATORS_FILEPATH).map(&:to_h)<commit_msg>Move constants inside class scope<commit_after>class ImportCaitIndc
  META_INDICATORS_FILEPATH = 'cait_indc_2/CW_NDC_CAIT_metadata.csv'.freeze
  META_LEGEND_FILEPATH = 'cait_indc_2/CW_NDC_CAIT_legend.csv'.freeze
  META_MAP_FILEPATH = 'cait_indc_2/CW_NDC_map.csv'.freeze
  DATA_FILEPATH = 'cait_indc_2/CW_NDC_CAIT_data.csv'.freeze
  SUBMISSIONS_FILEPATH = 'cait_indc_2/CW_NDC_Submission_URL.csv'.freeze
  DEFAULT_CATEGORY = 'General'.freeze

  def call
    cleanup

    load_csvs

    import_categories
    import_charts
    import_indicators

    load_indicator_keys
    import_labels
    import_values
    import_submissions
  end

  private

  def load_csvs
    @indicators = S3CSVReader.read(META_INDICATORS_FILEPATH).map(&:to_h)
{'fraction_non_alphanumeric': 0.06564245810055866, 'fraction_numerical': 0.008379888268156424, 'mean_word_length': 5.097872340425532, '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': '4205758', 'n_tokens_mistral': 614, 'n_tokens_neox': 582, 'n_words': 65}