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

RDF Converter, XML Reader Updates #325

Merged
merged 15 commits into from
Sep 27, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
include LICENSE
include README.rst
include odml/info.json
include doc/section_subclasses.yaml
13 changes: 6 additions & 7 deletions odml/tools/rdf_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,12 @@ def __init__(self, odml_documents):
subclass_path = os.path.join(dirname(dirname(dirname(abspath(__file__)))),
'doc', 'section_subclasses.yaml')

if os.path.isfile(subclass_path):
with open(subclass_path, "r") as f:
try:
self.section_subclasses = yaml.load(f)
except yaml.parser.ParserError as err:
print(err)
return
with open(subclass_path, "r") as f:
mpsonntag marked this conversation as resolved.
Show resolved Hide resolved
try:
self.section_subclasses = yaml.load(f)
except yaml.parser.ParserError as err:
print(err)
return

def convert_to_rdf(self):
self.hub_root = URIRef(odmlns.Hub)
Expand Down