{
  "$defs": {
    "About": {
      "additionalProperties": false,
      "description": "The plain-language card of one catalog item.\n\nEvery field except the expert ones is required, so an About that validates is\nstructurally complete; :func:`about_issues` adds the editorial rules (one or two\nsentences, no jargon in the summary, known chooser tags, related ids that exist).",
      "examples": [
        {
          "assumptions": [
            "Numbers can be added up (spend, sales); averages are averaged"
          ],
          "avoid_when": [
            "Your data already has one row per week"
          ],
          "data_needs": [
            "A date column"
          ],
          "difficulty": "beginner",
          "example": "Daily TV spend of 100 each day becomes 700 for the week.",
          "fits": {
            "goal": [
              "check_data"
            ]
          },
          "outputs": [
            "The same columns, one row per week"
          ],
          "related": [
            "core.calendar"
          ],
          "summary_plain": "Adds up daily numbers into one number per week (or month), so that every row covers the same length of time.",
          "title": "Weekly totals",
          "typical_runtime": "instant",
          "use_when": [
            "Your data is daily but you want to plan or report by week"
          ]
        }
      ],
      "properties": {
        "assumptions": {
          "items": {
            "type": "string"
          },
          "maxItems": 10,
          "minItems": 1,
          "title": "Assumptions",
          "type": "array"
        },
        "avoid_when": {
          "items": {
            "type": "string"
          },
          "maxItems": 10,
          "minItems": 1,
          "title": "Avoid When",
          "type": "array"
        },
        "data_needs": {
          "items": {
            "type": "string"
          },
          "maxItems": 10,
          "minItems": 1,
          "title": "Data Needs",
          "type": "array"
        },
        "difficulty": {
          "$ref": "#/$defs/Difficulty"
        },
        "example": {
          "description": "A tiny example",
          "maxLength": 600,
          "minLength": 10,
          "title": "Example",
          "type": "string"
        },
        "expert_notes": {
          "anyOf": [
            {
              "maxLength": 4000,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Maths, estimator details, caveats for experts",
          "title": "Expert Notes"
        },
        "fits": {
          "additionalProperties": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "description": "Chooser tags: question id -> the answers this item suits",
          "maxProperties": 16,
          "title": "Fits",
          "type": "object"
        },
        "outputs": {
          "items": {
            "type": "string"
          },
          "maxItems": 10,
          "minItems": 1,
          "title": "Outputs",
          "type": "array"
        },
        "references": {
          "items": {
            "$ref": "#/$defs/AboutReference"
          },
          "maxItems": 10,
          "title": "References",
          "type": "array"
        },
        "related": {
          "description": "Ids of related catalog items (models, steps, nodes, checks, templates)",
          "items": {
            "type": "string"
          },
          "maxItems": 16,
          "title": "Related",
          "type": "array"
        },
        "summary_plain": {
          "description": "One or two sentences without jargon: what it does for you",
          "maxLength": 400,
          "minLength": 20,
          "title": "Summary Plain",
          "type": "string"
        },
        "title": {
          "description": "A human name",
          "maxLength": 80,
          "minLength": 3,
          "title": "Title",
          "type": "string"
        },
        "typical_runtime": {
          "$ref": "#/$defs/TypicalRuntime"
        },
        "use_when": {
          "items": {
            "type": "string"
          },
          "maxItems": 10,
          "minItems": 1,
          "title": "Use When",
          "type": "array"
        }
      },
      "required": [
        "title",
        "summary_plain",
        "use_when",
        "avoid_when",
        "data_needs",
        "assumptions",
        "outputs",
        "difficulty",
        "typical_runtime",
        "example"
      ],
      "title": "About",
      "type": "object"
    },
    "AboutReference": {
      "additionalProperties": false,
      "description": "A source for the expert detail (a paper, a book chapter, library documentation).",
      "properties": {
        "title": {
          "maxLength": 300,
          "minLength": 3,
          "title": "Title",
          "type": "string"
        },
        "url": {
          "anyOf": [
            {
              "maxLength": 500,
              "pattern": "^https://\\S+$",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Url"
        }
      },
      "required": [
        "title"
      ],
      "title": "AboutReference",
      "type": "object"
    },
    "Difficulty": {
      "description": "How much statistical background an item needs to use well.",
      "enum": [
        "beginner",
        "intermediate",
        "expert"
      ],
      "title": "Difficulty",
      "type": "string"
    },
    "JsonValue": {},
    "StepKind": {
      "description": "RESHAPE changes structure (not invertible past it); VALUE rescales; FEATURE adds.",
      "enum": [
        "reshape",
        "value",
        "feature"
      ],
      "title": "StepKind",
      "type": "string"
    },
    "TypicalRuntime": {
      "description": "Rough wall-clock time on typical data (``S`` resource class).",
      "enum": [
        "instant",
        "seconds",
        "minutes",
        "long"
      ],
      "title": "TypicalRuntime",
      "type": "string"
    }
  },
  "$id": "https://schemas.mapi.dev/v1/catalog-step.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "description": "Everything static validation needs to know about one step version.\n\n``effect`` and ``context`` are JSON templates over the step's settings (see\n:mod:`mapi_spec.template`). ``var_params``/``dim_params`` name settings fields whose\nvalues are variable/dim names that must exist at the step's input stage, and\n``side_table_params`` name fields that refer to ``data.side_tables`` entries.",
  "properties": {
    "about": {
      "anyOf": [
        {
          "$ref": "#/$defs/About"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "M3.5: the plain-language About card (the catalog rule requires one)"
    },
    "context": {
      "anyOf": [
        {
          "additionalProperties": {
            "$ref": "#/$defs/JsonValue"
          },
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Context"
    },
    "depends_on_target": {
      "default": false,
      "title": "Depends On Target",
      "type": "boolean"
    },
    "dim_params": {
      "items": {
        "type": "string"
      },
      "title": "Dim Params",
      "type": "array"
    },
    "effect": {
      "additionalProperties": {
        "$ref": "#/$defs/JsonValue"
      },
      "title": "Effect",
      "type": "object"
    },
    "id": {
      "title": "Id",
      "type": "string"
    },
    "invertible": {
      "default": false,
      "title": "Invertible",
      "type": "boolean"
    },
    "kind": {
      "$ref": "#/$defs/StepKind"
    },
    "provides": {
      "description": "Preprocessing a model may declare it owns (ModelManifest owns); such a step is rejected on the target/media variables of a model that owns it",
      "items": {
        "enum": [
          "scaling",
          "carryover"
        ],
        "type": "string"
      },
      "title": "Provides",
      "type": "array"
    },
    "settings_schema": {
      "additionalProperties": {
        "$ref": "#/$defs/JsonValue"
      },
      "title": "Settings Schema",
      "type": "object"
    },
    "side_table_params": {
      "items": {
        "type": "string"
      },
      "title": "Side Table Params",
      "type": "array"
    },
    "stateful": {
      "description": "Has a fitted State (fit on train only)",
      "title": "Stateful",
      "type": "boolean"
    },
    "summary": {
      "anyOf": [
        {
          "maxLength": 500,
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Summary"
    },
    "summary_plain": {
      "anyOf": [
        {
          "maxLength": 500,
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Summary Plain"
    },
    "target_vars_param": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "If set, the step depends on the target only when this settings field lists a target-role variable",
      "title": "Target Vars Param"
    },
    "var_params": {
      "items": {
        "type": "string"
      },
      "title": "Var Params",
      "type": "array"
    },
    "version": {
      "title": "Version",
      "type": "string"
    },
    "yanked": {
      "default": false,
      "title": "Yanked",
      "type": "boolean"
    }
  },
  "required": [
    "id",
    "version",
    "kind",
    "stateful"
  ],
  "title": "StepCatalogEntry",
  "type": "object",
  "x-mapi-contract-version": "0.2"
}
