Skip to content

Commit

Permalink
Remove pylint configs and update code base
Browse files Browse the repository at this point in the history
Remove all TODO and XXX comments in favor of dedicated issues on GitHub.
  • Loading branch information
CasperWA committed Oct 9, 2023
1 parent f4c0bb3 commit 251f2ae
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 666 deletions.
2 changes: 1 addition & 1 deletion .github/static/get_dic2owl_deps.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def main(argv_input: list = None) -> Set[str]:
for file in args.requirements_files:
if not file.exists():
raise FileNotFoundError(f"Could not find {file} !")
with open(file.resolve(), "r") as handle:
with open(file.resolve(), "r", encoding="utf8") as handle:
for line in handle.readlines():
match = requirements_regex.fullmatch(line)
if match is None:
Expand Down
15 changes: 3 additions & 12 deletions dic2owl/dic2owl/dic2owl.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
Python script for generating an ontology corresponding to a CIF dictionary.
"""
from __future__ import annotations

from contextlib import redirect_stderr
from os import devnull as DEVNULL
from pathlib import Path
Expand Down Expand Up @@ -77,10 +79,6 @@ class Generator:
"ontology/cif-ddl.ttl"
)

# TODO:
# Should `comments` be replaced with a dict `annotations` for annotating
# the ontology itself? If so, we should import Dublin Core.

def __init__(
self,
dicfile: "StrPath",
Expand Down Expand Up @@ -187,10 +185,8 @@ def _add_data_value(self, item: dict) -> None:
for ddl_name, value in item.items():
if ddl_name.startswith("_type."):
if ddl_name == "_type.dimension":
# TODO - fix special case
pass
elif value == "Implied":
# TODO - fix special case
pass
else:
parents.append(self.ddl[value])
Expand Down Expand Up @@ -221,11 +217,6 @@ class `cls`.

def _add_metadata(self) -> None:
"""Adds metadata to the generated ontology."""
# TODO:
# Is there a way to extract metadata from the dic object like
# _dictionary_audit.version?
# onto.set_version(version="XXX")

for comment in self.comments:
self.onto.metadata.comment.append(comment)
self.onto.metadata.comment.append(
Expand Down Expand Up @@ -275,4 +266,4 @@ def main(
overwrite=True,
)

return gen # XXX - just for debugging
return gen
Loading

0 comments on commit 251f2ae

Please sign in to comment.