Skip to content

Commit

Permalink
allowing longer lines in the dump
Browse files Browse the repository at this point in the history
  • Loading branch information
dachafra committed Mar 22, 2024
1 parent e634184 commit 59850c7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/yatter/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def inverse_translation(rdf_mapping, mapping_format=RML_URI):
triples_map = [tm[rdflib.Variable('triplesMap')] for tm in rdf_mapping.query(query).bindings]

for tm in triples_map:
tm_name = tm.split("/")[-1]
tm_name = tm.split("/")[-1].split("#")[-1]
yarrrml_tm = {YARRRML_SOURCES: [add_inverse_source(tm, rdf_mapping, mapping_format)]}
subject, classes = add_inverse_subject(tm, rdf_mapping)
yarrrml_tm.update(subject)
Expand Down
1 change: 1 addition & 0 deletions src/yatter/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ def write_results(mapping):
elif type(mapping) is dict:
with open(args.output_mapping_path, "wb") as f:
yaml = YAML()
yaml.width = 3000
yaml.default_flow_style = False
yaml.dump(mapping, f)

Expand Down
2 changes: 1 addition & 1 deletion src/yatter/source.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ def get_logical_source(logical_source_id, rdf_mapping):
raise Exception()

if source and reference_formulation and iterator:
yarrrml_source = [source.value + '~' + reference_formulation.toPython().replace(QL_URI, '').lower(), iterator.value]
yarrrml_source = [source.value + '~' + reference_formulation.toPython().replace(QL_URI, '').lower(), iterator.value]
elif source and sql_query:
# this means a database source
source_dict = {"query": sql_query.value, "source": source.value}
Expand Down

0 comments on commit 59850c7

Please sign in to comment.