dgbowl_schemas.dgpost.recipe_2_2 package
- pydantic model dgbowl_schemas.dgpost.recipe_2_2.Recipe
Bases:
Recipe
Show JSON schema
{ "title": "Recipe", "type": "object", "properties": { "version": { "const": "2.2", "title": "Version", "type": "string" }, "load": { "anyOf": [ { "items": { "$ref": "#/$defs/Load" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Load" }, "extract": { "anyOf": [ { "items": { "$ref": "#/$defs/Extract" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Extract" }, "pivot": { "anyOf": [ { "items": { "$ref": "#/$defs/Pivot" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Pivot" }, "transform": { "anyOf": [ { "items": { "$ref": "#/$defs/Transform" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Transform" }, "plot": { "anyOf": [ { "items": { "$ref": "#/$defs/Plot" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Plot" }, "save": { "anyOf": [ { "items": { "$ref": "#/$defs/Save" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Save" } }, "$defs": { "At": { "additionalProperties": false, "properties": { "steps": { "default": null, "items": { "type": "string" }, "title": "Steps", "type": "array" }, "indices": { "default": null, "items": { "type": "integer" }, "title": "Indices", "type": "array" }, "timestamps": { "default": null, "items": { "type": "number" }, "title": "Timestamps", "type": "array" } }, "title": "At", "type": "object" }, "AxArgs": { "additionalProperties": true, "properties": { "cols": { "anyOf": [ { "maxItems": 2, "minItems": 2, "prefixItems": [ { "type": "integer" }, { "type": "integer" } ], "type": "array" }, { "type": "null" } ], "default": null, "title": "Cols" }, "rows": { "anyOf": [ { "maxItems": 2, "minItems": 2, "prefixItems": [ { "type": "integer" }, { "type": "integer" } ], "type": "array" }, { "type": "null" } ], "default": null, "title": "Rows" }, "series": { "items": { "$ref": "#/$defs/Series" }, "title": "Series", "type": "array" }, "methods": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "title": "Methods" }, "legend": { "default": false, "title": "Legend", "type": "boolean" } }, "required": [ "series" ], "title": "AxArgs", "type": "object" }, "Column": { "additionalProperties": false, "properties": { "key": { "title": "Key", "type": "string" }, "as": { "title": "As", "type": "string" } }, "required": [ "key", "as" ], "title": "Column", "type": "object" }, "Constant": { "additionalProperties": false, "properties": { "value": { "title": "Value" }, "as": { "title": "As", "type": "string" }, "units": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Units" } }, "required": [ "value", "as" ], "title": "Constant", "type": "object" }, "Extract": { "additionalProperties": false, "description": "Extract columns from loaded files into tables, interpolate as necessary.", "properties": { "into": { "title": "Into", "type": "string" }, "from": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "From" }, "at": { "anyOf": [ { "$ref": "#/$defs/At" }, { "type": "null" } ], "default": null }, "columns": { "anyOf": [ { "items": { "$ref": "#/$defs/Column" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Columns" }, "constants": { "anyOf": [ { "items": { "$ref": "#/$defs/Constant" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Constants" } }, "required": [ "into" ], "title": "Extract", "type": "object" }, "Load": { "additionalProperties": false, "description": "Select external files (``NetCDF`` or ``json`` datagrams, ``pkl`` tables) to load.", "properties": { "as": { "title": "As", "type": "string" }, "path": { "title": "Path", "type": "string" }, "type": { "default": "datagram", "enum": [ "netcdf", "datagram", "table" ], "title": "Type", "type": "string" }, "check": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Check" } }, "required": [ "as", "path" ], "title": "Load", "type": "object" }, "Pivot": { "additionalProperties": false, "description": "Reorder tables by grouping rows into arrays using columns as indices.", "properties": { "table": { "title": "Table", "type": "string" }, "as": { "title": "As", "type": "string" }, "using": { "anyOf": [ { "type": "string" }, { "items": { "type": "string" }, "type": "array" } ], "title": "Using" }, "columns": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Columns" }, "timestamp": { "default": "first", "enum": [ "first", "last", "mean" ], "title": "Timestamp", "type": "string" }, "timedelta": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Timedelta" } }, "required": [ "table", "as", "using" ], "title": "Pivot", "type": "object" }, "Plot": { "additionalProperties": false, "description": "Plot data from a single table.", "properties": { "table": { "title": "Table", "type": "string" }, "nrows": { "default": 1, "title": "Nrows", "type": "integer" }, "ncols": { "default": 1, "title": "Ncols", "type": "integer" }, "fig_args": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "title": "Fig Args" }, "ax_args": { "items": { "$ref": "#/$defs/AxArgs" }, "title": "Ax Args", "type": "array" }, "style": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "title": "Style" }, "save": { "anyOf": [ { "$ref": "#/$defs/PlotSave" }, { "type": "null" } ], "default": null } }, "required": [ "table", "ax_args" ], "title": "Plot", "type": "object" }, "PlotSave": { "additionalProperties": true, "properties": { "as": { "title": "As", "type": "string" }, "tight_layout": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "title": "Tight Layout" } }, "required": [ "as" ], "title": "PlotSave", "type": "object" }, "Save": { "additionalProperties": false, "description": "Save a table into an external (``pkl``, ``xlsx``) file.", "properties": { "table": { "title": "Table", "type": "string" }, "as": { "title": "As", "type": "string" }, "type": { "anyOf": [ { "enum": [ "pkl", "json", "xlsx", "csv", "nc" ], "type": "string" }, { "type": "null" } ], "default": null, "title": "Type" }, "columns": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Columns" }, "sigma": { "default": true, "title": "Sigma", "type": "boolean" } }, "required": [ "table", "as" ], "title": "Save", "type": "object" }, "Series": { "additionalProperties": true, "properties": { "y": { "title": "Y", "type": "string" }, "x": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "X" }, "kind": { "default": "scatter", "enum": [ "scatter", "line", "errorbar" ], "title": "Kind", "type": "string" }, "index": { "anyOf": [ { "$ref": "#/$defs/SeriesIndex" }, { "type": "null" } ], "default": { "from_zero": true, "to_units": null } } }, "required": [ "y" ], "title": "Series", "type": "object" }, "SeriesIndex": { "additionalProperties": false, "properties": { "from_zero": { "default": true, "title": "From Zero", "type": "boolean" }, "to_units": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "To Units" } }, "title": "SeriesIndex", "type": "object" }, "Transform": { "additionalProperties": false, "description": "Calculate and otherwise transform the data in the tables.", "properties": { "table": { "title": "Table", "type": "string" }, "with": { "title": "With", "type": "string" }, "using": { "items": { "type": "object" }, "title": "Using", "type": "array" } }, "required": [ "table", "with", "using" ], "title": "Transform", "type": "object" } }, "additionalProperties": false, "required": [ "version" ] }
- Config:
extra: str = forbid
- field version: Literal['2.2'] [Required]