<commit_before>components:
  - name: Start dates chronologically before end dates
    indicators:
      - Start dates chronologically before end dates

  - name: Actual dates should be in the past
    indicators:
      - Actual dates should be in the past

  - name: Mandatory elements
    indicators:
      - Mandatory elements

  - name: Elements use a valid format
    indicators:
      - Elements use a valid format

indicators:
 - name: Start dates chronologically before end dates
   tests:
    - name: Result indicator period
      expression: |
       `result/indicator/period/period-start/@iso-date`
       should be chronologically before
       `result/indicator/period/period-end/@iso-date`

    - name: Recipient organisation budget period
      expression: |
       `recipient-org-budget/period-start/@iso-date`
       should be chronologically before
       `recipient-org-budget/period-end/@iso-date`

    - name: Recipient region budget period
      expression: |
       `recipient-region-budget/period-start/@iso-date`
       should be chronologically before
       `recipient-region-budget/period-end/@iso-date`

    - name: Planned disbursement period
      expression: |
       `planned-disbursement/period-start/@iso-date`
       should be chronologically before
       `planned-disbursement/period-end/@iso-date`

    - name: Recipient country budget period
      expression: |
       `recipient-country-budget/period-start/@iso-date`
       should be chronologically before
       `recipient-country-budget/period-end/@iso-date`

    - name: Total expenditure period
      expression: |
       `total-expenditure/period-start/@iso-date`
       should be chronologically before
       `total-expenditure/period-end/@iso-date`

    - name: Planned activity dates
      expression: |
       `activity-date[@type='1']/@iso-date`
       should be chronologically before
       `activity-date[@type='3']/@iso-date`

    - name: Actual activity dates
      expression: |
       `activity-date[@type='2']/@iso-date`
       should be chronologically before
       `activity-date[@type='4']/@iso-date`

    - name: Budget period
      expression: |
       `budget/period-start/@iso-date`
       should be chronologically before
       `budget/period-end/@iso-date`

 - name: Actual dates should be in the past
   tests:
    - name: Actual start dates past
      expression: |
       `activity-date[@type='2']/@iso-date`
       should be today, or in the past

    - name: Actual end dates past
      expression: |
       `activity-date[@type='4']/@iso-date`
       should be today, or in the past

    - name: Transaction dates past
      expression: |
       `transaction/transaction-date/@iso-date`
       should be today, or in the past

    - name: Value dates past
      expression: |
       `transaction/value-date/@iso-date`
       should be today, or in the past

 - name: Mandatory elements
   tests:
    - name: Activity start date (planned or actual)
      expression: |
       `activity-date[@type="1"]` should be present
       or `activity-date[@type="2"]` should be present

    - name: Sector (activity or transaction)
      expression: |
       `sector` should be present
       but for every `transaction`, `sector` should not be present.
       Alternatively,
       `sector` should not be present
       but for every `transaction`, `sector` should be present

    - name: Participating organisation reference (text or ref)
      expression: |
       `participating-org/@ref` should be present
       or `participating-org/narrative` should be present

 - name: Elements use a valid format
   tests:
    - name: IATI identifier (regex)
      expression: |
       `iati-identifier/text()` should match the regex `^[^\/\&\|\?]+$`

    - name: Reporting organisation reference (regex)
      expression: |
       `reporting-org/@ref` should match the regex `^[^\/\&\|\?]+$`

    - name: Participating organisation reference (regex)<commit_msg>Try adding emphasis to test<commit_after>components:
  - name: Start dates chronologically before end dates
    indicators:
      - Start dates chronologically before end dates

  - name: Actual dates should be in the past
    indicators:
      - Actual dates should be in the past

  - name: Mandatory elements
    indicators:
      - Mandatory elements

  - name: Elements use a valid format
    indicators:
      - Elements use a valid format

indicators:
 - name: Start dates chronologically before end dates
   tests:
    - name: Result indicator period
      expression: |
       `result/indicator/period/period-start/@iso-date`
       should be chronologically before
       `result/indicator/period/period-end/@iso-date`

    - name: Recipient organisation budget period
      expression: |
       `recipient-org-budget/period-start/@iso-date`
       should be chronologically before
       `recipient-org-budget/period-end/@iso-date`

    - name: Recipient region budget period
      expression: |
       `recipient-region-budget/period-start/@iso-date`
       should be chronologically before
       `recipient-region-budget/period-end/@iso-date`

    - name: Planned disbursement period
      expression: |
       `planned-disbursement/period-start/@iso-date`
       should be chronologically before
       `planned-disbursement/period-end/@iso-date`

    - name: Recipient country budget period
      expression: |
       `recipient-country-budget/period-start/@iso-date`
       should be chronologically before
       `recipient-country-budget/period-end/@iso-date`

    - name: Total expenditure period
      expression: |
       `total-expenditure/period-start/@iso-date`
       should be chronologically before
       `total-expenditure/period-end/@iso-date`

    - name: Planned activity dates
      expression: |
       `activity-date[@type='1']/@iso-date`
       should be chronologically before
       `activity-date[@type='3']/@iso-date`

    - name: Actual activity dates
      expression: |
       `activity-date[@type='2']/@iso-date`
       should be chronologically before
       `activity-date[@type='4']/@iso-date`

    - name: Budget period
      expression: |
       `budget/period-start/@iso-date`
       should be chronologically before
       `budget/period-end/@iso-date`

 - name: Actual dates should be in the past
   tests:
    - name: Actual start dates past
      expression: |
       `activity-date[@type='2']/@iso-date`
       should be today, or in the past

    - name: Actual end dates past
      expression: |
       `activity-date[@type='4']/@iso-date`
       should be today, or in the past

    - name: Transaction dates past
      expression: |
       `transaction/transaction-date/@iso-date`
       should be today, or in the past

    - name: Value dates past
      expression: |
       `transaction/value-date/@iso-date`
       should be today, or in the past

 - name: Mandatory elements
   tests:
    - name: Activity start date (planned or actual)
      expression: |
       `activity-date[@type="1"]` should be present
       or `activity-date[@type="2"]` should be present

    - name: Sector (activity or transaction)
      expression: |
       `sector` should be present
       but for every `transaction`, `sector` *should not* be present.

       Alternatively,
       for every `transaction`, `sector` should be present
       but `sector` *should not* be present

    - name: Participating organisation reference (text or ref)
      expression: |
       `participating-org/@ref` should be present
       or `participating-org/narrative` should be present

 - name: Elements use a valid format
   tests:
    - name: IATI identifier (regex)
      expression: |
       `iati-identifier/text()` should match the regex `^[^\/\&\|\?]+$`

    - name: Reporting organisation reference (regex)
      expression: |
       `reporting-org/@ref` should match the regex `^[^\/\&\|\?]+$`

    - name: Participating organisation reference (regex)
{'fraction_non_alphanumeric': 0.10420590081607031, 'fraction_numerical': 0.0020087884494664155, 'mean_word_length': 2.5404444444444443, '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': '4020578', 'n_tokens_mistral': 2324, 'n_tokens_neox': 2181, 'n_words': 655}