-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Tweak module files * Update Makefile * Cleanup * Run make * Update workflow * Created prelim yaml file for PortalPublication (#542) * Created prelim yaml file for PortalPublication * Rebuild NF.jsonld, json * Add compilation step * Created a parent publication model and an nf specific model. Anh nyuget edits were also incorporated * Rebuild NF.jsonld, json * Updated PortalPublication with new Enum for StudyUse * Rebuild NF.jsonld, json * fixed string vs int for pmid * Fixed string vs int for pmid * Rebuild NF.jsonld, json * Update make step * Rebuild NF.jsonld, json * Made requested changes to PortalPublication model, along with fixed typos * Rebuild NF.jsonld, json * Update Makefile, make final revisions, recompile * Rebuild NF.jsonld, json --------- Co-authored-by: nf-osi[bot] <nf-osi@sagebionetworks.org> Co-authored-by: Anh Nguyet Vu <32753274+anngvu@users.noreply.github.com> Co-authored-by: Anh Nguyet Vu <anngvu@gmail.com> * Finalize changes * Add script * Rebuild NF.jsonld, json * Update workflow * Tweak display labels * Fixes * Rebuild NF.jsonld, json * Fix missing license values * Update ref in docs --------- Co-authored-by: aditya-nath-sage <aditya.nath@sagebase.org> Co-authored-by: nf-osi[bot] <nf-osi@sagebionetworks.org>
- Loading branch information
1 parent
4c2a051
commit 12a9e43
Showing
34 changed files
with
2,372 additions
and
2,487 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/bin/bash | ||
|
||
for FILE in $1 | ||
do | ||
# Synapse does not allow additionalProperties in schema, so remove that first | ||
jq 'del(.additionalProperties)' $FILE > temp.json | ||
REQUEST_BODY=$(jq '{schema : ., concreteType: "org.sagebionetworks.repo.model.schema.CreateSchemaRequest", dryRun: false }' temp.json) | ||
RESPONSE=$(curl -X POST https://repo-prod.prod.sagebase.org/repo/v1/schema/type/create/async/start \ | ||
-H "Authorization: Bearer $SYNAPSE_AUTH_TOKEN" \ | ||
-H "Content-Type: application/json" \ | ||
-d "$REQUEST_BODY") | ||
rm temp.json | ||
|
||
# Will error if token not within response | ||
echo $RESPONSE | ||
TOKEN=$( echo $RESPONSE | jq -e -r '.token') | ||
sleep 1 | ||
STATUS=$(curl "https://repo-prod.prod.sagebase.org/repo/v1/schema/type/create/async/get/$TOKEN" \ | ||
-H "Authorization: Bearer $SYNAPSE_AUTH_TOKEN") | ||
while true; do | ||
if echo "$STATUS" | jq -e '.jobState == "PROCESSING"' > /dev/null; then | ||
sleep 1 | ||
STATUS=$(curl "https://repo-prod.prod.sagebase.org/repo/v1/schema/type/create/async/get/$TOKEN" \ | ||
-H "Authorization: Bearer $SYNAPSE_AUTH_TOKEN") | ||
elif echo "$STATUS" | jq -e '.concreteType == "org.sagebionetworks.repo.model.ErrorResponse"' > /dev/null; then | ||
echo "Error: $(echo $STATUS | jq -r '.reason')" | ||
exit 1 | ||
else | ||
echo "Success:" | ||
echo "$STATUS" | jq -e '.newVersionInfo' | ||
break | ||
fi | ||
done | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.