Skip to content

Commit

Permalink
Merge pull request #556 from nf-osi/portal-pub-model-update-make-comp…
Browse files Browse the repository at this point in the history
…ilation

Update make step
  • Loading branch information
anngvu authored Nov 25, 2024
2 parents 430fe5a + 0389ac2 commit 91dc7db
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 46 deletions.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ Superdataset:
jq '.schema += input | del('.schema.required') | .schema["$$id"] = "https://repo-prod.prod.sagebase.org/repo/v1/schema/type/registered/org.synapse.nf-superdataset"' registered-json-schemas/PortalDataset.json registered-json-schemas/super_rules.json > registered-json-schemas/Superdataset.json

PortalPublication:
cat header.yaml modules/Template/PortalPublication.yaml > temp.yaml
cat header.yaml modules/Template/PortalPublication.yaml modules/Other/PublicationEnum.yaml > temp.yaml
gen-json-schema --top-class=PortalPublication --no-metadata --not-closed temp.yaml > tmp.json
jq '{ "$$schema": "http://json-schema.org/draft-07/schema#", "$$id": "https://repo-prod.prod.sagebase.org/repo/v1/schema/type/registered/org.synapse.nf-portalpublication", PortalPublication: ."$$defs".PortalPublication }' tmp.json > registered-json-schemas/PortalPublication.json
rm tmp.json temp.yaml
@echo "--- Saved registered-json-schemas/PortalPublication.json ---"
3 changes: 1 addition & 2 deletions modules/Template/PortalPublication.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

classes:
PublicationTemplate:
is_a: Template
description: A generalized data model template for Publications to be hopefully used across dccs
notes:
- This structure is based on a CSV file from MC2 annotations with customized fields as attributes.
Expand Down Expand Up @@ -58,4 +57,4 @@ classes:
dataset:
range: string
multivalued: true
required: false
required: false
66 changes: 23 additions & 43 deletions registered-json-schemas/PortalPublication.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,86 +5,66 @@
"additionalProperties": false,
"description": "A slightly more specialized publication concept intended for the specific scope of the NF Portal.",
"properties": {
"component": {
"abstract": {
"type": "string"
},
"publicationAbstract": {
"accessibility": {
"type": "string"
},
"publicationAccessibility": {
"type": "string"
},
"publicationAssay": {
"assay": {
"items": {
"type": "string"
},
"type": "array"
},
"publicationAuthors": {
"author": {
"items": {
"type": "string"
},
"type": "array"
},
"publicationConsortiumName": {
"type": "string"
},
"publicationDatasetAlias": {
"dataset": {
"items": {
"type": "string"
},
"type": "array"
},
"publicationDoi": {
"type": "string"
},
"publicationGrantNumber": {
"type": "string"
},
"publicationJournal": {
"type": "string"
},
"publicationKeywords": {
"diseaseFocus": {
"items": {
"type": "string"
},
"type": "array"
},
"publicationThemeName": {
"doi": {
"type": "string"
},
"publicationTissue": {
"grantNumber": {
"type": "string"
},
"publicationTitle": {
"journal": {
"type": "string"
},
"publicationTumorType": {
"pmid": {
"type": "string"
},
"publicationYear": {
"type": "integer"
"studyUse": {},
"title": {
"type": "string"
},
"pubmedId": {
"year": {
"type": "integer"
},
"pubmedUrl": {
"type": "string"
}
},
"required": [
"component",
"publicationGrantNumber",
"publicationConsortiumName",
"publicationThemeName",
"publicationDoi",
"publicationJournal",
"pubmedId",
"pubmedUrl",
"publicationTitle",
"publicationYear",
"publicationAbstract",
"publicationAccessibility"
"studyUse",
"grantNumber",
"doi",
"journal",
"pmid",
"title",
"year",
"abstract",
"accessibility"
],
"title": "PortalPublication",
"type": "object"
Expand Down

0 comments on commit 91dc7db

Please sign in to comment.