fix: process validation report fails when service date fields are empty#978
Merged
davidgamez merged 3 commits intomainfrom Mar 11, 2025
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
The process validation report fails when an empty string(
"") is found on the JSON value. This PR ignores the empty string values from the fields; it also adds a helper method to be used in similar situations.Expected behavior:
The process validation report function should account for missing or empty service date fields
From our AI friend
This pull request includes several changes to add new functionality and improve the codebase for the
functions-pythonproject. The most important changes include adding a new helper functionget_nested_value, updating theREADME.mdfile with instructions for generating HTML coverage reports, and refactoring thegenerate_report_entitiesfunction to use the new helper function.New functionality:
functions-python/helpers/transform.py: Added a new helper functionget_nested_valueto retrieve values from nested dictionaries.functions-python/helpers/tests/test_transform.py: Added tests for the newget_nested_valuefunction.Documentation updates:
functions-python/README.md: Updated the README file to include instructions for running tests and generating HTML coverage reports.Code refactoring:
functions-python/process_validation_report/src/main.py: Refactored thegenerate_report_entitiesfunction to use the newget_nested_valuefunction and moved the service date population logic to a newpopulate_service_datefunction. [1] [2]functions-python/process_validation_report/tests/test_validation_report.py: Added tests for the newpopulate_service_datefunction.Testing tips:
Teste in DEV, link
Please make sure these boxes are checked before submitting your pull request - thanks!
./scripts/api-tests.shto make sure you didn't break anything