Skip to content

Instantly share code, notes, and snippets.

@andylolz
Last active November 4, 2019 15:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andylolz/86630944e40d629e2098a49c0c501145 to your computer and use it in GitHub Desktop.
Save andylolz/86630944e40d629e2098a49c0c501145 to your computer and use it in GitHub Desktop.
Updates to v2.03 standard ruleset since Jan 2019

v2.03 standard ruleset updates

The following is a summary of the updates made to the v2.03 standard ruleset since January 2019. I’ve done my best to group them.

Budget length

The following budgets should be no more than a year in length:

  • iati-organisation/recipient-country-budget ref
  • iati-organisation/recipient-region-budget ref
  • iati-organisation/recipient-org-budget ref
  • iati-organisation/total-budget ref
  • iati-activity/budget ref

Total expenditure length

  • iati-organisation/total-expenditure should be no more than a year in length. ref

Budget-line value-date

  • The budget-line value-date for iati-organisation/recipient-country-budget should be between the period start and end dates. This is a bit weird, particularly given it only applies to recipient-country-budget. Seems like there might be an issue here. ref

Defaults

  • If a @default-currency is not specified, then every element that has a @currency attribute (value, forecast, loan-status) should specify a @currency. ref
  • If a default language is not specified, then every narrative element should specify a language. There’s a bug in this rule – I’ve sent a fix. ref
  • If a sector is not specified at activity level, then every transaction should specify a sector. I think this is incomplete – I think it should actually be an exclusive-or. ref

Last updated

  • iati-activity/@last-updated-datetime must be in the past. NB there is no equivalent rule for iati-organisation/@last-updated-datetime ref

Either org ID, or org name

  • Either other-identifier/owner-org/@ref or other-identifier/owner-org/narrative must be present. The implementation of this is incorrect. ref
  • Either transaction/provider-org/@ref or transaction/provider-org/narrative must be present. The implementation of this is incorrect. ref
  • Either transaction/receiver-org/@ref or transaction/receiver-org/narrative must be present. The implementation of this is incorrect. ref

Percentage signs

  • Percentages shouldn’t include a % sign. This is already enforced at schema level, so I don’t know why a ruleset rule would be needed for this. ref

Percentage range

  • Percentages should be in the range 0-100. This can be enforced at schema level, and Vincent even sent a pull request for this ages ago. I flagged Vincent’s PR when this rule was added. ref

Activity status logic

  • An activity with status "Pipeline/identification" should not have an actual start date. ref
  • An activity with status "Pipeline/identification" should not have an actual end date. ref
  • An activity with status "Implementation" should not have an actual end date. ref

Policy marker stuff

  • If a policy-marker uses the DAC vocabulary, then the @significance attribute must be present ref

Numeric result values

  • If a result baseline value is present, then it must be a number. This is incorrectly implemented. Also, it should arguably be enforced at schema level. ref
  • If a result target value is present, then it must be a number. This is incorrectly implemented. Also, it should arguably be enforced at schema level. ref
  • If a result actual value is present, then it must be a number. This is incorrectly implemented. Also, it should arguably be enforced at schema level. ref

Reporting org vocab stuff

  • If a policy-marker uses @vocabulary 99, then a narrative must be present ref
  • If a sector using vocabulary 98 or 99 is present, then at least one sector narrative should be present. This is incorrectly implemented. ref

Other stuff

  • If a default currency is not specified, then there must be at least one fss/forecast currency. This is wrong, and conceptually flawed. ref
  • If a default currency is not specified, then there must be at least one crs-add/loan-status currency. This is wrong, and conceptually flawed. ref
  • If @lang is not specified, then every narrative must include a @lang. This is superfluous as it’s attempting to do the same thing as a different rule. It’s also wrong because @lang should be @xml:lang. ref

There’s one more rule related to recipient-country and recipient-region, but I’m not sure I understand what it does / what it is trying to do. ref

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment