Closed sthaha closed 1 month ago
🤖 SeineSailor
Here is a concise summary of the pull request changes:
Summary: The chore(validator): MAPE and json generation
pull request refactors the validator tool, focusing on MAPE calculation, JSON generation, and report creation.
Key Modifications:
mape
function now returns the MAPE value multiplied by 100, which may affect applications using this function.create_json
function and its helpers are removed, replaced by write_json_report
and asdict
for JSON generation.JsonTemplate
class is updated, removing file_path
, machine_spec
, and result
parameters, and adding machine_specs
and results
instead.CustomEncoder
class is improved to better handle custom objects and datetime
objects.Impact on Codebase:
mape
function may need to adjust for the changed return value.validate_arrays
function may be affected.Suggestions for Improvement:
mape
function's changed return value does not break existing functionality.JsonTemplate
class and CustomEncoder
to facilitate understanding and adoption.validate_arrays
function.
This commit fixes MAPE calculation and its tests. Additionally, the json generation is cleaned and added to
gen-report
as well.