From f6019ba94443e6ca71ce4cf898bff267abb813d1 Mon Sep 17 00:00:00 2001 From: Mihai Pomarlan Date: Tue, 31 May 2022 17:16:14 +0200 Subject: [PATCH 01/12] Added konclude_test.py --- scripts/konclude_test.py | 122 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 122 insertions(+) create mode 100755 scripts/konclude_test.py diff --git a/scripts/konclude_test.py b/scripts/konclude_test.py new file mode 100755 index 00000000..f70c7318 --- /dev/null +++ b/scripts/konclude_test.py @@ -0,0 +1,122 @@ +#!/usr/bin/env python +import argparse +import re +import sys +from pathlib import Path + + +OWL_NOTHING = 'http://www.w3.org/2002/07/owl#Nothing' +BOTTOM_OBJECT_PROPERTY = 'http://www.w3.org/2002/07/owl#bottomObjectProperty' + +## IRI = '<(.*?)>' + +## EQUIVALENT_CLASSES = r'^EquivalentClasses\( (.*) \)$' +## OBJECT_INVERSE_OF = r'ObjectInverseOf\( ' + IRI + r' \)' +## EQUIVALENT_OBJECT_PROPERTIES = r'^EquivalentObjectProperties\( (.*) \)$' + +def _parseHomebrew(fileText): + inEq = False + nullClasses = [] + aux = [] + iriPLen = len("" == l: + inEq = False + if OWL_NOTHING in aux: + nullClasses = nullClasses + aux + aux = [] + else: + if l.startswith("" == l: + inEq = True + nullClasses = list(set(nullClasses)) + if OWL_NOTHING in nullClasses: + nullClasses.remove(OWL_NOTHING) + return nullClasses + +def main(): + parser = argparse.ArgumentParser() + parser.add_argument('konclude_output', help='Konclude output file', type=str) + parser.add_argument('-o', '--output', help='output file', default='konclude.html', type=str) + args = parser.parse_args() + + nullClasses = _parseHomebrew(open(args.konclude_output).read()) + results = { + 'EquivalentClasses': [nullClasses], + 'SubClassOf': [], + 'EquivalentObjectProperties': [], + 'SubObjectPropertyOf': [], + 'Error': [], + } + + output = format_output(results, format=args.output[args.output.rfind('.'):]) + with open(args.output, 'w') as outfile: + _ = outfile.write(output) + print(format_output(results)) + + # check if there are problems, return non-zero exit code if so + if len(nullClasses) != 0: + sys.exit(1) + + +def as_html(titles, results): + template = '

{title}

\n{issues}' + outer = '
\n

Set

{}

\n
\n' + outeritem = '

Set

' + inner = '
    \n
  • {}
  • \n
\n' + inneritem = '\n
  • ' + sections = [] + for k in sorted(results.keys()): + sets = results[k] + if not sets: + issues = '

    No issues detected.

    ' + else: + inners = list(inner.format(inneritem.join(sorted(s))) for s in sets) + issues = outer.format(outeritem.join(inners)) + section = template.format(title=titles[k], issues=issues) + sections.append(section) + sections = '\n'.join(sections) + return "\n\n\t\n\t\tKonclude results\n\t\t\n\t\n\t\n\t\t

    Konclude results

    \n\t\t\t" + sections + "\n\t\n" + + +def as_text(titles, results): + template = '\n## {title}\n\n{issues}' + outer = '* {}' + outeritem = '\n* ' + inner = '- {}\n' + inneritem = '\n - ' + sections = [] + for k in sorted(results.keys()): + sets = results[k] + if not sets: + issues = 'No issues detected.\n' + else: + inners = list(inner.format(inneritem.join(sorted(s))) for s in sets) + issues = outer.format(outeritem.join(inners)) + section = template.format(title=titles[k], issues=issues) + sections.append(section) + sections = '\n'.join(sections) + return '# Konclude results\n\n' + sections + + +def format_output(results, format='.md'): + titles = { + 'EquivalentClasses': 'Classes equivalent to ' + OWL_NOTHING, + 'SubClassOf': 'Subclasses of ' + OWL_NOTHING, + 'EquivalentObjectProperties': 'Object properties equivalent to ' + BOTTOM_OBJECT_PROPERTY, + 'SubObjectPropertyOf': 'Subproperties of ' + BOTTOM_OBJECT_PROPERTY, + 'Error': 'Unhandled subsumptions', + } + + if format == '.html': + return as_html(titles, results) + return as_text(titles, results) + + +if __name__ == '__main__': + main() + From 363341deac08ad427eb5a04fb90e96ebeb06c33b Mon Sep 17 00:00:00 2001 From: Mihai Pomarlan Date: Tue, 31 May 2022 17:25:09 +0200 Subject: [PATCH 02/12] Updated evaluation.yml --- .github/workflows/evaluation.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/evaluation.yml b/.github/workflows/evaluation.yml index 24aad9af..e26418b2 100644 --- a/.github/workflows/evaluation.yml +++ b/.github/workflows/evaluation.yml @@ -74,7 +74,7 @@ jobs: path: ./build/oops.xml consistency: - name: HermiT + name: Konclude runs-on: ubuntu-latest needs: compile @@ -92,18 +92,18 @@ jobs: - name: Download DUL run: wget http://www.ease-crc.org/ont/DUL.owl -O ./build/DUL.owl - - name: HermiT - uses: ./.github/actions/hermit + - name: Konclude + uses: ./.github/actions/Konclude with: - args: ./build/DUL.owl ./build/SOMA-HOME.owl + args: classification -i ./build/SOMA-HOME.owl -o ./konclude.output - - name: Print HermiT output - run: cat ./hermit.output + - name: Print Konclude output + run: cat ./konclude.output if: always() - - name: Evaluate HermiT output + - name: Evaluate Konclude output if: success() uses: docker://python:3.7.6-slim with: - args: python ./scripts/hermit_test.py -o ./owl/hermit.html ./hermit.output + args: python ./scripts/konclude_test.py -o ./owl/konclude.html ./konclude.output From 7fac7d9634bfc22cef0c391aa6dd72687800c77d Mon Sep 17 00:00:00 2001 From: Sascha Jongebloed Date: Tue, 5 Jul 2022 17:55:00 +0200 Subject: [PATCH 03/12] added docker run call to konclude --- .github/workflows/evaluation.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/evaluation.yml b/.github/workflows/evaluation.yml index e26418b2..53d0a192 100644 --- a/.github/workflows/evaluation.yml +++ b/.github/workflows/evaluation.yml @@ -93,17 +93,15 @@ jobs: run: wget http://www.ease-crc.org/ont/DUL.owl -O ./build/DUL.owl - name: Konclude - uses: ./.github/actions/Konclude - with: - args: classification -i ./build/SOMA-HOME.owl -o ./konclude.output + run: docker run -v $PWD/build:/data --rm konclude/konclude classify -i /data/SOMA-HOME.owl -o /data/konclude.output - name: Print Konclude output - run: cat ./konclude.output + run: cat ./build/konclude.output if: always() - name: Evaluate Konclude output if: success() uses: docker://python:3.7.6-slim with: - args: python ./scripts/konclude_test.py -o ./owl/konclude.html ./konclude.output + args: python ./scripts/konclude_test.py -o ./owl/konclude.html ./build/konclude.output From 5fe71ce1b49180e7ed756cc43786f741ca2641a6 Mon Sep 17 00:00:00 2001 From: Mihai Pomarlan Date: Tue, 5 Jul 2022 18:35:39 +0200 Subject: [PATCH 04/12] Min.fix. for output when no empty classes present. --- scripts/konclude_test.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/konclude_test.py b/scripts/konclude_test.py index f70c7318..629ba2f2 100755 --- a/scripts/konclude_test.py +++ b/scripts/konclude_test.py @@ -72,7 +72,7 @@ def as_html(titles, results): sections = [] for k in sorted(results.keys()): sets = results[k] - if not sets: + if (not sets) or (not sets[0]): issues = '

    No issues detected.

    ' else: inners = list(inner.format(inneritem.join(sorted(s))) for s in sets) @@ -92,7 +92,7 @@ def as_text(titles, results): sections = [] for k in sorted(results.keys()): sets = results[k] - if not sets: + if (not sets) or (not sets[0]): issues = 'No issues detected.\n' else: inners = list(inner.format(inneritem.join(sorted(s))) for s in sets) From d6d91b0e2133fb02ffe307fe1e19ac6fdee8cd0a Mon Sep 17 00:00:00 2001 From: mrnolte Date: Wed, 27 Jul 2022 15:37:33 +0200 Subject: [PATCH 05/12] Implemented exporting of object- and dataproperties --- scripts/java/pom.xml | 6 ++ scripts/java/src/main/java/main/CIRunner.java | 6 +- .../src/main/java/main/OntologyManager.java | 30 ++++++++++ .../main/ci_runners/PropertyListExporter.java | 57 +++++++++++++++++++ 4 files changed, 98 insertions(+), 1 deletion(-) create mode 100644 scripts/java/src/main/java/main/ci_runners/PropertyListExporter.java diff --git a/scripts/java/pom.xml b/scripts/java/pom.xml index 23fde731..759fb2eb 100644 --- a/scripts/java/pom.xml +++ b/scripts/java/pom.xml @@ -61,6 +61,12 @@ guava 31.1-jre + + + org.jgrapht + jgrapht-core + 1.5.1 + diff --git a/scripts/java/src/main/java/main/CIRunner.java b/scripts/java/src/main/java/main/CIRunner.java index fe3bbdb3..f81b8406 100644 --- a/scripts/java/src/main/java/main/CIRunner.java +++ b/scripts/java/src/main/java/main/CIRunner.java @@ -23,10 +23,14 @@ public class CIRunner implements CommandLineRunner { @Autowired private SubclassNothingRewriter gciRewriter; + @Autowired + private PropertyListExporter propertyListExporter; + @Override public void run(final String... args) throws Exception { - final CIRunnable[] toRun = {gciRewriter, isDefinedInAdder, versionInfoAdder, collapser, ontologySaver}; + final CIRunnable[] toRun = {gciRewriter, isDefinedInAdder, versionInfoAdder, collapser, propertyListExporter, + ontologySaver}; for (final var next : toRun) { next.run(); } diff --git a/scripts/java/src/main/java/main/OntologyManager.java b/scripts/java/src/main/java/main/OntologyManager.java index dd4577d4..87a706a0 100644 --- a/scripts/java/src/main/java/main/OntologyManager.java +++ b/scripts/java/src/main/java/main/OntologyManager.java @@ -1,6 +1,10 @@ package main; import main.config.OntologyConfig; +import org.jgrapht.Graph; +import org.jgrapht.alg.connectivity.GabowStrongConnectivityInspector; +import org.jgrapht.graph.DefaultDirectedGraph; +import org.jgrapht.graph.DefaultEdge; import org.protege.xmlcatalog.owlapi.XMLCatalogIRIMapper; import org.semanticweb.owlapi.apibinding.OWLManager; import org.semanticweb.owlapi.model.*; @@ -16,6 +20,7 @@ import java.nio.file.DirectoryStream; import java.nio.file.Files; import java.nio.file.Path; +import java.util.stream.Stream; /** * Class to manage the resources that are associated with an {@link OWLOntology}. @@ -75,4 +80,29 @@ private void loadOntology(final File ontologyFile) throws OWLOntologyCreationExc public OWLOntologyManager getOntologyManager() { return ontologyManager; } + + /** + * @return A {@link Stream} of a subset of the managed {@link OWLOntology}s such that their imports include all + * managed ontologies + */ + public Stream mainOntologies() { + // condensate import structure to strongly connected components + final var condensation = new GabowStrongConnectivityInspector<>(graphOfImportStructure()).getCondensation(); + + // get roots of condensation + //noinspection OptionalGetWithoutIsPresent + return condensation.vertexSet().stream().filter(key -> condensation.incomingEdgesOf(key).isEmpty()) + .map(next -> next.vertexSet().stream().findAny().get()); + } + + /** + * @return A {@link Graph} with all managed {@link OWLOntology}s as vertices and edges from o1 to o2 if o1 imports + * o2 + */ + public Graph graphOfImportStructure() { + final DefaultDirectedGraph graph = new DefaultDirectedGraph<>(DefaultEdge.class); + ontologyManager.ontologies().forEach(graph::addVertex); + ontologyManager.ontologies().forEach(next -> next.getDirectImports().forEach(imp -> graph.addEdge(next, imp))); + return graph; + } } diff --git a/scripts/java/src/main/java/main/ci_runners/PropertyListExporter.java b/scripts/java/src/main/java/main/ci_runners/PropertyListExporter.java new file mode 100644 index 00000000..561ed279 --- /dev/null +++ b/scripts/java/src/main/java/main/ci_runners/PropertyListExporter.java @@ -0,0 +1,57 @@ +package main.ci_runners; + +import main.OntologyManager; +import org.semanticweb.owlapi.model.OWLOntology; +import org.semanticweb.owlapi.model.parameters.Imports; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.Lazy; +import org.springframework.stereotype.Component; + +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.StandardOpenOption; +import java.util.stream.Collectors; + +@Component +@Lazy +public class PropertyListExporter implements CIRunnable { + + private static final Logger logger = LoggerFactory.getLogger(PropertyListExporter.class); + private final Path path; + private final OntologyManager ontologyManager; + + @Autowired + public PropertyListExporter(final OntologyManager ontologyManager, @Value("${propertyListPath}") final Path path) { + this.path = path; + this.ontologyManager = ontologyManager; + } + + @Override + public void run() throws IOException { + for (final OWLOntology owlOntology : ontologyManager.mainOntologies().collect(Collectors.toSet())) { + exportProperties(owlOntology); + } + } + + private void exportProperties(final OWLOntology ontology) throws IOException { + @SuppressWarnings("OptionalGetWithoutIsPresent") String fileName = ontology.getOntologyID().getOntologyIRI() + .get().getShortForm(); + fileName = fileName.substring(0, fileName.length() - 5); + if (!path.toFile().mkdirs()) { + throw new IOException("Could not create dir " + path.toAbsolutePath()); + } + logger.info("Writing object- and dataProperties of {} to {}_[object,data]Properties", fileName, + path.resolve(fileName).toAbsolutePath()); + Files.write(path.resolve(fileName + "_objectProperties"), + ontology.objectPropertiesInSignature(Imports.INCLUDED) + .map(next -> (CharSequence) next.toString())::iterator, + StandardOpenOption.CREATE); + Files.write(path.resolve(fileName + "_dataProperties"), ontology.dataPropertiesInSignature(Imports.INCLUDED) + .map(next -> (CharSequence) next.toString())::iterator, + StandardOpenOption.CREATE); + } +} From 7ab2b6b4c8814bceccc6590a9b8b3af171e4963e Mon Sep 17 00:00:00 2001 From: Sascha Jongebloed Date: Tue, 2 Aug 2022 12:45:49 +0200 Subject: [PATCH 06/12] added property export path to konclude --- .github/workflows/evaluation.yml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/evaluation.yml b/.github/workflows/evaluation.yml index 7b3d75fb..49354eea 100644 --- a/.github/workflows/evaluation.yml +++ b/.github/workflows/evaluation.yml @@ -92,7 +92,6 @@ jobs: consistency: name: Konclude runs-on: ubuntu-latest - needs: compile steps: - name: Checkout @@ -100,13 +99,18 @@ jobs: with: fetch-depth: 1 - - uses: actions/download-artifact@v1 + - name: Setup Java + uses: actions/setup-java@v3 with: - name: SOMA OWL - path: ./build/owl/current + distribution: 'temurin' + java-version: '18' + cache: 'maven' - - name: Download DUL - run: wget http://www.ease-crc.org/ont/DUL.owl -O ./build/DUL.owl + - name: Compile + run: | + mvn spring-boot:run -f scripts/java/pom.xml \ + -Dspring-boot.run.arguments="--versionInfo=current \ + --propertyListPath=$PWD/properties" - name: Konclude run: docker run -v $PWD/build:/data --rm konclude/konclude classify -i /data/SOMA-HOME.owl -o /data/konclude.output From ca5c32d1cf78f02ab1051d3109865225dbe3e3ba Mon Sep 17 00:00:00 2001 From: mrnolte Date: Tue, 2 Aug 2022 13:15:23 +0200 Subject: [PATCH 07/12] Update PropertyListExporter.java --- .../src/main/java/main/ci_runners/PropertyListExporter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/java/src/main/java/main/ci_runners/PropertyListExporter.java b/scripts/java/src/main/java/main/ci_runners/PropertyListExporter.java index 561ed279..e7716fc0 100644 --- a/scripts/java/src/main/java/main/ci_runners/PropertyListExporter.java +++ b/scripts/java/src/main/java/main/ci_runners/PropertyListExporter.java @@ -41,7 +41,7 @@ private void exportProperties(final OWLOntology ontology) throws IOException { @SuppressWarnings("OptionalGetWithoutIsPresent") String fileName = ontology.getOntologyID().getOntologyIRI() .get().getShortForm(); fileName = fileName.substring(0, fileName.length() - 5); - if (!path.toFile().mkdirs()) { + if (!path.toFile().exists() && !path.toFile().mkdirs()) { throw new IOException("Could not create dir " + path.toAbsolutePath()); } logger.info("Writing object- and dataProperties of {} to {}_[object,data]Properties", fileName, From d4f12b9235517e81a0789a78afc5c38f10255eba Mon Sep 17 00:00:00 2001 From: mrnolte Date: Tue, 2 Aug 2022 13:19:18 +0200 Subject: [PATCH 08/12] Implemented skipping of Exporting properties --- .../main/java/main/ci_runners/PropertyListExporter.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/java/src/main/java/main/ci_runners/PropertyListExporter.java b/scripts/java/src/main/java/main/ci_runners/PropertyListExporter.java index e7716fc0..e73c6473 100644 --- a/scripts/java/src/main/java/main/ci_runners/PropertyListExporter.java +++ b/scripts/java/src/main/java/main/ci_runners/PropertyListExporter.java @@ -21,17 +21,23 @@ public class PropertyListExporter implements CIRunnable { private static final Logger logger = LoggerFactory.getLogger(PropertyListExporter.class); + private final Path path; private final OntologyManager ontologyManager; @Autowired - public PropertyListExporter(final OntologyManager ontologyManager, @Value("${propertyListPath}") final Path path) { + public PropertyListExporter(final OntologyManager ontologyManager, + @Value("${propertyListPath#{null}}") final Path path) { this.path = path; this.ontologyManager = ontologyManager; } @Override public void run() throws IOException { + if (path == null) { + logger.info("CL argument 'propertyListPath' not given. Skipping export of properties."); + return; + } for (final OWLOntology owlOntology : ontologyManager.mainOntologies().collect(Collectors.toSet())) { exportProperties(owlOntology); } From daec219ec23bcf73167b5e1efebd7499f0534a16 Mon Sep 17 00:00:00 2001 From: mrnolte Date: Tue, 2 Aug 2022 13:21:57 +0200 Subject: [PATCH 09/12] Quickfix --- .../src/main/java/main/ci_runners/PropertyListExporter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/java/src/main/java/main/ci_runners/PropertyListExporter.java b/scripts/java/src/main/java/main/ci_runners/PropertyListExporter.java index e73c6473..6a62e86f 100644 --- a/scripts/java/src/main/java/main/ci_runners/PropertyListExporter.java +++ b/scripts/java/src/main/java/main/ci_runners/PropertyListExporter.java @@ -27,7 +27,7 @@ public class PropertyListExporter implements CIRunnable { @Autowired public PropertyListExporter(final OntologyManager ontologyManager, - @Value("${propertyListPath#{null}}") final Path path) { + @Value("${propertyListPath:#{null}}") final Path path) { this.path = path; this.ontologyManager = ontologyManager; } From b3799ad83e22b397f3e119ffe814206870f83e95 Mon Sep 17 00:00:00 2001 From: Mihai Pomarlan Date: Mon, 24 Oct 2022 15:20:42 +0200 Subject: [PATCH 10/12] Update konclude script to test object properties. --- .github/workflows/evaluation.yml | 2 +- scripts/konclude_test.py | 40 ++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 1 deletion(-) diff --git a/.github/workflows/evaluation.yml b/.github/workflows/evaluation.yml index e26418b2..3a924229 100644 --- a/.github/workflows/evaluation.yml +++ b/.github/workflows/evaluation.yml @@ -105,5 +105,5 @@ jobs: if: success() uses: docker://python:3.7.6-slim with: - args: python ./scripts/konclude_test.py -o ./owl/konclude.html ./konclude.output + args: python ./scripts/konclude_test.py -k ./.github/actions/Konclude -s ./build/SOMA-HOME.owl -o ./owl/konclude.html ./konclude.output diff --git a/scripts/konclude_test.py b/scripts/konclude_test.py index 629ba2f2..501504d6 100755 --- a/scripts/konclude_test.py +++ b/scripts/konclude_test.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import argparse import re +import os import sys from pathlib import Path @@ -38,9 +39,38 @@ def _parseHomebrew(fileText): nullClasses.remove(OWL_NOTHING) return nullClasses +def makeObjectPropertyQueryFile(objProps, somaPath): + queryMap = {} + queryOwl = './SOMA_QUERY.owl' + with open(queryOwl, 'w') as outfile: + outfile.write('Prefix(:=)\n') + outfile.write('Prefix(dul:=)\n') + outfile.write('Prefix(owl:=)\n') + outfile.write('Prefix(rdf:=)\n') + outfile.write('Prefix(xml:=)\n') + outfile.write('Prefix(xsd:=)\n') + outfile.write('Prefix(rdfs:=)\n') + outfile.write('Prefix(soma:=)\n\n\n') + outfile.write('Ontology(\n') + outfile.write('Import()\n' % somaPath) + for k,op in enumerate(objProps): + cName = 'http://www.ease-crc.org/ont/SOMA_QUERY.owl#QUERY%d' % k + queryMap[cName] = op + outfile.write('EquivalentClasses(<%s> ObjectSomeValuesFrom(<%s> owl:Thing))\n' % (cName, op)) + outfile.write(')\n') + return queryMap, queryOwl + +def runKonclude(queryOwl, koncludePath): + outName = queryOwl[:queryOwl.rfind('.')] + '_OUT.html' + os.system("%s classification -i %s -o %s >/dev/null 2>&1" % (koncludePath, queryOwl, outName)) + return _parseHomebrew(open(outName).read()) + def main(): parser = argparse.ArgumentParser() parser.add_argument('konclude_output', help='Konclude output file', type=str) + parser.add_argument('-k', '--koncludePath', help='path to Konclude executable', default='./.github/actions/Konclude', type=str) + parser.add_argument('-s', '--somaPath', help='path to merged SOMA owl', default='./build/SOMA-HOME.owl', type=str) + parser.add_argument('-p', '--propertyListPath', help='object property list file', default='', type=str) parser.add_argument('-o', '--output', help='output file', default='konclude.html', type=str) args = parser.parse_args() @@ -53,6 +83,16 @@ def main(): 'Error': [], } + objProps = [] + if '' != args.propertyListPath: + objProps = [x.strip() for x in open(args.propertyListPath).read().splitlines() if x.strip()] + if objProps: + query2objectProperty, queryOwl = makeObjectPropertyQueryFile(objProps, args.somaPath) + nullQueries = runKonclude(queryOwl, args.koncludePath) + for n in nullQueries: + if n in query2objectProperty: + results['EquivalentObjectProperties'].append(query2objectProperty[n]) + output = format_output(results, format=args.output[args.output.rfind('.'):]) with open(args.output, 'w') as outfile: _ = outfile.write(output) From 594cc923c38b8941a2a021bf3b4c125737a6fc15 Mon Sep 17 00:00:00 2001 From: Sascha Jongebloed Date: Thu, 27 Oct 2022 11:24:46 +0200 Subject: [PATCH 11/12] added properties check to ci --- .github/workflows/evaluation.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/evaluation.yml b/.github/workflows/evaluation.yml index b0e74dd1..558b5629 100644 --- a/.github/workflows/evaluation.yml +++ b/.github/workflows/evaluation.yml @@ -123,5 +123,5 @@ jobs: if: success() uses: docker://python:3.7.6-slim with: - args: python ./scripts/konclude_test.py -k ./.github/actions/Konclude -s ./build/SOMA-HOME.owl -o ./owl/konclude.html ./build/konclude.output + args: python ./scripts/konclude_test.py -p $PWD/properties/SOMA-HOM_objectProperties -k ./.github/actions/Konclude -s ./build/SOMA-HOME.owl -o ./owl/konclude.html ./build/konclude.output From 1446cc6ecda76b9bf48bea7fb6d0e34c36f5104c Mon Sep 17 00:00:00 2001 From: mpomarlan Date: Thu, 27 Oct 2022 16:59:16 +0200 Subject: [PATCH 12/12] Update konclude_test.py --- scripts/konclude_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/konclude_test.py b/scripts/konclude_test.py index 501504d6..97ac6007 100755 --- a/scripts/konclude_test.py +++ b/scripts/konclude_test.py @@ -85,7 +85,7 @@ def main(): objProps = [] if '' != args.propertyListPath: - objProps = [x.strip() for x in open(args.propertyListPath).read().splitlines() if x.strip()] + objProps = [x.strip().strip('<>') for x in open(args.propertyListPath).read().splitlines() if x.strip()] if objProps: query2objectProperty, queryOwl = makeObjectPropertyQueryFile(objProps, args.somaPath) nullQueries = runKonclude(queryOwl, args.koncludePath)