Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check prefLabels in imported ontologies only if asked for. #628

Merged
merged 2 commits into from
Jun 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions emmopy/emmocheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions ontopy/manchester.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down