Repository navigation
Expand file tree
/
Copy pathplugin-entry.schema.json
More file actions
157 lines (157 loc) · 5.05 KB
/
Copy pathplugin-entry.schema.json
File metadata and controls
157 lines (157 loc) · 5.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://datalab-platform.com/plugins/schema/plugin-entry.schema.json",
"title": "DataLab plugin catalog entry",
"description": "One file per plugin, named <id>.yaml, in the plugins folder.",
"type": "object",
"additionalProperties": false,
"required": ["id", "name", "repository", "releases"],
"properties": {
"id": {
"description": "Stable plugin ID, equal to PluginInfo.id. The org.datalab. prefix is reserved for DataLab-Platform plugins.",
"type": "string",
"pattern": "^[a-z0-9]+(?:[.-][a-z0-9]+)+$"
},
"name": {
"description": "Display name.",
"type": "string",
"minLength": 1,
"maxLength": 80
},
"kind": {
"description": "Distribution format, not a functional plugin category. Defaults to wheel.",
"enum": ["wheel", "module"]
},
"summary": {"type": "string", "minLength": 1},
"license": {"type": "string", "minLength": 1},
"repository": {
"description": "Public source repository, also used to find GitHub releases.",
"type": "string",
"pattern": "^https://github\\.com/[A-Za-z0-9-]+/[A-Za-z0-9._-]+$"
},
"documentation": {
"description": "Documentation URL, if different from the repository.",
"type": "string",
"pattern": "^https://"
},
"icon": {
"description": "Optional HTTPS URL of an existing image, displayed in the web catalog. Initials are used if the image cannot be loaded.",
"type": "string",
"pattern": "^https://[^/?#\\s]+(?:[/?#][^\\s]*)?$"
},
"capabilities": {
"type": "array",
"uniqueItems": true,
"items": {"enum": ["processing", "io", "visualization", "application"]}
},
"keywords": {
"type": "array",
"uniqueItems": true,
"maxItems": 10,
"items": {"type": "string", "minLength": 1, "maxLength": 40}
},
"status": {
"description": "deprecated: still installable, with a warning. revoked: no longer installable.",
"enum": ["active", "deprecated", "revoked"]
},
"status_reason": {"type": "string", "minLength": 1},
"releases": {
"type": "array",
"minItems": 1,
"items": {"$ref": "#/$defs/release"}
}
},
"allOf": [
{
"if": {"properties": {"kind": {"const": "module"}}, "required": ["kind"]},
"then": {
"required": ["summary", "license"],
"properties": {
"releases": {
"items": {
"required": ["filename"],
"properties": {
"source": {"const": "github"},
"dependency_wheels": {"maxItems": 0}
}
}
}
}
}
},
{
"if": {
"properties": {"status": {"enum": ["deprecated", "revoked"]}},
"required": ["status"]
},
"then": {"required": ["status_reason"]}
}
],
"$defs": {
"release": {
"type": "object",
"additionalProperties": false,
"required": ["version"],
"properties": {
"version": {"type": "string", "minLength": 1},
"filename": {
"description": "Exact GitHub release asset for a single-file module.",
"type": "string",
"pattern": "^datalab_[A-Za-z0-9_]+\\.py$"
},
"requires_python": {
"description": "Optional Python compatibility constraint for a module release.",
"type": "string"
},
"sha256": {
"description": "SHA-256 digest of the wheel. The catalog check prints it when missing.",
"type": "string",
"pattern": "^[0-9a-f]{64}$"
},
"source": {
"description": "Where the wheel is published (default: github).",
"enum": ["github", "pypi"]
},
"tag": {
"description": "GitHub release tag (default: v<version>).",
"type": "string",
"minLength": 1
},
"distribution": {
"description": "PyPI distribution name, required for the pypi source.",
"type": "string",
"minLength": 1
},
"yanked": {
"description": "Reason why this release should no longer be installed.",
"type": "string",
"minLength": 1
},
"dependency_wheels": {
"description": "Reviewed additional Desktop dependency wheels, including transitive dependencies.",
"type": "array",
"items": {"$ref": "#/$defs/dependency-wheel"}
}
},
"allOf": [
{
"if": {"properties": {"source": {"const": "pypi"}}, "required": ["source"]},
"then": {"required": ["distribution"]}
}
]
},
"dependency-wheel": {
"type": "object",
"additionalProperties": false,
"required": ["filename", "url", "sha256"],
"properties": {
"filename": {
"type": "string",
"pattern": "^[A-Za-z0-9][A-Za-z0-9_.+-]*\\.whl$"
},
"url": {"type": "string", "pattern": "^https://"},
"sha256": {"type": "string", "pattern": "^[0-9a-f]{64}$"}
}
}
}
}