forked from gisjedi/seed-original
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated input and output data schema and examples to use explicit fil…
…es/json members as opposed to type identified objects.
- Loading branch information
Showing
5 changed files
with
369 additions
and
298 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,83 +1,80 @@ | ||
{ | ||
"manifestVersion": "0.0.1", | ||
"jobs": | ||
[ | ||
{ | ||
"name": "my-algorithm", | ||
"version": "1.0.0", | ||
"title": "My first algorithm", | ||
"description": "Reads an HDF5 file and outputs two TIFF images, a CSV and manifest containing cell_count", | ||
"tag": ["hdf5", "tiff", "csv", "image processing"], | ||
"authorName": "John Doe", | ||
"authorUrl": "http://www.example.com", | ||
"timeout": 3600, | ||
"cpus": 10.0, | ||
"mem": 10240.0, | ||
"storage": 0.0, | ||
"interface": { | ||
"cmd": "/app/job.sh", | ||
"args": "${INPUT_FILE} ${JOB_OUTPUT_DIR}", | ||
"inputData": [ | ||
{ | ||
"name": "INPUT_FILE", | ||
"type": "file", | ||
"required": true, | ||
"content": { | ||
"mediaType": [ "image/x-hdf5-image" ] | ||
} | ||
} | ||
], | ||
"outputData": [ | ||
{ | ||
"name": "output_file_tiffs", | ||
"type": "file", | ||
"required": true, | ||
"content": { | ||
"mediaType": "image/tiff", | ||
"count": "2", | ||
"pattern": "outfile*.tif" | ||
} | ||
}, | ||
{ | ||
"name": "output_file_csv", | ||
"type": "file", | ||
"required": true, | ||
"content": { | ||
"mediaType": "text/csv", | ||
"pattern": "outfile*.csv" | ||
} | ||
}, | ||
{ | ||
"name": "cell_count", | ||
"type": "json", | ||
"required": true, | ||
"content": { | ||
"key": "cell_count", | ||
"type": "integer" | ||
} | ||
} | ||
] | ||
}, | ||
"errorMapping": [ | ||
{ | ||
"code": 1, | ||
"title": "Error Name", | ||
"description": "Error Description", | ||
"category": "system" | ||
}, | ||
{ | ||
"code": 2, | ||
"title": "Error Name", | ||
"description": "Error Description", | ||
"category": "data" | ||
}, | ||
{ | ||
"code": 3, | ||
"title": "Error Name", | ||
"description": "Error Description", | ||
"category": "algorithm" | ||
} | ||
] | ||
} | ||
] | ||
"manifestVersion": "0.0.1", | ||
"jobs": [ | ||
{ | ||
"name": "my-algorithm", | ||
"version": "1.0.0", | ||
"title": "My first algorithm", | ||
"description": "Reads an HDF5 file and outputs two TIFF images, a CSV and manifest containing cell_count", | ||
"tag": [ | ||
"hdf5", | ||
"tiff", | ||
"csv", | ||
"image processing" | ||
], | ||
"authorName": "John Doe", | ||
"authorUrl": "http://www.example.com", | ||
"timeout": 3600, | ||
"cpus": 10.0, | ||
"mem": 10240.0, | ||
"storage": 0.0, | ||
"interface": { | ||
"cmd": "/app/job.sh", | ||
"args": "${INPUT_FILE} ${JOB_OUTPUT_DIR}", | ||
"inputData": { | ||
"files": [ | ||
{ | ||
"name": "INPUT_FILE", | ||
"required": true, | ||
"mediaType": [ | ||
"image/x-hdf5-image" | ||
] | ||
} | ||
] | ||
}, | ||
"outputData": { | ||
"files": [ | ||
{ | ||
"name": "output_file_tiffs", | ||
"mediaType": "image/tiff", | ||
"count": "2", | ||
"pattern": "outfile*.tif" | ||
}, | ||
{ | ||
"name": "output_file_csv", | ||
"mediaType": "text/csv", | ||
"pattern": "outfile*.csv" | ||
} | ||
], | ||
"json": [ | ||
{ | ||
"name": "cell_count", | ||
"key": "cellCount", | ||
"type": "integer" | ||
} | ||
] | ||
} | ||
}, | ||
"errorMapping": [ | ||
{ | ||
"code": 1, | ||
"title": "Error Name", | ||
"description": "Error Description", | ||
"category": "system" | ||
}, | ||
{ | ||
"code": 2, | ||
"title": "Error Name", | ||
"description": "Error Description", | ||
"category": "data" | ||
}, | ||
{ | ||
"code": 3, | ||
"title": "Error Name", | ||
"description": "Error Description", | ||
"category": "algorithm" | ||
} | ||
] | ||
} | ||
] | ||
} |
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 |
---|---|---|
|
@@ -12,7 +12,7 @@ | |
"cpus": 0.1, | ||
"mem": 1.0, | ||
"interface": { | ||
"cmd": "/app/job.sh", | ||
"cmd": "/app/job.sh" | ||
} | ||
} | ||
] | ||
|
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 |
---|---|---|
@@ -1,49 +1,46 @@ | ||
{ | ||
"manifestVersion": "0.0.1", | ||
"jobs": | ||
[ | ||
{ | ||
"name": "image-watermark", | ||
"version": "0.1.0", | ||
"title": "Image Watermarker", | ||
"description": "Processes an input PNG and outputs watermarked PNG.", | ||
"authorName": "John Doe", | ||
"timeout": 30, | ||
"cpus": 1.0, | ||
"mem": 64.0, | ||
"interface": { | ||
"cmd": "/app/watermark.py", | ||
"args": "${INPUT_IMAGE} ${JOB_OUTPUT_DIR}", | ||
"inputData": [ | ||
{ | ||
"name": "INPUT_IMAGE", | ||
"type": "file", | ||
"required": true, | ||
"content": { | ||
"mediaType": [ "image/png" ] | ||
} | ||
} | ||
], | ||
"outputData": [ | ||
{ | ||
"name": "OUTPUT_IMAGE", | ||
"type": "file", | ||
"required": true, | ||
"content": { | ||
"mediaType": "image/png", | ||
"pattern": "*_watermark.png" | ||
} | ||
} | ||
] | ||
}, | ||
"errorMapping": [ | ||
{ | ||
"code": 1, | ||
"title": "Image Corrupt", | ||
"description": "Image input is not recognized as a valid PNG.", | ||
"category": "data" | ||
} | ||
] | ||
} | ||
] | ||
"manifestVersion": "0.0.1", | ||
"jobs": [ | ||
{ | ||
"name": "image-watermark", | ||
"version": "0.1.0", | ||
"title": "Image Watermarker", | ||
"description": "Processes an input PNG and outputs watermarked PNG.", | ||
"authorName": "John Doe", | ||
"timeout": 30, | ||
"cpus": 1.0, | ||
"mem": 64.0, | ||
"interface": { | ||
"cmd": "/app/watermark.py", | ||
"args": "${INPUT_IMAGE} ${JOB_OUTPUT_DIR}", | ||
"inputData": { | ||
"files": [ | ||
{ | ||
"name": "INPUT_IMAGE", | ||
"mediaType": [ | ||
"image/png" | ||
] | ||
} | ||
] | ||
}, | ||
"outputData": { | ||
"files": [ | ||
{ | ||
"name": "OUTPUT_IMAGE", | ||
"mediaType": "image/png", | ||
"pattern": "*_watermark.png" | ||
} | ||
] | ||
} | ||
}, | ||
"errorMapping": [ | ||
{ | ||
"code": 1, | ||
"title": "Image Corrupt", | ||
"description": "Image input is not recognized as a valid PNG.", | ||
"category": "data" | ||
} | ||
] | ||
} | ||
] | ||
} |
Oops, something went wrong.