Skip to content

Commit

Permalink
Merge branch 'flb/bypass_punning_in_ontodoc' of github.com:emmo-repo/…
Browse files Browse the repository at this point in the history
…EMMOntoPy into flb/bypass_punning_in_ontodoc
  • Loading branch information
francescalb committed Feb 2, 2023
2 parents 194f49a + 0700333 commit bce7fe0
Show file tree
Hide file tree
Showing 8 changed files with 3 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ repos:
args: [--markdown-linebreak-ext=md]

- repo: https://github.com/ambv/black
rev: 22.12.0
rev: 23.1.0
hooks:
- id: black
name: Blacken
Expand Down
1 change: 0 additions & 1 deletion demo/vertical/define_ontology.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@

# Add new classes and object/data properties needed by the use case
with onto:

#
# Relations
# =========
Expand Down
2 changes: 0 additions & 2 deletions ontopy/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,6 @@ def add_edge(self, subject, predicate, obj, edgelabel=None, **attrs):
raise RuntimeError(f'`object` "{obj}" must have been added')
key = (subject, predicate, obj)
if key not in self.edges:

if edgelabel is None:
edgelabel = self.edgelabels

Expand Down Expand Up @@ -531,7 +530,6 @@ def add_source_edges( # pylint: disable=too-many-arguments,too-many-branches
entity = self.ontology[source] if isinstance(source, str) else source
label = get_label(entity)
for relation in entity.is_a:

# isA
if isinstance(
relation, (owlready2.ThingClass, owlready2.ObjectPropertyClass)
Expand Down
1 change: 0 additions & 1 deletion ontopy/ontology.py
Original file line number Diff line number Diff line change
Expand Up @@ -1131,7 +1131,6 @@ class docstrings are mapped to. Defaults to "comment".
if not hasattr(cls, "prefLabel"):
# no prefLabel - create new annotation property..
with self:

# pylint: disable=invalid-name,missing-class-docstring
# pylint: disable=unused-variable
class prefLabel(owlready2.label):
Expand Down
3 changes: 2 additions & 1 deletion requirements_dev.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
pre-commit~=2.21
pre-commit>=2.21.0,<3; python_version<"3.8"
pre-commit~=3.0; python_version>="3.8"
pylint~=2.15
pytest~=7.2
pytest-cov~=4.0
1 change: 0 additions & 1 deletion tests/test_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ def test_basic(emmo: "Ontology") -> None:
onto.new_entity("Hydr ogen", emmo.Atom)

with onto:

# Add entity using python classes
class Oxygen(emmo.Atom):
"""Oxygen atom."""
Expand Down
1 change: 0 additions & 1 deletion tests/test_catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@


def test_catalog(repo_dir: "Path", tmpdir: "Path") -> None:

ontodir = repo_dir / "tests" / "catalogs_for_testing"
catalog_expected = {
"http://emmo.info/testonto/0.1.0": str(ontodir / "testonto.ttl"),
Expand Down
1 change: 0 additions & 1 deletion tools/ontoconvert
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,6 @@ def main(argv: list = None):
graph2.serialize(destination=args.output, format=fmt)

else:

onto.save(
args.output,
format=output_format,
Expand Down

0 comments on commit bce7fe0

Please sign in to comment.