<commit_before>@vcr @timecop
Feature: Generate membership metrics

  In order to track the health of our membership model
  As a member of the commercial team
  I want to generate various important metrics for display on a dashboard
  
  Background:
    Given the following members exist in CapsuleCRM:
      | level     | 
      | sponsor   |
      | partner   |
      | partner   |
      | member    |
      | member    |
      | member    |
      | supporter |
      | supporter |
      | supporter |
      | supporter |
    And that time is frozen
  
  Scenario: Total number of members
    Then the following data should be stored in the "membership-count" metric
    """
    10
    """    
    When the membership count job runs
    
  Scenario: Precentage of members per level
    Then the following data should be stored in the "membership-breakdown" metric
      """
      {
        "sponsor": 0.1,
        "partner": 0.2,
        "member": 0.3,
        "supporter": 0.4,
      }
      """
    When the membership breakdown job runs  
  
  <commit_msg>Incomplete feature for revenue income ratio<commit_after>@vcr @timecop
Feature: Generate membership metrics

  In order to track the health of our membership model
  As a member of the commercial team
  I want to generate various important metrics for display on a dashboard
  
  Background:
    Given the following members exist in CapsuleCRM:
      | level     | 
      | sponsor   |
      | partner   |
      | partner   |
      | member    |
      | member    |
      | member    |
      | supporter |
      | supporter |
      | supporter |
      | supporter |
    And that time is frozen
  
  Scenario: Total number of members
    Then the following data should be stored in the "membership-count" metric
    """
    10
    """    
    When the membership count job runs
    
  Scenario: Precentage of members per level
    Then the following data should be stored in the "membership-breakdown" metric
      """
      {
        "sponsor": 0.1,
        "partner": 0.2,
        "member": 0.3,
        "supporter": 0.4,
      }
      """
    When the membership breakdown job runs
    
  Scenario: Member revenue income ratio
    Given we still need to work out what this is exactly
    Then the following data should be stored in the "membership-revenue-ratio" metric
      """
      {
        "sponsor": 0.1,
        "partner": 0.2,
        "member": 0.3,
        "supporter": 0.4,
      }
      """
    When the membership revenue ratio job runs
  
  
  
  
  
{'fraction_non_alphanumeric': 0.07004352987732489, 'fraction_numerical': 0.0110803324099723, 'mean_word_length': 1.9395348837209303, 'pattern_counts': {'":': 12, '<': 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': '1668937', 'n_tokens_mistral': 724, 'n_tokens_neox': 692, 'n_words': 273}