Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelwood committed Dec 18, 2024
1 parent da61ffe commit b7675b3
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<h2>Data Accuracy</h2>

{% if validation_errors or additional_closed_codelist_values %}
<p>The data provided did not pass <a href="#validity">validation</a> therefore the accuracy of the data could not be determined.</a>
{% else %}
<p>Caution: The data provided did not pass <a href="#validity">validation</a> therefore the accuracy of the data could not be fully determined.</a>
{% endif %}

{% if quality_accuracy_checks_passed %}
<h3>What is working well</h3>
Expand Down Expand Up @@ -88,5 +88,4 @@ <h4>{{category}}</h4>
{% endwith %}
{% endfor %}

{% endif %} {# Quality accuracy errored #}
{% endif %} {# validation failed #}
{% endif %} {# Quality accuracy errored #}
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<h2>Usefulness Opportunities</h2>

{% if validation_errors or additional_closed_codelist_values %}
<p>The data provided did not pass <a href="#validity">validation</a> therefore the usefulness of the data could not be determined.</a>
{% else %}
<p>Caution: The data provided did not pass <a href="#validity">validation</a> therefore the usefulness of the data could not be fully determined.</a>
{% endif %}

{% if usefulness_checks_passed %}
<h3>What is working well</h3>
Expand Down Expand Up @@ -102,5 +102,4 @@ <h4>{{category}}</h4>

{% else %}
<p>No usefulness opportunities detected.</p>
{% endif %}
{% endif %} {# validation failed #}
{% endif %}
15 changes: 7 additions & 8 deletions cove/cove_360/tests/test_browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,25 +73,24 @@ def server_url(request, live_server):
'Incorrect Formats',
'Non-unique id values',
'4 grants do not contain any beneficiary location fields',
'Unique grant identifiers: 2',
'Unique funder organisation identifiers: 1',
'Unique grant identifiers 2',
'Unique funder organisation identifiers 1',
'360G-fundingproviders-000002/X/00/X'], True),
('fundingproviders-grants_broken_grants.json', ['data does not use the 360Giving Data Standard correctly',
'15 Errors',
'Unique funder organisation identifiers: 2',
'Unique recipient organisation identifiers: 2',
'Unique funder organisation identifiers 2',
'Unique recipient organisation identifiers 2',
'360G-fundingproviders-000002/X/00/X'], True),
('fundingproviders-grants_2_grants.xlsx', ['1 funding organisation',
'There are 2 grants to 1 recipient organisation and 0 to recipient individuals',
'The grants were awarded in GBP with a total value of £331,495',
# check that there's no errors after the heading
'Data conversion successful\nBefore checking',
'data does not use the 360Giving Data Standard correctly',
'7 Errors',
'description is missing but required',
'Sheet: grants Row: 2',
'Unique funder organisation identifiers: 1',
'Unique recipient organisation identifiers: 1',
'Unique funder organisation identifiers 1',
'Unique recipient organisation identifiers 1',
'360G-fundingproviders-000002/X/00/X'], True),
# Test conversion warnings are shown
('tenders_releases_2_releases.xlsx', ['Data conversion unsuccessful - 5 Errors have been found',
Expand All @@ -112,7 +111,7 @@ def server_url(request, live_server):
# Test a unconvertable spreadsheet (blank file)
('bad.xlsx', 'We think you tried to supply a spreadsheet, but we failed to convert it.', False),
# Check that a file with a UTF-8 BOM converts correctly
('bom.csv', 'Unique grant identifiers: 1', True),
('bom.csv', 'Unique grant identifiers 1', True),
('nulls.json', [
'is not a JSON array',
'Date is not in the correct format',
Expand Down
2 changes: 1 addition & 1 deletion lib360dataquality/cove/threesixtygiving.py
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ def common_checks_360(
cell_source_map,
TEST_CLASSES[test_class_type],
# Set ignore_errors to False for debugging checks otherwise all exceptions will pass
ignore_errors=False,
ignore_errors=True,
return_on_error=None,
aggregates=context["grants_aggregates"],
)
Expand Down

0 comments on commit b7675b3

Please sign in to comment.