From c654469db377db8ad79733fbbd6980a93962fec0 Mon Sep 17 00:00:00 2001 From: francescalb Date: Mon, 19 Jun 2023 09:00:44 +0200 Subject: [PATCH 1/2] Check prefLabels in imported ontologies only is aasked for. --- emmopy/emmocheck.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/emmopy/emmocheck.py b/emmopy/emmocheck.py index 4901900db..b90325667 100644 --- a/emmopy/emmocheck.py +++ b/emmopy/emmocheck.py @@ -89,12 +89,11 @@ def test_number_of_labels(self): exceptions.update( self.get_config("test_number_of_labels.exceptions", ()) ) - if ( "prefLabel" in self.onto.world._props # pylint: disable=protected-access ): - for entity in self.onto.get_entities(): + for entity in self.onto.classes(self.check_imported): if repr(entity) not in exceptions: with self.subTest( entity=entity, From 116f7ad3b2f51124360683f60c165de74db833a0 Mon Sep 17 00:00:00 2001 From: francescalb Date: Mon, 19 Jun 2023 14:07:24 +0200 Subject: [PATCH 2/2] Updated method usage in manchester.py according to pythonification updates in pyarsing --- ontopy/manchester.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ontopy/manchester.py b/ontopy/manchester.py index 143196f76..316793ebb 100644 --- a/ontopy/manchester.py +++ b/ontopy/manchester.py @@ -45,11 +45,11 @@ def manchester_expression(): literal = ( typedLiteral | stringLanguageLiteral | stringLiteral | numberLiteral ) - logOp = pp.oneOf(["and", "or"], asKeyword=True) + logOp = pp.one_of(["and", "or"], asKeyword=True) expr = pp.Forward() restriction = pp.Forward() primary = pp.Keyword("not")[...] + ( - restriction | ident("cls") | pp.nestedExpr("(", ")", expr) + restriction | ident("cls") | pp.nested_expr("(", ")", expr) ) objPropExpr = ( pp.Literal("inverse")