From dae43cdd721fca076f09c3346882e16c06af3826 Mon Sep 17 00:00:00 2001 From: Anh Nguyet Vu Date: Tue, 26 Nov 2024 08:18:37 -0800 Subject: [PATCH] Fixes --- .github/workflows/register-schema.sh | 1 + Makefile | 2 +- registered-json-schemas/Protocol.json | 16 ++++++++++++---- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/.github/workflows/register-schema.sh b/.github/workflows/register-schema.sh index 0481d703..d97cf002 100755 --- a/.github/workflows/register-schema.sh +++ b/.github/workflows/register-schema.sh @@ -31,3 +31,4 @@ do break fi done +done diff --git a/Makefile b/Makefile index 1634d362..f72cf7e2 100644 --- a/Makefile +++ b/Makefile @@ -34,7 +34,7 @@ Protocol: yq '.slots |= with_entries(select(.value.in_subset[] == "portal" or .value.in_subset[] == "registered"))' modules/props.yaml > relevant_props.yaml yq ea '. as $$item ireduce ({}; . * $$item )' modules/Data/Data.yaml modules/Assay/Assay.yaml > relevant_enums.yaml cat header.yaml relevant_props.yaml relevant_enums.yaml modules/Template/Protocol.yaml > temp.yaml - gen-json-schema --inline --no-metadata --not-closed temp.yaml > tmp.json + gen-json-schema --inline --no-metadata --not-closed --title-from=title temp.yaml > tmp.json json-dereference -s tmp.json -o tmp.json jq '."$$defs".Protocol | ."$$id"="https://repo-prod.prod.sagebase.org/repo/v1/schema/type/registered/org.synapse.nf-protocol"' tmp.json > registered-json-schemas/Protocol.json rm -f relevant_props.yaml relevant_enums.yaml temp.yaml tmp.json diff --git a/registered-json-schemas/Protocol.json b/registered-json-schemas/Protocol.json index 6c6a8bb4..788bab5c 100644 --- a/registered-json-schemas/Protocol.json +++ b/registered-json-schemas/Protocol.json @@ -1,25 +1,32 @@ { "additionalProperties": false, - "description": "Template for describing a protocol document.", + "description": "Describes protocol document based on https://bioschemas.org/profiles/LabProtocol/0.7-DRAFT.", "properties": { "author": { "description": "The author of the resource; preferably use an ORCID ID, GitHub profile link, etc., if available and a text name if not.", - "type": "string" + "items": { + "type": "string" + }, + "title": "Author(s)", + "type": "array" }, "citation": { "description": "Citation (e.g. doi) that usage of data or resource should be cited with.", + "title": "Citation", "type": "string" }, "comments": { "description": "Brief free-text comments that may also be important to understanding the resource.", + "title": "Comments", "type": "string" }, "license": { "description": "Link to a license or name of license applicable for the resource.", - "type": "string" + "title": "License" }, "protocolAssay": { "description": "Main assay type that this protocol is related to, e.g. this is a prep protocol for single-cell RNA-seq assay. This is especially helpful for newly-developed or in-house assays.\n", + "title": "Protocol assay", "enum": [ "2D AlamarBlue absorbance", "2D AlamarBlue fluorescence", @@ -209,15 +216,16 @@ "word recognition score", "STR profile" ], - "title": "AssayEnum", "type": "string" }, "protocolPurpose": { "description": "Brief description of the protocol purpose.", + "title": "Protocol purpose", "type": "string" }, "sampleType": { "description": "Type of sample used", + "title": "Sample type", "type": "string" }, "title": {