<commit_before>Feature: Purchase Emissions Calculations
  The purchase model should generate correct emission calculations
  
  Scenario Outline: Calculations starting from a merchant
    Given a purchase has "merchant.id" of "<id>"
    And it has "cost" of "<cost>"
    And it has "date" of "<date>"
    When emissions are calculated
    Then the emission value should be within 1 kgs of <emission>
    Examples:
      | id  | cost   | date       | emission |
      | 1   | 100.00 | 2010-07-28 |  89.6    |
      | 2   | 100.00 | 2010-07-28 |  72.1    |
      | 3   | 100.00 | 2010-07-28 |  66.3    |
      | 4   | 100.00 | 2010-07-28 |  82.9    |
      | 5   | 100.00 | 2010-07-28 | 147.5    |
  
  Scenario Outline: Calculations starting from a merchant category
    Given a purchase has "merchant_category.mcc" of "<mcc>"
    And it has "cost" of "<cost>"
    And it has "date" of "<date>"
    When emissions are calculated
    Then the emission value should be within 1 kgs of <emission>
    Examples:
      | mcc  | cost   | date       | emission |
      | 5111 | 100.00 | 2010-07-28 |  89.6    |
      | 5732 | 100.00 | 2010-07-28 |  72.8    |
      | 5812 | 100.00 | 2010-07-28 |  66.3    |
      | 3504 | 100.00 | 2010-07-28 |  82.9    |
      | 5172 | 100.00 | 2010-07-28 | 147.5    |

  Scenario Outline: Calculations starting from industry NAICS codes
    Given pending - do we really need this?
    Given a purchase has "naics_codes" including "<naics>"
    And it has "cost" of "<cost>"
    And it has "date" of "<date>"
    When emissions are calculated
    Then the emission value should be within 1 kgs of <emission>
    Examples:
      | naics   | cost   | date       | emission |
      | 45321   | 100.00 | 2010-07-28 | 108.2    |
      | 443112  | 100.00 | 2010-07-28 |  87      |
      | 72211   | 100.00 | 2010-07-28 |  80      |
      | 7221111 | 100.00 | 2010-07-28 | 100      |
      | 32411   | 100.00 | 2010-07-28 | 160      |
      | 324121  | 100.00 | 2010-07-28 |   6.5    |
      | 324122  | 100.00 | 2010-07-28 |   4.5    |
      | 324191  | 100.00 | 2010-07-28 |   1      |
      | 324199  | 100.00 | 2010-07-28 |   6      |
<commit_msg>Adding new emissions tests<commit_after>Feature: Purchase Emissions Calculations
  The purchase model should generate correct emission calculations
  
  Scenario Outline: Calculations starting from a merchant
    Given a purchase has "merchant.id" of "<id>"
    And it has "cost" of "<cost>"
    And it has "date" of "<date>"
    When emissions are calculated
    Then the emission value should be within 1 kgs of <emission>
    Examples:
      | id  | cost   | date       | emission |
      | 1   | 100.00 | 2010-07-28 |  89.6    |
      | 2   | 100.00 | 2010-07-28 |  72.1    |
      | 3   | 100.00 | 2010-07-28 |  66.3    |
      | 4   | 100.00 | 2010-07-28 |  82.9    |
      | 5   | 100.00 | 2010-07-28 | 147.5    |
  
  Scenario Outline: Calculations starting from a merchant category
    Given a purchase has "merchant_category.mcc" of "<mcc>"
    And it has "cost" of "<cost>"
    And it has "date" of "<date>"
    When emissions are calculated
    Then the emission value should be within 1 kgs of <emission>
    Examples:
      | mcc  | cost   | date       | emission |
      | 5111 | 100.00 | 2010-07-28 |  89.6    |
      | 5732 | 100.00 | 2010-07-28 |  72.8    |
      | 5812 | 100.00 | 2010-07-28 |  66.3    |
      | 3504 | 100.00 | 2010-07-28 |  82.9    |
      | 5172 | 100.00 | 2010-07-28 | 147.5    |

  Scenario Outline: Calculations starting from industry NAICS codes
    Given a purchase has "naics_codes" including "<naics>"
    And it has "cost" of "<cost>"
    And it has "date" of "<date>"
    When emissions are calculated
    Then the emission value should be within 1 kgs of <emission>
    Examples:
      | naics        | cost   | date       | emission |
      | 45321        | 100.00 | 2010-07-28 |  89.6    |
      | 72211        | 100.00 | 2010-07-28 |  82.9    |
      | 32411,324121 | 100.00 | 2010-07-28 | 136.7    |
      

  Scenario Outline: Calculations starting from product line ps codes
    Given a purchase has "ps_codes" including "<ps_code>"
    And it has "cost" of "<cost>"
    And it has "date" of "<date>"
    When emissions are calculated
    Then the emission value should be within 1 kgs of <emission>
    Examples:
      | ps_code     | cost   | date       | emission |
      | 20370       | 100.00 | 2010-07-28 |  80.4    |
      | 20852       | 100.00 | 2010-07-28 | 116.0    |
      | 20375,20865 | 100.00 | 2010-07-28 |  87.0    |
      

  Scenario Outline: Calculations starting from sector io codes
    Given a purchase has "io_codes" including "<io_code>"
    And it has "cost" of "<cost>"
    And it has "date" of "<date>"
    When emissions are calculated
    Then the emission value should be within 1 kgs of <emission>
    Examples:
      | io_code       | cost   | date       | emission |
      | 334111        | 100.00 | 2010-07-28 | 107.7    |
      | 324191,324199 | 100.00 | 2010-07-28 | 58       |

{'fraction_non_alphanumeric': 0.11091269841269841, 'fraction_numerical': 0.15079365079365079, 'mean_word_length': 1.8756417569880206, 'pattern_counts': {'":': 0, '<': 35, '<?xml version=': 0, '>': 35, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3934266', 'n_tokens_mistral': 2248, 'n_tokens_neox': 1676, 'n_words': 557}