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

OCDS - Group validation errors by type #1168

Merged
merged 2 commits into from
Apr 25, 2019
Merged

Conversation

odscjames
Copy link
Contributor

@odscjames
Copy link
Contributor Author

Here's a test file:

ocds-data-not-grouped.json.zip

Which produces:

cove-grouped

@odscjames odscjames closed this Apr 23, 2019
@odscjames odscjames reopened this Apr 23, 2019
@odscjames
Copy link
Contributor Author

(Closed by accident!)

Haven't run I18N process yet, want to get feedback from OCDS people first.

@odscjames
Copy link
Contributor Author

(pr build fails, push build passes. This is due to having not done I18N strings yet - fine for now)

@odscjames
Copy link
Contributor Author

@odscjames
Copy link
Contributor Author

Changes made @duncandewhurst

Copy link
Contributor

@duncandewhurst duncandewhurst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested with this file and some of the grouping is wrong, examples:

  1. some format errors are reported in the required fields group:

image

  1. Some codelist errors are reported in the format group:

image

  1. The errors reported in the 'Other' group are actually required fields errors:

image

cove_ocds/templates/cove_ocds/explore_base.html Outdated Show resolved Hide resolved
@odscjames
Copy link
Contributor Author

Just to be totally clear @duncandewhurst where would you expect codelist errors to be?

@duncandewhurst
Copy link
Contributor

@odscjames I think they should just appear in the codelist validation errors section but with the error count and location of first 3 errors which are currently missing from that section (see https://github.com/OpenDataServices/cove/issues/1044)

@odscjames odscjames force-pushed the 1159-ocds-group-validation branch 2 times, most recently from 7f27166 to a63ae8f Compare April 23, 2019 15:23
@odscjames
Copy link
Contributor Author

I have updated http://1159-ocds-group-validation.dev.cove.opendataservices.coop/review/ - @duncandewhurst can you have a look and for the test file you used before, let me know which ones are still out of place? (I'm sure there will be some - sorry)

Meanwhile I'm working on how to build a proper list of every possible type, which is also good for me to look through the library we use and learn more about it.

@odscjames
Copy link
Contributor Author

(Notes for me: https://github.com/Julian/jsonschema/blob/master/jsonschema/validators.py#L473 here is a list of types, but we also have to include whatever we extend it with in .ve/src/libcove/libcove/lib/common.py and also note validator_type = e.validator_value[0] so we need to look up the range of values there! )

@duncandewhurst
Copy link
Contributor

thanks @odscjames I checked and the errors in the 'required fields' and 'format' sections are correct, but there are still some errors under the 'other' heading which seem like they should be under 'format'

image

@duncandewhurst
Copy link
Contributor

Also the currency codelist error is still duplicated under both 'structural errors - other' and 'codelist errors'

@odscjames
Copy link
Contributor Author

@duncandewhurst Is it ok if we deal with the codelist issue in #1044 ? It will involve looking at different areas of code, was already a problem, and in the interests of keeping pull requests short and thus easier and thus more likely to actually be merged to master, that should probably be a separate pull request.

@duncandewhurst
Copy link
Contributor

duncandewhurst commented Apr 24, 2019 via email

@odscjames
Copy link
Contributor Author

Thanks.

I have updated http://1159-ocds-group-validation.dev.cove.opendataservices.coop/review - do you want to have a look?

@duncandewhurst
Copy link
Contributor

thanks @odscjames I think the only remaining inconsistency is that one "X is too short" error appears in under the "format" group whilst another "X is too short" error appears under the "other" group.

I think they should both appear under the "other" group:

image

image

@odscjames
Copy link
Contributor Author

Ready for review

@odscjames odscjames merged commit c72cafc into master Apr 25, 2019
@odscjames odscjames deleted the 1159-ocds-group-validation branch April 25, 2019 12:37
@odscjames odscjames restored the 1159-ocds-group-validation branch April 25, 2019 12:37
@odscjames odscjames deleted the 1159-ocds-group-validation branch April 25, 2019 14:00
@odscjames odscjames restored the 1159-ocds-group-validation branch June 26, 2019 13:05
@odscjames odscjames deleted the 1159-ocds-group-validation branch June 26, 2019 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants