Swirrl / rdf-validator

RDF Validator for running suites of SPARQL validations
Eclipse Public License 1.0
3 stars 1 forks source link

Allow configuration of a set of validation tests to be defined in a config file #10

Open jennet opened 6 years ago

jennet commented 6 years ago

Handle a config file that can specify a subset of query files

jennet commented 6 years ago

Here's how I envision it looking... I'd write a config file a bit like this:

{ 
    "validations" : [
      {
          "name" : "rdf-cube",
          "description" : "A set of validations that check the integrity of the data against the RDF Cube specifications",
          "queries" : "queries/rdf-cube/",
          "dependencies" : "cube-exists"
      },
      {
        "name" : "cube-exists",
        "description" : "Checks the data contains at least one entity that describes itself as a RDF cube",
        "queries" : "queries/at_least_one_rdf_cube.sparql"
        },
      {
        "name" : "atlas-hierarchy",
        "description" : "Checks the data contains at least one POI and that all POIs contained in the file are connected to the root atlas node (parameterised query)",
        "queries" : "queries/atlas/hierarchy/",
        "variables" : "queries/atlas/hierarchy/vars.edn",
        "dependencies" : "pmd-vocab-exists"
        },
    {
        "name" : "pmd-vocab-exists",
        "description" : "Check the vocabs necessary for running PMD atlas are available at the supplied data source",
        "queries" : "/queries/atlas/vocabs/",
        "dependencies" : ""
        }
    ]
  }

and I'd want to run this pre-written config against a data source instead of writing out multiple calls to rdf-validator.

Initially, the whole "dependency" part of this is a nice idea but might over complicate the process at this stage. Instead perhaps each object can have a "run" : true/false added so that that validator can skip that step rather than a user having to delete / add chunks of the file content.

The idea is that depending on the use case, a pre-written config file ("validation suite"?) can be used and called by name.

A validation suite could be easily added to address the "vertical" validations for UI building, which can be expanded on in the future to handle SHACL definitions rather than SPARQL queries.

Does this make sense @lkitching ?