Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Complete example

Code Block
languagepyjs
linenumberstrue
{
  "name": "tool name", 
  "description": "tool description", 
  "container-image": {
    "image": "user/image", 
    "index": "docker://", 
    "type": "singularity"
  }, 
  
  "command-line": "echo [CYTOMINE_HOST] [CYTOMINE_PUBLIC_KEY] [CYTOMINE_PRIVATE_KEY] [CYTOMINE_ID_PROJECT] [CYTOMINE_ID_SOFTWARE] [PARAM1] [PARAM2] [PARAM3] [PARAM4] [PARAM5] [PARAM6] [PARAM7] [PARAM8] [CYTOMINE_VERBOSITY]", 
  "inputs": [
    {
      "id": "cytomine_host", 
      "value-key": "[@ID]",
      "command-line-flag": "--@id", 
      "name": "Cytomine host", 
      "description": "Mandatory to communicate with Cytomine; automatically filled by server",
      "set-by-server": true,
      "optional": false, 
      "type": "String"
    },
    {
      "id": "cytomine_public_key", 
      "value-key": "[@ID]",
      "command-line-flag": "--@id", 
      "name": "Cytomine public key", 
      "description": "Mandatory to communicate with Cytomine; automatically filled by server",
      "set-by-server": true,
      "optional": false, 
      "type": "String"
    },
    {
      "id": "cytomine_private_key", 
      "value-key": "[@ID]",
      "command-line-flag": "--@id", 
      "name": "Cytomine public key", 
      "description": "Mandatory to communicate with Cytomine; automatically filled by server",
      "set-by-server": true,
      "optional": false, 
      "type": "String"
    },
    {
      "id": "cytomine_id_project", 
      "value-key": "[@ID]",
      "command-line-flag": "--@id", 
      "name": "Cytomine project ID", 
      "description": "Mandatory to communicate with Cytomine; automatically filled by server",
      "set-by-server": true,
      "optional": false, 
      "type": "Number"
    },
    {
      "id": "cytomine_id_software", 
      "value-key": "[@ID]",
      "command-line-flag": "--@id", 
      "name": "Cytomine software ID", 
      "description": "Mandatory to communicate with Cytomine; automatically filled by server",
      "set-by-server": true,
      "optional": false, 
      "type": "Number"
    },
    {
      "id": "cytomine_verbosity", 
      "value-key": "[@ID]",
      "command-line-flag": "--@id", 
      "name": "Log verbosity level", 
      "description": "Type and values depends on your software implementation, not set by server and must be optional",
      "optional": true, 
      "type": "String"
    },
    {
      "id": "param1", 
      "value-key": "[@ID]",
      "command-line-flag": "--@id", 
      "name": "The first parameter (human readable name)", 
      "description": "A string without restriction and optional",
      "optional": true, 
      "type": "String", 
      "default-value": "hello"
    }, 
    {
      "id": "param2", 
      "value-key": "[@ID]",
      "command-line-flag": "--@id", 
      "name": "The second parameter (human readable name)", 
      "description": "A string choice among possibilities",
      "optional": false, 
      "type": "String", 
      "values-choice": ["A", "B"],
      "default-value": "A"
    }, 
    {
      "id": "param3", 
      "value-key": "[@ID]",
      "command-line-flag": "--@id", 
      "name": "The third parameter (human readable name)", 
      "description": "A number without restriction",
      "optional": false, 
      "type": "Number"
    }, 
    {
      "id": "param4", 
      "value-key": "[@ID]",
      "command-line-flag": "--@id", 
      "name": "The fourth parameter (human readable name)", 
      "description": "A number between 0 (inclusive) and 100 (inclusive)",
      "optional": false, 
      "type": "Number", 
      "minimum": "0",
      "maximum": "100"
    }, 
    {
      "id": "param5", 
      "value-key": "[@ID]",
      "command-line-flag": "--@id", 
      "name": "The fifth parameter (human readable name)", 
      "description": "A number which is an integer",
      "optional": false, 
      "type": "Number", 
      "integer": true
    }, 
    {
      "id": "param6", 
      "value-key": "[@ID]",
      "command-line-flag": "--@id", 
      "name": "The sixth parameter (human readable name)", 
      "description": "A number choice among possibilities",
      "optional": false, 
      "type": "Number", 
      "values-choice": [10, 20, 30]
    }, 
    {
      "id": "param7", 
      "value-key": "[@ID]",
      "command-line-flag": "--@id", 
      "name": "The seventh parameter (human readable name)", 
      "description": "A boolean",
      "optional": false, 
      "type": "Boolean"
    }, 
    {
      "id": "param8", 
      "value-key": "[@ID]",
      "command-line-flag": "--@id", 
      "name": "The eigth parameter (human readable name)", 
      "description": "A Cytomine domain; here an image instance in the current project",
      "optional": false, 
      "type": "Domain",
      "uri": "/api/project/$currentProject$/imageinstance.json",
      "uri-print-attribute": "instanceFilename",
      "uri-sort-attribute": "created"
    }, 
  ], 

  "suggested-resources": {
    "cpu-cores": 1, 
    "ram": 1, 
    "walltime-estimate": 60
  }, 
  "tags": {
    "foo": "bar", 
    "purpose": "testing", 
    "status": "example"
  },

  "schema-version": "cytomine-0.1"
}

...