Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate @percentage ranges #193

Open
samuele-mattiuzzo opened this issue Apr 26, 2019 · 2 comments
Open

Investigate @percentage ranges #193

samuele-mattiuzzo opened this issue Apr 26, 2019 · 2 comments
Labels
standard management An issue that involves changing a core part of the IATI Standard

Comments

@samuele-mattiuzzo
Copy link
Contributor

samuele-mattiuzzo commented Apr 26, 2019

"range": {
"cases": [
{
"paths": ["recipient-country/@percentage"],
"min": 0.0, "max": 100.0
},
{
"paths": ["recipient-region/@percentage"],
"min": 0.0, "max": 100.0
},
{
"paths": ["sector/@percentage"],
"min": 0.0, "max": 100.0
},
{
"paths": ["capital-spend/@percentage"],
"min": 0.0, "max": 100.0
},
{
"paths": ["country-budget-items/budget-item/@percentage"],
"min": 0.0, "max": 100.0
}
]
},

There's already a PR made by Vincent that addresses this at Schema level. Worth verifying the pull request, removing the rule/test and keep it at schema level.

To confirm with @IATI/bas that this is not a problem to enforce at schema level as well (adding a hard 0-100 schema check would not help values "close enough to be rounded" such as 99.8 so might put a lot of publishers off)

@samuele-mattiuzzo
Copy link
Contributor Author

samuele-mattiuzzo commented Apr 30, 2019

EDIT: this is labeled as 2.03 only because in 2.01 and 2.02 we only check the percentage value to be positive (>= 0.0). The assumptions below are for 2.03 only

This is currently undergoing internal discussion with @IATI/bas . Main takeaway points:

  • if we enforce this at Schema level (where, correctly assumed already, makes sense to live), it'll enforce a hard check on the ranges potentially risking data being excluded from the datastore; this is the option I'm more keen on, but I also understand this needs to go through a bug fix proposal

  • if we keep it at Ruleset level, then the rule is correct and won't prevent data from being imported; validation scores will be affected obviously but gives publishers space to fix it; my least preferred option, but time/effort wise would not require any further action from us

@samuele-mattiuzzo samuele-mattiuzzo added on hold question Rules where we have a question labels Apr 30, 2019
@akmiller01 akmiller01 added standard management An issue that involves changing a core part of the IATI Standard and removed on hold question Rules where we have a question labels Oct 26, 2022
@akmiller01
Copy link
Contributor

I guess this is a standard management question, whether percentage bounds should be schema-enforced. But doing so would probably require an integer upgrade as it's not been a part of the standard for so long.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
standard management An issue that involves changing a core part of the IATI Standard
Projects
None yet
Development

No branches or pull requests

2 participants