Skip to content

Commit

Permalink
Merge pull request #642 from IATI/networked_data_copy_and_check
Browse files Browse the repository at this point in the history
feat: finalised copy for activity id advisories
  • Loading branch information
simon-20 authored Jul 2, 2024
2 parents 1fadd37 + c76689d commit bcfcdaa
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 23 deletions.
24 changes: 16 additions & 8 deletions src/components/FileStatusInfo.vue
Original file line number Diff line number Diff line change
@@ -1,21 +1,29 @@
<template>
<p class="pb-3 text-base">
This file has been tested against the IATI Standard XML Schema, and the IATI Standard Rulesets. For more
information, see
<a href="https://docs.validator.iatistandard.org/" class="text-iati-green hover:underline">the documentation</a>.
</p>

<ul class="list-disc pl-10 pb-3">
<li><span class="font-bold text-success">Success</span> - No errors, warnings or advisories.</li>
<li>
<span class="font-bold text-success">Success</span> - file is valid with no errors of any type, congratulations!
<span class="font-bold text-advisory">Success (with Advisories)</span> - No errors or warnings, but there are
advisories relating to potential issues with the data.
</li>
<li><span class="font-bold text-advisory">Success (with Advisories)</span> - this data can be more valuable when added to the IATI corpus.</li>
<li>
<span class="font-bold text-warning">Warning</span> - data can be more valuable and warnings should be corrected
when possible.
<span class="font-bold text-warning">Warning</span> - XML Schema validation passes, but not all IATI ruleset rules
stating that a condition "should" be met.
</li>
<li><span class="font-bold text-error">Error</span> - data is hard or impossible to use.</li>
<li>
<span class="font-bold text-critical">Critical</span> - data contains significant errors, none or not all of the
data can be used by tools or accessed by the
<a href="https://iatidatastore.iatistandard.org" class="text-iati-green hover:underline">IATI Datastore</a>.
<span class="font-bold text-error">Error</span> - XML schema validation passes, but not all IATI ruleset rules
stating that a condition "must" be met.
</li>
<li>
<span class="font-bold text-critical">Critical</span> - XML schema validation fails. This means that data will not
update in the
<a href="https://iatidatastore.iatistandard.org" class="text-iati-green hover:underline">IATI Datastore</a>. Data
may be unusable and/or missing from other tools.
</li>
</ul>
</template>
9 changes: 0 additions & 9 deletions src/pages/HomePage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import CardiB from '../components/CardiB.vue';
import ContentContainer from '../components/layout/ContentContainer.vue';
import LinkButton from '../components/LinkButton.vue';
import StyledLink from '../components/StyledLink.vue';
</script>

<template>
Expand All @@ -12,14 +11,6 @@
allows users to check and improve the quality of IATI data to ensure it is accessible and useful to anyone working
with data on development and humanitarian resources and results.
</p>
<p class="pb-4 text-lg">
For more information, see
<StyledLink
to="https://cdn.iatistandard.org/prod-iati-website/documents/QA_IATI_Validator_Nov_2022.pdf"
:external="true"
>IATI Validator Q&A</StyledLink
>.
</p>

<div class="-m-2.5 flex flex-wrap pt-4">
<CardiB heading="Check Data" class="w-[300px]">
Expand Down
19 changes: 13 additions & 6 deletions src/utils/document.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,14 @@ export const getDocumentValidationStatus = (document) => {
if (document.report === null) {
return { value: 'normal', caption: 'N/A' };
}
if (valid === true && error === 0 && warning === 0 && advisory === 0) {
if (
valid === true &&
error === 0 &&
warning === 0 &&
(advisory === 0 || (report && !Object.prototype.hasOwnProperty.call(report.summary, 'advisory')))
) {
return { value: 'success', caption: 'Success' };
}
}
if (valid === true && error === 0 && warning === 0) {
return { value: 'advisory', caption: 'Success (with Advisories)' };
}
Expand Down Expand Up @@ -214,7 +219,7 @@ export const getSeverities = () => {
id: 'critical',
slug: 'critical',
name: 'Critical',
description: 'Files with critical errors will not be processed by the datastore',
description: 'XML schema validation fails. This means that data will not update in the IATI Datastore',
count: null,
order: 1,
show: true,
Expand All @@ -224,7 +229,8 @@ export const getSeverities = () => {
id: 'error',
slug: 'error',
name: 'Errors',
description: 'Errors make it hard or impossible to use the data.',
description:
'XML schema validation passes, but not all IATI ruleset rules stating that a condition "must" be met.',
count: null,
order: 2,
show: true,
Expand All @@ -234,7 +240,8 @@ export const getSeverities = () => {
id: 'warning',
slug: 'warning',
name: 'Warnings',
description: 'Warnings indicate where the data can be more valuable.',
description:
'XML Schema validation passes, but not all IATI ruleset rules stating that a condition "should" be met.',
count: null,
order: 3,
show: true,
Expand All @@ -254,7 +261,7 @@ export const getSeverities = () => {
id: 'advisory',
slug: 'advisory',
name: 'Advisories',
description: 'Advisories show ways that the data can be improved beyond the requirements of the IATI Standards.',
description: 'No errors or warnings, but there are advisories relating to potential issues with the data.',
count: null,
order: 5,
show: true,
Expand Down

0 comments on commit bcfcdaa

Please sign in to comment.