Skip to content

Commit

Permalink
Mark Hermes builtins using schema:isPartOf
Browse files Browse the repository at this point in the history
  • Loading branch information
zyzzyxdonta committed Dec 13, 2024
1 parent db89a3d commit 696d60d
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion docs/source/_ext/plugin_markup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ def plugin_to_jsonld(plugin: Dict[str, Any]) -> Dict[str, Any]:
is expressed as a ``schema:Organization`` using the given author field as the
``name``. The steps targeted by the plugin are expressed using the ``keyword`` field
by transforming them to the keywords ``hermes-step-<STEP>`` where ``<STEP>`` is the
name of the workflow step.
name of the workflow step. If the plugin is marked as a Hermes ``builtin``, this is
expressed using ``schema:isPartOf``.
"""
data = {
"@context": "https://schema.org/",
Expand All @@ -39,6 +40,15 @@ def plugin_to_jsonld(plugin: Dict[str, Any]) -> Dict[str, Any]:
if (author := plugin.get("author")) is not None:
data["author"] = {"@type": "Organization", "name": author}

hermes = {
"@type": "SoftwareApplication",
"@id": "https://doi.org/10.5281/zenodo.13221383", # Hermes concept ID
"name": "hermes",
}

if plugin.get("builtin", False):
data["isPartOf"] = hermes

keywords = []

for step in plugin.get("steps", []):
Expand Down

0 comments on commit 696d60d

Please sign in to comment.