You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The standard Makefile includes a sparql_test target (executed as part of the test target) which runs a bunch of SPARQL-based checks using robot verify:
Those checks only operate on the contents of the (preprocessed) -edit file; they do not cover any imported ontology (actual ODK imports and components). This may not be explicitly documented in ROBOT’s manual, but a brief look at the code shows this is the normal behaviour of the verify command, and that this behaviour is not configurable:
// Load into dataset without importsDatasetdataset = QueryOperation.loadOntologyAsDataset(state.getOntology(), false);
I don’t think it is correct for the sparql_test to cover only the contents of the -edit file. Of course it is fine to exclude imports (in the ODK sense) from the SPARQL tests (we may not want those tests to fail because of something coming from an external ontology), but components (and I include under that umbrella the pattern-derived definitions.owl file) are merely parts of the “local” ontology that just happen to be in different files -- I see no reason for excluding them from the SPARQL tests.
Therefore, and since verify will not follow OWL imports declarations, I believe the sparql_test should be executed over the $(SRCMERGED) file (in which components, that is, all files listed as $(OTHER_SRC), have been explicitly merged in) rather than $(EDIT_PREPROCESSED).
The text was updated successfully, but these errors were encountered:
Note that this may wreak havoc in existing repos when such a change lands in a released version…
Currently, in all existing ODK setups, the contents of components is not checked, so any kind of violations may have crept up in components without ever being caught. All of a sudden, components will be checked, and ontologies that previously passed the sparql_test check may now very well fail it.
I thought of that as well, but there is no great way around it.
Agree. If any pipeline fails because of that change, it will ultimately be because the components contain (possibly have always contained) errors. The new ODK will merely reveal those problems, not cause them.
The standard Makefile includes a
sparql_test
target (executed as part of thetest
target) which runs a bunch of SPARQL-based checks usingrobot verify
:Those checks only operate on the contents of the (preprocessed)
-edit
file; they do not cover any imported ontology (actual ODK imports and components). This may not be explicitly documented in ROBOT’s manual, but a brief look at the code shows this is the normal behaviour of theverify
command, and that this behaviour is not configurable:I don’t think it is correct for the
sparql_test
to cover only the contents of the-edit
file. Of course it is fine to exclude imports (in the ODK sense) from the SPARQL tests (we may not want those tests to fail because of something coming from an external ontology), but components (and I include under that umbrella the pattern-deriveddefinitions.owl
file) are merely parts of the “local” ontology that just happen to be in different files -- I see no reason for excluding them from the SPARQL tests.Therefore, and since
verify
will not follow OWL imports declarations, I believe thesparql_test
should be executed over the$(SRCMERGED)
file (in which components, that is, all files listed as$(OTHER_SRC)
, have been explicitly merged in) rather than$(EDIT_PREPROCESSED)
.The text was updated successfully, but these errors were encountered: