Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
cthoyt committed Apr 22, 2024
1 parent fe984b2 commit 405d9c3
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
9 changes: 8 additions & 1 deletion docs/make_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,14 @@
HERE = Path(__file__).parent.resolve()
PATH = HERE.joinpath("schema.json")
TITLE = "Extended Prefix Map"
DESCRIPTION = ""
DESCRIPTION = (
"""\
An extended prefix map is a generalization of a prefix map that
includes synonyms for URI prefixes and CURIE prefixes.
""".strip()
.replace("\n", " ")
.replace(" ", " ")
)
URL = "https://w3id.org/biopragmatics/schema/epm.json"


Expand Down
3 changes: 2 additions & 1 deletion docs/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,6 @@
"type": "array"
}
},
"title": "Extended Prefix Map"
"title": "Extended Prefix Map",
"description": "An extended prefix map is a generalization of a prefix map that includes synonyms for URI prefixes and CURIE prefixes."
}
6 changes: 5 additions & 1 deletion docs/source/struct.rst
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,8 @@ containing an entry for ChEBI) looks like:
}
]
An EPM is simply a list of records (see :class:`curies.Record`). EPMs have the benefit that they are still
An EPM is simply a list of records (see :class:`curies.Record` and :class:`curies.Records`).
EPMs have the benefit that they are still
encoded in JSON and can easily be encoded in YAML, TOML, RDF, and other schemata. Further, prefix maps can be
automatically upgraded into EPMs (with some caveats) using :func:`curies.upgrade_prefix_map`.

Expand All @@ -118,3 +119,6 @@ automatically upgraded into EPMs (with some caveats) using :func:`curies.upgrade
can be loaded using :meth:`curies.Converter.from_extended_prefix_map`.
We provide a Pydantic model representing it. Later, we hope to have an external, stable definition
of this data schema.

A JSON schema for EPMs is available at https://w3id.org/biopragmatics/schema/epm.json.
It can be updated at https://github.com/biopragmatics/curies/tree/main/docs/make_schema.py.

0 comments on commit 405d9c3

Please sign in to comment.