From 1ee3456663c78ebd9fd0867aa71d80b573a9e361 Mon Sep 17 00:00:00 2001 From: Steve Robinson Date: Wed, 6 Dec 2023 13:06:03 +0000 Subject: [PATCH] Errors are present if the rows are *NOT* valid --- src/csv2rdf/csvw.clj | 2 +- test/csv2rdf/main_test.clj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/csv2rdf/csvw.clj b/src/csv2rdf/csvw.clj index 11b931e..37e0a04 100644 --- a/src/csv2rdf/csvw.clj +++ b/src/csv2rdf/csvw.clj @@ -56,7 +56,7 @@ Returns a map with the key `:data-validation-errors?` set to a boolean indicating whether any schema errors occurred." [{:keys [tabular-source metadata-source]}] - {:data-validation-errors? (rows-are-valid? tabular-source metadata-source)}) + {:data-validation-errors? (not (rows-are-valid? tabular-source metadata-source))}) (defn csv->rdf "Runs the CSVW process for the given tabular or metadata data sources diff --git a/test/csv2rdf/main_test.clj b/test/csv2rdf/main_test.clj index 2cc26dc..4bb562d 100644 --- a/test/csv2rdf/main_test.clj +++ b/test/csv2rdf/main_test.clj @@ -16,7 +16,7 @@ (t/is (= (sut/inner-main ["-t" tabular-file "-u" metadata-file "--validate-data"]) - {:data-validation-errors? is-valid?})) + {:data-validation-errors? (not is-valid?)})) (t/is (= @warnings failures)) (t/is (= @errors [])))))