This gives a Validate object with the results of the run in the file: its steps, their results, and the metadata of the run. All of the reports work on it, as on the original validation: the validation report (with get_tabular_report() or by printing the object), get_json_report(), get_dataframe_report(), the verdict methods (all_passed(), assert_below_threshold(), …), the counts and fractions by step (n_passed(), …), and get_health_score(). It can also be one of the validations in a MultiValidate object.
A results file holds no table, no data extracts, and no validation plan that could be run, so the methods that need them (interrogate(), get_data_extracts(), get_sundered_data(), get_row_flags(), get_step_report(), to_code(), to_yaml(), and add_steps()) raise an error. The pre= functions, expressions, and other values that a results file keeps only as a description come back as objects that print as that description (e.g., the source code of a function), for the reports.
Reading a results file runs no code, so it’s safe to read one from any source.
Parameters
filepath:str | Path
The path of the results file. The .json extension is added if the path has no extension.
Returns
Validate
A validation with the results of the run in the file.
Examples
Let’s write the results of a validation to a file, and read them back:
The report is the same as the report of the original validation, except that there are no data extracts to download (the EXT column has a dash for every step). The verdict methods work as on the original, too: