MonkeyData#
- pydantic model mobu.models.monkey.MonkeyData#
Data for a running monkey.
- Parameters:
data (
Any
)
Show JSON schema
{ "title": "MonkeyData", "description": "Data for a running monkey.", "type": "object", "properties": { "name": { "title": "Name of the monkey", "type": "string" }, "state": { "$ref": "#/$defs/MonkeyState", "examples": [ "RUNNING" ], "title": "State of monkey" }, "user": { "$ref": "#/$defs/AuthenticatedUser", "title": "User as which the monkey is running" }, "business": { "anyOf": [ { "$ref": "#/$defs/TAPBusinessData" }, { "$ref": "#/$defs/SIABusinessData" }, { "$ref": "#/$defs/NotebookRunnerData" }, { "$ref": "#/$defs/NubladoBusinessData" }, { "$ref": "#/$defs/BusinessData" } ], "title": "Business execution data" } }, "$defs": { "AuthenticatedUser": { "description": "Represents an authenticated user with a token.", "properties": { "username": { "description": "Must start with 'bot-mobu'", "examples": [ "bot-mobu-testuser" ], "pattern": "^bot-mobu", "title": "Username", "type": "string" }, "uidnumber": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "If omitted, Gafaelfawr will assign a UID. (Gafaelfawr UID assignment requires Firestore be configured.)", "examples": [ 60001 ], "title": "Numeric UID" }, "gidnumber": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "If omitted but a UID was specified, use a GID equal to the UID. If both are omitted, Gafaelfawr will assign a UID and GID. (Gafaelfawr UID and GID assignment requires Firestore and synthetic user private groups to be configured.)", "examples": [ 60001 ], "title": "Primary GID" }, "groups": { "default": [], "description": "Groups of which the user is a member", "items": { "$ref": "#/$defs/Group" }, "title": "Groups", "type": "array" }, "scopes": { "examples": [ [ "exec:notebook", "read:tap" ] ], "items": { "type": "string" }, "title": "Token scopes", "type": "array" }, "token": { "examples": [ "gt-1PhgAeB-9Fsa-N1NhuTu_w.oRvMvAQp1bWfx8KCJKNohg" ], "title": "Authentication token for user", "type": "string" } }, "required": [ "username", "scopes", "token" ], "title": "AuthenticatedUser", "type": "object" }, "BusinessData": { "additionalProperties": false, "description": "Status of a running business.\n\nEach type of business with additional data should create a new type\ninheriting from this type and adding that information.", "properties": { "name": { "examples": [ "Business" ], "title": "Type of business", "type": "string" }, "failure_count": { "examples": [ 0 ], "title": "Number of failures", "type": "integer" }, "success_count": { "examples": [ 25 ], "title": "Number of successes", "type": "integer" }, "refreshing": { "title": "If the business is currently in the process of refreshing", "type": "boolean" } }, "required": [ "name", "failure_count", "success_count", "refreshing" ], "title": "BusinessData", "type": "object" }, "Group": { "description": "Configuration for the group memberships of a user.", "properties": { "name": { "examples": [ "g_special_users" ], "minLength": 1, "pattern": "^g_", "title": "Name of the group", "type": "string" }, "id": { "examples": [ 123181 ], "title": "Numeric GID of the group", "type": "integer" } }, "required": [ "name", "id" ], "title": "Group", "type": "object" }, "MonkeyState": { "description": "State of a running monkey.", "enum": [ "IDLE", "RUNNING", "STOPPING", "FINISHED", "ERROR" ], "title": "MonkeyState", "type": "string" }, "NotebookRunnerData": { "additionalProperties": false, "description": "Status of a running NotebookRunner business.", "properties": { "name": { "examples": [ "Business" ], "title": "Type of business", "type": "string" }, "failure_count": { "examples": [ 0 ], "title": "Number of failures", "type": "integer" }, "success_count": { "examples": [ 25 ], "title": "Number of successes", "type": "integer" }, "refreshing": { "title": "If the business is currently in the process of refreshing", "type": "boolean" }, "image": { "anyOf": [ { "$ref": "#/$defs/RunningImage" }, { "type": "null" } ], "default": null, "description": "Will only be present when there is an active Jupyter lab", "title": "Jupyter lab image information" }, "notebook": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Will not be present if no notebook is being executed", "examples": [ "cluster.ipynb" ], "title": "Name of the currently running notebook" }, "running_code": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Will not be present if no code is being executed", "examples": [ "import json\nprint(json.dumps({\"foo\": \"bar\"})\n" ], "title": "Currently running code" } }, "required": [ "name", "failure_count", "success_count", "refreshing" ], "title": "NotebookRunnerData", "type": "object" }, "NubladoBusinessData": { "additionalProperties": false, "description": "Status of a running Nublado business.", "properties": { "name": { "examples": [ "Business" ], "title": "Type of business", "type": "string" }, "failure_count": { "examples": [ 0 ], "title": "Number of failures", "type": "integer" }, "success_count": { "examples": [ 25 ], "title": "Number of successes", "type": "integer" }, "refreshing": { "title": "If the business is currently in the process of refreshing", "type": "boolean" }, "image": { "anyOf": [ { "$ref": "#/$defs/RunningImage" }, { "type": "null" } ], "default": null, "description": "Will only be present when there is an active Jupyter lab", "title": "Jupyter lab image information" } }, "required": [ "name", "failure_count", "success_count", "refreshing" ], "title": "NubladoBusinessData", "type": "object" }, "RunningImage": { "description": "Information about the running Jupyter lab image.", "properties": { "reference": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Docker reference for the image" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Human-readable description of the image" } }, "title": "RunningImage", "type": "object" }, "SIABusinessData": { "additionalProperties": false, "description": "Status of a running SIA business.", "properties": { "name": { "examples": [ "Business" ], "title": "Type of business", "type": "string" }, "failure_count": { "examples": [ 0 ], "title": "Number of failures", "type": "integer" }, "success_count": { "examples": [ 25 ], "title": "Number of successes", "type": "integer" }, "refreshing": { "title": "If the business is currently in the process of refreshing", "type": "boolean" }, "running_query": { "anyOf": [ { "$ref": "#/$defs/SIAQuery" }, { "type": "null" } ], "default": null, "description": "Will not be present if no query is being executed", "title": "Currently running query" } }, "required": [ "name", "failure_count", "success_count", "refreshing" ], "title": "SIABusinessData", "type": "object" }, "SIAQuery": { "description": "The parameters of an SIA (v2) query.", "properties": { "ra": { "title": "Ra", "type": "number" }, "dec": { "title": "Dec", "type": "number" }, "radius": { "title": "Radius", "type": "number" }, "time": { "items": { "type": "number" }, "title": "Time", "type": "array" } }, "required": [ "ra", "dec", "radius", "time" ], "title": "SIAQuery", "type": "object" }, "TAPBusinessData": { "additionalProperties": false, "description": "Status of a running TAPQueryRunner business.", "properties": { "name": { "examples": [ "Business" ], "title": "Type of business", "type": "string" }, "failure_count": { "examples": [ 0 ], "title": "Number of failures", "type": "integer" }, "success_count": { "examples": [ 25 ], "title": "Number of successes", "type": "integer" }, "refreshing": { "title": "If the business is currently in the process of refreshing", "type": "boolean" }, "running_query": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Will not be present if no query is being executed", "title": "Currently running query" } }, "required": [ "name", "failure_count", "success_count", "refreshing" ], "title": "TAPBusinessData", "type": "object" } }, "required": [ "name", "state", "user", "business" ] }
- Fields:
-
field business:
TAPBusinessData
|SIABusinessData
|NotebookRunnerData
|NubladoBusinessData
|BusinessData
[Required]#
-
field state:
MonkeyState
[Required]#
-
field user:
AuthenticatedUser
[Required]#