UNPKG

8.83 kBJSONView Raw
1{
2 "title": "SoftwareSession",
3 "@id": "stencila:SoftwareSession",
4 "extends": "Thing",
5 "role": "primary",
6 "status": "experimental",
7 "category": "code",
8 "description": "Definition of a compute session, including its software and compute resource\nrequirements and status.\n",
9 "$comment": "Usually used to define the environment that is required to execute an\nexecutable document.\n\nThis is \"inspired\" by the [OCI Runtime Config Schema](https://github.com/opencontainers/runtime-spec/blob/master/schema/config-schema.json)\nThere are a number of properties that did not seem relevant to our use as well as some\nreferences that did not seem to be required. We try to stay consistent with the naming\nused but have dereferenced and combined the config schema and \n[Linux Schema](https://github.com/opencontainers/runtime-spec/blob/master/schema/defs-linux.json) \nto use the cpu and memory limits.\n",
10 "properties": {
11 "type": {
12 "@id": "schema:type",
13 "description": "The name of the type.",
14 "type": "string",
15 "enum": [
16 "SoftwareSession"
17 ],
18 "default": "SoftwareSession",
19 "from": "Entity"
20 },
21 "id": {
22 "@id": "schema:id",
23 "description": "The identifier for this item.",
24 "type": "string",
25 "from": "Entity"
26 },
27 "meta": {
28 "@id": "stencila:meta",
29 "description": "Metadata associated with this item.",
30 "type": "object",
31 "from": "Entity"
32 },
33 "alternateNames": {
34 "@id": "schema:alternateName",
35 "description": "Alternate names (aliases) for the item.",
36 "type": "array",
37 "items": {
38 "type": "string"
39 },
40 "from": "Thing",
41 "isArray": true,
42 "isPlural": true,
43 "aliases": [
44 "alternateName"
45 ]
46 },
47 "description": {
48 "@id": "schema:description",
49 "description": "A description of the item.",
50 "$comment": "Allows for the description to be an array of nodes (e.g. an array of inline content,\nor a couple of paragraphs), or a string. The `minItems` restriction avoids a string\nbeing coerced into an array with a single string item.\n",
51 "anyOf": [
52 {
53 "type": "array",
54 "items": {
55 "$ref": "BlockContent.schema.json"
56 }
57 },
58 {
59 "type": "array",
60 "items": {
61 "$ref": "InlineContent.schema.json"
62 },
63 "minItems": 2
64 },
65 {
66 "type": "string"
67 }
68 ],
69 "from": "Thing"
70 },
71 "identifiers": {
72 "@id": "schema:identifier",
73 "description": "Any kind of identifier for any kind of Thing.",
74 "$comment": "Some identifiers have specific properties e.g the `issn` property for\nthe `Periodical` type. These should be used in preference to this\nproperty which is intended for identifiers that do not yet have a\nspecific property. Identifiers can be represented as strings, but\nusing a `PropertyValue` will usually be better because it allows\nfor `propertyID` (i.e. the type of identifier).\n",
75 "type": "array",
76 "items": {
77 "anyOf": [
78 {
79 "$ref": "PropertyValue.schema.json"
80 },
81 {
82 "type": "string"
83 }
84 ]
85 },
86 "from": "Thing",
87 "isArray": true,
88 "isPlural": true,
89 "aliases": [
90 "identifier"
91 ]
92 },
93 "images": {
94 "@id": "schema:image",
95 "description": "Images of the item.",
96 "type": "array",
97 "items": {
98 "anyOf": [
99 {
100 "$ref": "ImageObject.schema.json"
101 },
102 {
103 "type": "string",
104 "format": "uri"
105 }
106 ]
107 },
108 "from": "Thing",
109 "isArray": true,
110 "isPlural": true,
111 "aliases": [
112 "image"
113 ]
114 },
115 "name": {
116 "@id": "schema:name",
117 "description": "The name of the item.",
118 "type": "string",
119 "from": "Thing"
120 },
121 "url": {
122 "@id": "schema:url",
123 "description": "The URL of the item.",
124 "type": "string",
125 "format": "uri",
126 "from": "Thing"
127 },
128 "environment": {
129 "@id": "stencila:environment",
130 "description": "The software environment to execute this session in.",
131 "allOf": [
132 {
133 "$ref": "SoftwareEnvironment.schema.json"
134 }
135 ],
136 "from": "SoftwareSession"
137 },
138 "dateStart": {
139 "@id": "schema:startDate",
140 "description": "The date-time that the session began.",
141 "allOf": [
142 {
143 "$ref": "Date.schema.json"
144 }
145 ],
146 "from": "SoftwareSession"
147 },
148 "dateEnd": {
149 "@id": "schema:endDate",
150 "description": "The date-time that the session ended.",
151 "allOf": [
152 {
153 "$ref": "Date.schema.json"
154 }
155 ],
156 "from": "SoftwareSession"
157 },
158 "status": {
159 "@id": "stencila:sessionStatus",
160 "description": "The status of the session (starting, stopped, etc).",
161 "enum": [
162 "Unknown",
163 "Starting",
164 "Started",
165 "Stopping",
166 "Stopped",
167 "Failed"
168 ],
169 "from": "SoftwareSession"
170 },
171 "clientsRequest": {
172 "@id": "stencila:clientsRequest",
173 "description": "The maximum number of concurrent clients requested for the session.",
174 "type": "number",
175 "minimum": 0,
176 "from": "SoftwareSession"
177 },
178 "clientsLimit": {
179 "@id": "stencila:clientsLimit",
180 "description": "The maximum number of concurrent clients the session is limited to.",
181 "type": "number",
182 "minimum": 0,
183 "from": "SoftwareSession"
184 },
185 "durationRequest": {
186 "@id": "stencila:durationRequest",
187 "description": "The maximum duration (seconds) requested for the session.",
188 "type": "number",
189 "minimum": 0,
190 "from": "SoftwareSession"
191 },
192 "durationLimit": {
193 "@id": "stencila:durationLimit",
194 "description": "The maximum duration (seconds) the session is limited to.",
195 "type": "number",
196 "minimum": 0,
197 "from": "SoftwareSession"
198 },
199 "timeoutRequest": {
200 "@id": "stencila:timeoutRequest",
201 "description": "The inactivity timeout (seconds) requested for the session.",
202 "type": "number",
203 "minimum": 0,
204 "from": "SoftwareSession"
205 },
206 "timeoutLimit": {
207 "@id": "stencila:timeoutLimit",
208 "description": "The inactivity timeout (seconds) the session is limited to.",
209 "type": "number",
210 "minimum": 0,
211 "from": "SoftwareSession"
212 },
213 "cpuRequest": {
214 "@id": "stencila:cpuRequest",
215 "description": "The amount of CPU requested for the session.",
216 "type": "number",
217 "minimum": 0,
218 "from": "SoftwareSession"
219 },
220 "cpuLimit": {
221 "@id": "stencila:cpuLimit",
222 "description": "The amount of CPU the session is limited to.",
223 "type": "number",
224 "minimum": 0,
225 "from": "SoftwareSession"
226 },
227 "memoryRequest": {
228 "@id": "stencila:memoryRequest",
229 "description": "The amount of memory requested for the session.",
230 "type": "number",
231 "minimum": 0,
232 "from": "SoftwareSession"
233 },
234 "memoryLimit": {
235 "@id": "stencila:memoryLimit",
236 "description": "The amount of memory that the session is limited to.",
237 "type": "number",
238 "minimum": 0,
239 "from": "SoftwareSession"
240 },
241 "networkTransferRequest": {
242 "@id": "stencila:networkTransferRequest",
243 "description": "The amount of network data transfer (GiB) requested for the session.",
244 "type": "number",
245 "minimum": 0,
246 "from": "SoftwareSession"
247 },
248 "networkTransferLimit": {
249 "@id": "stencila:networkTransferLimit",
250 "description": "The amount of network data transfer (GiB) that the session is limited to.",
251 "type": "number",
252 "minimum": 0,
253 "from": "SoftwareSession"
254 },
255 "volumeMounts": {
256 "@id": "stencila:volumeMounts",
257 "description": "Volumes to mount in the session.",
258 "type": "array",
259 "items": {
260 "$ref": "VolumeMount.schema.json"
261 },
262 "from": "SoftwareSession",
263 "isArray": true,
264 "isPlural": true,
265 "aliases": [
266 "volumeMount"
267 ]
268 }
269 },
270 "file": "SoftwareSession.schema.yaml",
271 "children": [],
272 "descendants": [],
273 "$schema": "http://json-schema.org/draft-07/schema#",
274 "$id": "https://schema.stenci.la/v1/SoftwareSession.schema.json",
275 "source": "https://github.com/stencila/schema/blob/master/schema/SoftwareSession.schema.yaml",
276 "type": "object",
277 "propertyAliases": {
278 "alternateName": "alternateNames",
279 "identifier": "identifiers",
280 "image": "images",
281 "volumeMount": "volumeMounts"
282 },
283 "additionalProperties": false,
284 "required": [
285 "type"
286 ]
287}