Skip to content
This repository has been archived by the owner on Nov 17, 2022. It is now read-only.

Test remainder of Standard Ruleset Rules #204

Open
21 tasks
hayfield opened this issue Nov 2, 2017 · 0 comments
Open
21 tasks

Test remainder of Standard Ruleset Rules #204

hayfield opened this issue Nov 2, 2017 · 0 comments
Labels
missing-feature A major feature that should exist, but does not. rulesets Relating to IATI Rulesets. standard-support Relating to how pyIATI supports a major component within the IATI Standard. tests Relating to tests and testing. validation Changes to validation functionality.

Comments

@hayfield
Copy link
Contributor

hayfield commented Nov 2, 2017

The following Rules in the Standard Ruleset are tested (see test_default.py).

{ "less": "activity-date[@type='1']/@iso-date", "more": "activity-date[@type='3']/@iso-date" }
{ "regex": "[^\\/\\&\\|\\?]+", "paths": [ "iati-identifier" ] }
{ "paths": [ "recipient-country/@percentage",  ], "sum": 100 }
[at_least_one] { "paths": [ "sector", "transaction/sector" ] }
[at_least_one] { "paths": [ "@ref", "narrative" ] }

The other Rules are not tested, though should be.

at_least_one:

  • { "paths": [ "activity-date[@type='1' or @type='2']" ] }

date_order:

  • activity
  • transaction
    • { "less": "transaction-date/@iso-date", "more": "NOW" }
    • { "less": "value/@value-date", "more": "NOW" }
  • { "less": "period-start/@iso-date", "more": "period-end/@iso-date" }
    • planned-disbursement
    • budget
    • total-budget
    • recipient-country-budget
    • recipient-org-budget
    • recipient-region-budget
    • result/indicator/period
    • total-expenditure

regex_matches:

  • "regex": "[^\\/\\&\\|\\?]+"
    • "reporting-org/@ref" - activity
    • "reporting-org/@ref" - org
    • "organisation-identifier"
    • "participating-org/@ref"
    • "transaction/provider-org/@ref"
    • "transaction/receiver-org/@ref"

sum:

@hayfield hayfield added missing-feature A major feature that should exist, but does not. rulesets Relating to IATI Rulesets. tests Relating to tests and testing. validation Changes to validation functionality. labels Nov 2, 2017
@hayfield hayfield added this to the Validation - content checking milestone Nov 2, 2017
@hayfield hayfield added the standard-support Relating to how pyIATI supports a major component within the IATI Standard. label Nov 8, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
missing-feature A major feature that should exist, but does not. rulesets Relating to IATI Rulesets. standard-support Relating to how pyIATI supports a major component within the IATI Standard. tests Relating to tests and testing. validation Changes to validation functionality.
Projects
None yet
Development

No branches or pull requests

1 participant