open-contracting / ocdskit

A suite of command-line tools for working with OCDS data
https://ocdskit.readthedocs.io
BSD 3-Clause "New" or "Revised" License
17 stars 7 forks source link

Add test documents urls script #34

Closed yolile closed 6 years ago

yolile commented 6 years ago

Add the check_documents_urls script for check each document url in a given release-package prints the url + status according to the url.get response status.

coveralls commented 6 years ago

Coverage Status

Coverage increased (+0.5%) to 77.578% when pulling 100d09b3d949cd2638d864ba3ffa2c528e1f2a0e on check_documents_urls into b4e0ae6bd6d8e1ff6a11fa6d9abc66c1006741c2 on master.

jpmckinney commented 6 years ago

I think in a real file the acceptable status codes (200, maybe others?) will crowd out the problematic responses (500, timeout, etc.), so we shouldn't report the acceptable codes.

Also, instead of hard-coding the position of the fields with "format": "uri", we should extend the JSON Schema FormatChecker to check anything with that format.

I've made commits to do that, adding options to the validate command.