prefixmaps.ingest package
Submodules
prefixmaps.ingest.etl_runner module
prefixmaps.ingest.ingest module
prefixmaps.ingest.ingest_bioregistry module
prefixmaps.ingest.ingest_go module
Ingests the GO prefix registry.
- prefixmaps.ingest.ingest_go.parse_go_xrefs(input)
Parse GO db-xrefs.yaml file.
Note that most entries in the file are ignored. We only extract the “embedded JSON-LD context” which are those marked rdf_uri_prefix, which indicates the semantic expansions used in the triplestore.
- Parameters:
file –
- Return type:
- Returns:
prefixmaps.ingest.ingest_jsonld module
Generic JSON-LD ingests.
- prefixmaps.ingest.ingest_jsonld.from_jsonld_context(jsonld_context, name, excludes=None)
Ingests from a JSON-LD context stored as a dictionary.
Note
Does not support JSON-LD 1.1 contexts.
- Parameters:
jsonld_context (
Dict
[str
,Any
]) –name (
str
) –excludes (
Optional
[List
[str
]]) –
- Return type:
- Returns:
- prefixmaps.ingest.ingest_jsonld.from_jsonld_context_file(file, name, excludes=None)
Ingests from a local JSON-LD context.
- Parameters:
file (
Union
[TextIO
,str
]) –name (
str
) –excludes (
Optional
[List
[str
]]) –
- Return type:
- Returns:
- prefixmaps.ingest.ingest_jsonld.from_jsonld_context_url(url, name, excludes=None)
Ingests from a remote JSON-LD context.
- Parameters:
url (
str
) –name (
str
) –excludes (
Optional
[List
[str
]]) –
- Return type:
- Returns:
- prefixmaps.ingest.ingest_jsonld.from_prefixcc()
Ingests from prefix.cc.
Note that prefix.cc is an extremely messy source, but it can be useful for semweb namespaces.
In order to prioritize “better” prefixes we have an exclusion list, that attempts to exclude the most egregious entries, and prioritize more official sources. However, there are still no guarantees as to quality.
Longer term we should focus on the curated linked_data.yaml file, and moving this to bioregistry.
- Return type:
- Returns: