Skip to content

Commit

Permalink
Merge pull request #13 from prefixcommons/go-site-617
Browse files Browse the repository at this point in the history
When deriving json-ld context from db-xrefs yaml, use new rdf_uri_pre…
  • Loading branch information
cmungall authored Apr 19, 2018
2 parents 7b5ff19 + b552c87 commit ac00833
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion bin/go-xrefs-to-context.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@ def main(fn):
if db in pm and pm[db] != url:
logging.warn("Replacing {} : {} -> {}".format(db, pm[db], url))
pm[db] = url


# overwrite if rdf_uri_prefix is known. See https://github.com/geneontology/go-site/issues/617
for p in prefixes:
if 'rdf_uri_prefix' in p:
pm[p['database']] = p['rdf_uri_prefix']


obj = {'@context': pm}
print(json.dumps(obj, indent=4))
Expand Down

0 comments on commit ac00833

Please sign in to comment.