Ensures missing fields validation shows row ref - #178
Conversation
Coverage Report for CI Build 32263658452Coverage remained the same at 81.013%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
|
resolves #79 |
| values, openpyxl_workbook | ||
| ) | ||
| if (file_type in ["xlsx", "csv"] and "grants/" in error["path_no_number"]) | ||
| if (file_type in ["xlsx", "csv"] and error["path_no_number"].split("/")[0] == "grants") |
There was a problem hiding this comment.
Are we sure that all instances of error["path_no_number"] start with grants/? This change will mean that anything with, for example, hello/grants will not satisfy this change.
There was a problem hiding this comment.
@chrisarridge Will the error["path_no_number"] not always be something like grants/fundingOrganization or grants as per https://github.com/ThreeSixtyGiving/standard/blob/main/schema/360-giving-package-schema.json? I think the logic was failing previously as "grants/" in error["path_no_number"]) was failing to match against just grants.
There was a problem hiding this comment.
I could switch the logic to .contains("grants") or .startswith("grants) but not sure if that is correct?
chrisarridge
left a comment
There was a problem hiding this comment.
One comment to check a change in logic, and two additional quick things:
- Please could you add a before/after screenshot to the PR description so we can see the visual change.
- Could you add a prefix to the commit message, e.g., "cove: ensure missing fields validation shows row ref" (or similar)
A bug in the way that validation errors where being grouped meant that the 'First 3 examples' did not render properly. The logic to render the row ref has been updated to show for error counts greater than or equal to one.
e279180 to
9a6f8c0
Compare




A bug in the way that validation errors where
being grouped meant that the 'First 3 examples'
did not render properly. The logic to render the
row ref has been updated to show for error counts
greater than or equal to one.