opentf-toolkit-nightly 0.56.0.dev969__py3-none-any.whl → 0.56.0.dev976__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -126,7 +126,9 @@ def _has_testresult(item: Dict[str, Any]) -> bool:
126
126
 
127
127
 
128
128
  def _get_workflow_jobs(events: List[Dict[str, Any]]) -> Dict[str, Any]:
129
- """yada
129
+ """Get workflow jobs that have steps.
130
+
131
+ TOTO Will have to be reviewed when adding nested generators.
130
132
 
131
133
  # Required parameters
132
134
 
@@ -136,14 +138,32 @@ def _get_workflow_jobs(events: List[Dict[str, Any]]) -> Dict[str, Any]:
136
138
 
137
139
  A dictionary. Keys are job names, values are a (dict, event) pair.
138
140
 
139
- _event_ is either a workflow or a generatorresult event.
141
+ - name: a string, the job's name and the generator's job_id, if any
142
+ - job: a dictionary (its `runs-on` entry is a list of strings)
143
+ - event: either a workflow or a generatorresult event.
140
144
  """
141
- return {
142
- job_name + ' ' + event['metadata'].get('job_id', ''): (job, event)
145
+
146
+ def _clean(j):
147
+ j['runs-on'] = _as_list(j.get('runs-on', []))
148
+ return j
149
+
150
+ jobs = {
151
+ job_name + ' ' + event['metadata'].get('job_id', ''): (_clean(job), event)
143
152
  for event in filter(lambda x: x['kind'] in (WORKFLOW, GENERATORRESULT), events)
144
153
  for job_name, job in event.get('jobs', {}).items()
145
- if job.get('steps')
146
154
  }
155
+ for job_name, (job, event) in jobs.items():
156
+ if ' ' not in job_name.strip():
157
+ # we do not have to patch top-level jobs
158
+ continue
159
+ if not event['metadata']['job_origin']:
160
+ job['runs-on'] = list(
161
+ set(
162
+ job['runs-on'] + jobs[event['metadata']['name'] + ' '][0]['runs-on']
163
+ )
164
+ )
165
+
166
+ return {name: (job, event) for name, (job, event) in jobs.items() if 'steps' in job}
147
167
 
148
168
 
149
169
  def _uses_inception(events: List[Dict[str, Any]]) -> bool:
@@ -307,7 +327,7 @@ def _create_testresult_labels(
307
327
  'test': {
308
328
  'job': job_name.split()[0],
309
329
  'managed': False,
310
- 'runs-on': _as_list(job['runs-on']),
330
+ 'runs-on': job['runs-on'],
311
331
  'technology': exec_step['uses'].partition('/')[0],
312
332
  'test': exec_step.get('with', {}).get('test'),
313
333
  'uses': exec_step['uses'],
@@ -125,7 +125,10 @@
125
125
  "enum": [
126
126
  "SummaryBlock",
127
127
  "Cloud",
128
- "Table"
128
+ "Table",
129
+ "ProgressBar",
130
+ "BarChart",
131
+ "ScatterChart"
129
132
  ]
130
133
  },
131
134
  "datasource": {
@@ -151,6 +154,94 @@
151
154
  },
152
155
  "skipIfNotFound": {
153
156
  "type": "boolean"
157
+ },
158
+ "groupBy": {
159
+ "type": "string"
160
+ },
161
+ "data": {
162
+ "type": "string"
163
+ },
164
+ "aggregateFunction": {
165
+ "type": "string",
166
+ "enum": [
167
+ "count",
168
+ "sum",
169
+ "avg",
170
+ "min",
171
+ "max"
172
+ ]
173
+ },
174
+ "orderBy": {
175
+ "type": "object",
176
+ "minItems": 1,
177
+ "properties": {
178
+ "key": {
179
+ "type": "string"
180
+ },
181
+ "order": {
182
+ "type": "string"
183
+ }
184
+ },
185
+ "required": ["key"],
186
+ "additionalProperties": false
187
+ },
188
+ "maxItems": {
189
+ "type": "number"
190
+ },
191
+ "secondaryAxis": {
192
+ "type": "object",
193
+ "minItems": 1,
194
+ "properties": {
195
+ "min": {
196
+ "type": "number"
197
+ },
198
+ "max": {
199
+ "type": "number"
200
+ },
201
+ "title": {
202
+ "type": "string"
203
+ },
204
+ "data": {
205
+ "type": "string"
206
+ },
207
+ "ticks": {
208
+ "type": "string"
209
+ }
210
+ },
211
+ "additionalProperties": false
212
+ },
213
+ "legend": {"type": "string"},
214
+ "orientation": {
215
+ "type": "string",
216
+ "enum": [
217
+ "horizontal",
218
+ "vertical"
219
+ ]
220
+ },
221
+ "primaryAxis": {
222
+ "type": "object",
223
+ "minItems": 1,
224
+ "properties": {
225
+ "min": {
226
+ "type": "number"
227
+ },
228
+ "max": {
229
+ "type": "number"
230
+ },
231
+ "title": {
232
+ "type": "string"
233
+ },
234
+ "data": {
235
+ "type": "string"
236
+ },
237
+ "ticks": {
238
+ "type": "string"
239
+ },
240
+ "reversed": {
241
+ "type": "boolean"
242
+ }
243
+ },
244
+ "additionalProperties": false
154
245
  }
155
246
  },
156
247
  "required": [
@@ -230,6 +321,114 @@
230
321
  "datasource"
231
322
  ]
232
323
  }
324
+ },
325
+ {
326
+ "if": {
327
+ "properties": {
328
+ "kind": {
329
+ "const": "ProgressBar"
330
+ }
331
+ },
332
+ "required": [
333
+ "kind"
334
+ ]
335
+ },
336
+ "then": {
337
+ "properties": {
338
+ "groupBy": {
339
+ "type": "string"
340
+ },
341
+ "datasource": {
342
+ "type": "string"
343
+ }
344
+ },
345
+ "required": [
346
+ "groupBy", "datasource"
347
+ ]
348
+ }
349
+ },
350
+ {
351
+ "if": {
352
+ "properties": {
353
+ "kind": {
354
+ "const": "BarChart"
355
+ }
356
+ },
357
+ "required": [
358
+ "kind"
359
+ ]
360
+ },
361
+ "then": {
362
+ "properties": {
363
+ "datasource": {
364
+ "type": "string"
365
+ },
366
+ "secondaryAxis": {
367
+ "type": "object",
368
+ "minItems": 1,
369
+ "properties": {
370
+ "min": {"type": "number"},
371
+ "max": {"type": "number"},
372
+ "title": {"type": "string"},
373
+ "ticks": {"type": "string"},
374
+ "data": {"type": "string"}
375
+ },
376
+ "required": ["data"],
377
+ "additionalProperties": false
378
+ },
379
+ "primaryAxis": {
380
+ "type": "object",
381
+ "minItems": 1,
382
+ "properties": {
383
+ "data": {"type": "string"},
384
+ "title": {"type": "string"},
385
+ "reversed": {"type": "boolean"}
386
+ },
387
+ "required": ["data"]
388
+ }
389
+ },
390
+ "required": [
391
+ "datasource", "secondaryAxis", "primaryAxis"
392
+ ]
393
+ }
394
+ },
395
+ {
396
+ "if": {
397
+ "properties": {
398
+ "kind": {
399
+ "const": "ScatterChart"
400
+ }
401
+ },
402
+ "required": [
403
+ "kind"
404
+ ]
405
+ },
406
+ "then": {
407
+ "properties": {
408
+ "groupBy": {
409
+ "type": "string"
410
+ },
411
+ "datasource": {
412
+ "type": "string"
413
+ },
414
+ "primaryAxis": {
415
+ "type": "object",
416
+ "minItems": 1,
417
+ "properties": {
418
+ "min": {"type": "number"},
419
+ "max": {"type": "number"},
420
+ "title": {"type": "string"},
421
+ "ticks": {"type": "string"},
422
+ "data": {"type": "string"}
423
+ },
424
+ "required": ["data"],
425
+ "additionalProperties": false
426
+ }
427
+ },
428
+ "required": [
429
+ "groupBy", "datasource", "primaryAxis"
430
+ ]
431
+ }
233
432
  }
234
433
  ]
235
434
  }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: opentf-toolkit-nightly
3
- Version: 0.56.0.dev969
3
+ Version: 0.56.0.dev976
4
4
  Summary: OpenTestFactory Orchestrator Toolkit
5
5
  Home-page: https://gitlab.com/henixdevelopment/open-source/opentestfactory/python-toolkit
6
6
  Author: Martin Lafaix
@@ -1,7 +1,7 @@
1
1
  opentf/commons/__init__.py,sha256=KRY8ShQw_0ZZ0oEOiKi4-xnWofE_QsFjEe1T8wUxJ-w,21952
2
2
  opentf/commons/auth.py,sha256=bM2Z3kxm2Wku1lKXaRAIg37LHvXWAXIZIqjplDfN2P8,15899
3
3
  opentf/commons/config.py,sha256=GmvInVnUsXIwlNfgTQeQ_pPs97GeGTGn2S2QZEFwss8,7828
4
- opentf/commons/datasources.py,sha256=8qWC6KFiFGiIOEH7FGdbP_4hd_gVJFxbpR-051rhNZI,24452
4
+ opentf/commons/datasources.py,sha256=So0G1AURM7ceo93qom6Gfs73BW0924vmgcrt9iOrPZs,25224
5
5
  opentf/commons/expressions.py,sha256=A68F27Our8oVVphUrRvB5haSlqj2YCrH2OxHPNLBio4,19251
6
6
  opentf/commons/pubsub.py,sha256=7khxAHVZiwJRcwIBJ6MPR-f3xY9144-2eNLROwq5F-4,5894
7
7
  opentf/commons/schemas.py,sha256=lokZCU-wmsIkzVA-TVENtC7Io_GmYxrP-FQaOOowg4s,4044
@@ -17,7 +17,7 @@ opentf/schemas/opentestfactory.org/v1alpha1/ExecutionError.json,sha256=tz8ZggvjS
17
17
  opentf/schemas/opentestfactory.org/v1alpha1/ExecutionResult.json,sha256=aF9PbJADupP_m_TfNRqpeayi1_nCj5Ll2_vDCcJWMkY,3050
18
18
  opentf/schemas/opentestfactory.org/v1alpha1/GeneratorCommand.json,sha256=uxbqDhP4newgz-85TnGKbchx448QEQ8WB5PXpcJy2ME,1754
19
19
  opentf/schemas/opentestfactory.org/v1alpha1/GeneratorResult.json,sha256=LkHLGt2uam1Q5Ux0zP_O9oFgxBMCjD3Th3BsfsXxd1g,6633
20
- opentf/schemas/opentestfactory.org/v1alpha1/InsightCollector.json,sha256=zxjX0DP1tun60ZZWfenw4d_cNNbOZLLhfgNiw1kXLVM,8565
20
+ opentf/schemas/opentestfactory.org/v1alpha1/InsightCollector.json,sha256=emE0My2cYBRnfA8L3_eY8yOXbSErV4TlwmQbRCgT4O8,16770
21
21
  opentf/schemas/opentestfactory.org/v1alpha1/Notification.json,sha256=XlzvDxg1V1bJJDX__K-lXibDYpqZIjgJHL96OJFaAKo,3790
22
22
  opentf/schemas/opentestfactory.org/v1alpha1/PluginMetadata.json,sha256=BLklO7CObT4OpAEsQT60WJ1ttOcG71hIYzgN-e7Ch9k,2803
23
23
  opentf/schemas/opentestfactory.org/v1alpha1/ProviderCommand.json,sha256=soe0imdnnq1mfGEpcLJvF3JVUIrF-7FFECc7CzNzobI,2875
@@ -48,8 +48,8 @@ opentf/scripts/startup.py,sha256=Da2zo93pBWbdRmj-wgekgLcF94rpNc3ZkbvR8R0w8XY,212
48
48
  opentf/toolkit/__init__.py,sha256=g3DiTZlSvvzZWKgM8qU47muLqjQrpWZ6M6PWZ-sBsvQ,19610
49
49
  opentf/toolkit/channels.py,sha256=Cng3b4LUsxvCHUbp_skys9CFcKZMfcKhA_ODg_EAlIE,17156
50
50
  opentf/toolkit/core.py,sha256=L1fT4YzwZjqE7PUXhJL6jSVQge3ohBQv5UBb9DAC6oo,9320
51
- opentf_toolkit_nightly-0.56.0.dev969.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
52
- opentf_toolkit_nightly-0.56.0.dev969.dist-info/METADATA,sha256=H921uFHJ3E6Mh2pFplFhDN4KBVg-uYpWcjiw3WPpspE,1945
53
- opentf_toolkit_nightly-0.56.0.dev969.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
54
- opentf_toolkit_nightly-0.56.0.dev969.dist-info/top_level.txt,sha256=_gPuE6GTT6UNXy1DjtmQSfCcZb_qYA2vWmjg7a30AGk,7
55
- opentf_toolkit_nightly-0.56.0.dev969.dist-info/RECORD,,
51
+ opentf_toolkit_nightly-0.56.0.dev976.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
52
+ opentf_toolkit_nightly-0.56.0.dev976.dist-info/METADATA,sha256=vw5X4xlCfJqkpRKVFe7xoBWyHbWV5_1qgC5UwvvZM7k,1945
53
+ opentf_toolkit_nightly-0.56.0.dev976.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
54
+ opentf_toolkit_nightly-0.56.0.dev976.dist-info/top_level.txt,sha256=_gPuE6GTT6UNXy1DjtmQSfCcZb_qYA2vWmjg7a30AGk,7
55
+ opentf_toolkit_nightly-0.56.0.dev976.dist-info/RECORD,,