πŸ”£ CCP Method Descriptor: method.json

Every method in CCP is defined by a structured JSON file called method.json. This file fully describes the method’s behavior, interface, and execution context, and is essential for running, sharing, and reproducing the method.

You can download it using the Download button (Download Icon) in the method list.


Purpose

The method.json file is the definitive contract for a method’s definition. It:

  • Specifies inputs, outputs, runtime, and logic

  • Enables sharing and importing/exporting across VREs

  • Supports method versioning and provenance tracking


Structure Overview

id (required)

"id": "af3e3771-5b1f-402b-89b8-4ecdb121af92"

A globally unique identifier for the method. It must remain consistent to ensure traceability of executions and metadata.


title, description, version

Basic metadata used for display and documentation.


metadata

Contains roles like:

  • author: person or group creating the method

  • category: classification in the UI

  • context: VRE or infrastructure where the method is defined


inputs

Defines the method’s parameters. Each includes:

  • id, title, description

  • schema with type, format, and MIME type

  • minOccurs / maxOccurs

ccpimage: Runtime Docker Image (required)

"ccpimage": {
  "id": "ccpimage",
  "title": "Runtime",
  "description": "The image of the runtime to use for method execution.",
  "schema": {
    "type": "string",
    "format": "url",
    "default": "hub.dev.d4science.org/test/python-gdal:latest"
  }
}

This input defines the Docker image used to run the method logic inside the container. It must be compatible with the target infrastructure.


πŸ“¦ Output outputs

Standard and custom outputs, including stdout, stderr, or generated files.


additionalParameters

Includes:

  • deploy-script: prepares the environment

  • execute-script: runs the method

  • undeploy-script: optional cleanup

  • lifecycle: timestamps and modifications



keywords (optional)

Used for search and discovery in the CCP interface.


πŸ’‘ Note Notes

  • The id and compatibleWith fields are mandatory

  • The method is executed only if the infrastructure matches compatibleWith

  • The file can be uploaded again to update, clone, or transfer the method across VREs