Closed niconoe closed 3 years ago
Hi @niconoe,
The Report object has the following structure:
valid: # global valid
errors: [] # global errors
tasks:
- valid: # task valid
errors: [] # task errors
So in your case there are not global errors like "Invalid Data Package's Metadata" but there are errors in data package's resources (metadata or data).
https://framework.frictionlessdata.io/docs/guides/validation-guide#validation-report
Please let me know if it didn't help you
Okay thanks, two subsequent questions:
valid
flag set to False?@niconoe
Sure if there are any resource's errors the top-level valid
will be False
I think we need to polish the terminology as the word "global" might be confusing in this context. Here is a better explanation:
report.valid
: an indicator of whether the whole validation is a success (all the errors
lists will be empy if it's True
)report.errors
: a list of errors that is not related to any task/resourcereport.tasks[].valid
: whether the task/resource is validreport.tasks[].errors
: errors associated with the task/resourceThanks @roll, that's much more clear for me now!
If I may add a suggestion: I think it would be great if:
1) all that information appeared in the Report
API documentation (so future users won't bother you here like I'm doing right now)
2) as you said, the terminology could also be a bit more polished, that could make things a bit more intuitive for newcomers. For example, I guess things might a bit more clear if report.errors
was renamed to something a bit more explicit such as report.metadata_errors
or report.global_errors
for example.
Thanks again for the help and clarifications!
Overview
Hello, I am trying to validate a package in Python (using
report = validate_package(descriptor_data_dict)
), but gets weird behaviour:report.valid
is Falsereport.errors
is an empty list ([]
)It's unclear to me if I this is a bug in
validate_package
or if I'm misusing/misunderstanding the content of theReport
object (its reference documentation at https://framework.frictionlessdata.io/docs/references/api-reference#report seems incomplete and not very detailed, compared to what I see in my Python debugger.Maybe it's better to completely ignore
report.valid
and assume the report is valid if it has no errors?For debugging purposes, here is the descriptor that triggers this behaviour:
Please preserve this line to notify @roll (lead of this repository)