cannect 1.0.0__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.
Files changed (58) hide show
  1. cannect/__init__.py +30 -0
  2. cannect/api/__init__.py +0 -0
  3. cannect/config.py +114 -0
  4. cannect/core/__init__.py +0 -0
  5. cannect/core/ascet/__init__.py +3 -0
  6. cannect/core/ascet/amd.py +698 -0
  7. cannect/core/ascet/formula.py +33 -0
  8. cannect/core/ascet/oid.py +29 -0
  9. cannect/core/ascet/ws.py +154 -0
  10. cannect/core/can/__init__.py +2 -0
  11. cannect/core/can/ascet/__init__.py +3 -0
  12. cannect/core/can/ascet/_db2code.py +344 -0
  13. cannect/core/can/ascet/_db2elem.py +399 -0
  14. cannect/core/can/ascet/comdef.py +256 -0
  15. cannect/core/can/ascet/comrx.py +139 -0
  16. cannect/core/can/ascet/diag.py +691 -0
  17. cannect/core/can/db/__init__.py +4 -0
  18. cannect/core/can/db/reader.py +148 -0
  19. cannect/core/can/db/schema.py +269 -0
  20. cannect/core/can/db/specification/__init__.py +0 -0
  21. cannect/core/can/db/specification/message.py +230 -0
  22. cannect/core/can/db/specification/styles.py +81 -0
  23. cannect/core/can/db/specification/wrapper.py +161 -0
  24. cannect/core/can/db/vcs.py +104 -0
  25. cannect/core/can/rule.py +229 -0
  26. cannect/core/can/testcase/__init__.py +0 -0
  27. cannect/core/can/testcase/unitcase/__init__.py +0 -0
  28. cannect/core/can/testcase/unitcase/asw2can.py +48 -0
  29. cannect/core/can/testcase/unitcase/decode.py +63 -0
  30. cannect/core/can/testcase/unitcase/diagnosis.py +479 -0
  31. cannect/core/can/testcase/unitcase/encode.py +60 -0
  32. cannect/core/ir/__init__.py +2 -0
  33. cannect/core/ir/changehistory.py +310 -0
  34. cannect/core/ir/delivereables.py +71 -0
  35. cannect/core/ir/diff.py +97 -0
  36. cannect/core/ir/ir.py +581 -0
  37. cannect/core/ir/sdd.py +148 -0
  38. cannect/core/mdf.py +66 -0
  39. cannect/core/subversion.py +136 -0
  40. cannect/core/testcase/__init__.py +3 -0
  41. cannect/core/testcase/plotter.py +181 -0
  42. cannect/core/testcase/style.py +981 -0
  43. cannect/core/testcase/testcase.py +160 -0
  44. cannect/core/testcase/unitcase.py +227 -0
  45. cannect/errors.py +20 -0
  46. cannect/schema/__init__.py +5 -0
  47. cannect/schema/candb.py +226 -0
  48. cannect/schema/datadictionary.py +60 -0
  49. cannect/utils/__init__.py +3 -0
  50. cannect/utils/excel.py +29 -0
  51. cannect/utils/logger.py +81 -0
  52. cannect/utils/ppt.py +236 -0
  53. cannect/utils/tools.py +207 -0
  54. cannect-1.0.0.dist-info/METADATA +214 -0
  55. cannect-1.0.0.dist-info/RECORD +58 -0
  56. cannect-1.0.0.dist-info/WHEEL +5 -0
  57. cannect-1.0.0.dist-info/licenses/LICENSE +21 -0
  58. cannect-1.0.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,981 @@
1
+ from xlsxwriter import Workbook
2
+ from xlsxwriter.format import Format
3
+ from xlsxwriter.worksheet import Worksheet
4
+
5
+
6
+ class Style:
7
+
8
+ _testcase_label = {
9
+ "NO": {
10
+ "align": "center",
11
+ "valign": "vcenter",
12
+ "font_name": "Modern H Medium",
13
+ "font_color": "black",
14
+ "font_size": 10,
15
+ "bold": True,
16
+ "text_wrap": True,
17
+ "bg_color": '#EBF1DE',
18
+ "top": 5,
19
+ "left": 5,
20
+ "right": 1,
21
+ "bottom": 5
22
+ },
23
+ "Category": {
24
+ "align": "center",
25
+ "valign": "vcenter",
26
+ "font_name": "Modern H Medium",
27
+ "font_color": "black",
28
+ "font_size": 10,
29
+ "bold": True,
30
+ "text_wrap": True,
31
+ "bg_color": '#EBF1DE',
32
+ "top": 5,
33
+ "left": 1,
34
+ "right": 1,
35
+ "bottom": 5
36
+ },
37
+ "Group": {
38
+ "align": "center",
39
+ "valign": "vcenter",
40
+ "font_name": "Modern H Medium",
41
+ "font_color": "black",
42
+ "font_size": 10,
43
+ "bold": True,
44
+ "text_wrap": True,
45
+ "bg_color": '#EBF1DE',
46
+ "top": 5,
47
+ "left": 1,
48
+ "right": 1,
49
+ "bottom": 5
50
+ },
51
+ "Test Case - ID": {
52
+ "align": "center",
53
+ "valign": "vcenter",
54
+ "font_name": "Modern H Medium",
55
+ "font_color": "black",
56
+ "font_size": 10,
57
+ "bold": True,
58
+ "text_wrap": True,
59
+ "bg_color": '#EBF1DE',
60
+ "top": 5,
61
+ "left": 1,
62
+ "right": 1,
63
+ "bottom": 5
64
+ },
65
+ "Test Case Name": {
66
+ "align": "center",
67
+ "valign": "vcenter",
68
+ "font_name": "Modern H Medium",
69
+ "font_color": "black",
70
+ "font_size": 10,
71
+ "bold": True,
72
+ "text_wrap": True,
73
+ "bg_color": '#EBF1DE',
74
+ "top": 5,
75
+ "left": 1,
76
+ "right": 1,
77
+ "bottom": 5
78
+ },
79
+ "Requirement - Traceability": {
80
+ "align": "center",
81
+ "valign": "vcenter",
82
+ "font_name": "Modern H Medium",
83
+ "font_color": "black",
84
+ "font_size": 10,
85
+ "bold": True,
86
+ "text_wrap": True,
87
+ "bg_color": '#EBF1DE',
88
+ "top": 5,
89
+ "left": 1,
90
+ "right": 5,
91
+ "bottom": 5
92
+ },
93
+ "Test Purpose, Description": {
94
+ "align": "center",
95
+ "valign": "vcenter",
96
+ "font_name": "Modern H Medium",
97
+ "font_color": "black",
98
+ "font_size": 10,
99
+ "bold": True,
100
+ "text_wrap": True,
101
+ "bg_color": '#DAEEF3',
102
+ "top": 5,
103
+ "left": 5,
104
+ "right": 5,
105
+ "bottom": 5
106
+ },
107
+ "PreCondition (PC) - Description": {
108
+ "align": "center",
109
+ "valign": "vcenter",
110
+ "font_name": "Modern H Medium",
111
+ "font_color": "black",
112
+ "font_size": 10,
113
+ "bold": True,
114
+ "text_wrap": True,
115
+ "bg_color": '#FDE9D9',
116
+ "top": 5,
117
+ "left": 5,
118
+ "right": 1,
119
+ "bottom": 5
120
+ },
121
+ "PC-Variable": {
122
+ "align": "center",
123
+ "valign": "vcenter",
124
+ "font_name": "Modern H Medium",
125
+ "font_color": "black",
126
+ "font_size": 10,
127
+ "bold": True,
128
+ "text_wrap": True,
129
+ "bg_color": '#FDE9D9',
130
+ "top": 5,
131
+ "left": 1,
132
+ "right": 1,
133
+ "bottom": 5
134
+ },
135
+ "PC-Compare": {
136
+ "align": "center",
137
+ "valign": "vcenter",
138
+ "font_name": "Modern H Medium",
139
+ "font_color": "black",
140
+ "font_size": 10,
141
+ "bold": True,
142
+ "text_wrap": True,
143
+ "bg_color": '#FDE9D9',
144
+ "top": 5,
145
+ "left": 1,
146
+ "right": 1,
147
+ "bottom": 5
148
+ },
149
+ "PC-Value": {
150
+ "align": "center",
151
+ "valign": "vcenter",
152
+ "font_name": "Modern H Medium",
153
+ "font_color": "black",
154
+ "font_size": 10,
155
+ "bold": True,
156
+ "text_wrap": True,
157
+ "bg_color": '#FDE9D9',
158
+ "top": 5,
159
+ "left": 1,
160
+ "right": 5,
161
+ "bottom": 5
162
+ },
163
+ "Test Execution (TE) - Description": {
164
+ "align": "center",
165
+ "valign": "vcenter",
166
+ "font_name": "Modern H Medium",
167
+ "font_color": "black",
168
+ "font_size": 10,
169
+ "bold": True,
170
+ "text_wrap": True,
171
+ "bg_color": '#E4DFEC',
172
+ "top": 5,
173
+ "left": 5,
174
+ "right": 1,
175
+ "bottom": 5
176
+ },
177
+ "TE-Variable": {
178
+ "align": "center",
179
+ "valign": "vcenter",
180
+ "font_name": "Modern H Medium",
181
+ "font_color": "black",
182
+ "font_size": 10,
183
+ "bold": True,
184
+ "text_wrap": True,
185
+ "bg_color": '#E4DFEC',
186
+ "top": 5,
187
+ "left": 1,
188
+ "right": 1,
189
+ "bottom": 5
190
+ },
191
+ "TE-Compare": {
192
+ "align": "center",
193
+ "valign": "vcenter",
194
+ "font_name": "Modern H Medium",
195
+ "font_color": "black",
196
+ "font_size": 10,
197
+ "bold": True,
198
+ "text_wrap": True,
199
+ "bg_color": '#E4DFEC',
200
+ "top": 5,
201
+ "left": 1,
202
+ "right": 1,
203
+ "bottom": 5
204
+ },
205
+ "TE-Value": {
206
+ "align": "center",
207
+ "valign": "vcenter",
208
+ "font_name": "Modern H Medium",
209
+ "font_color": "black",
210
+ "font_size": 10,
211
+ "bold": True,
212
+ "text_wrap": True,
213
+ "bg_color": '#E4DFEC',
214
+ "top": 5,
215
+ "left": 1,
216
+ "right": 5,
217
+ "bottom": 5
218
+ },
219
+ "Expected Results (ER) - Description": {
220
+ "align": "center",
221
+ "valign": "vcenter",
222
+ "font_name": "Modern H Medium",
223
+ "font_color": "black",
224
+ "font_size": 10,
225
+ "bold": True,
226
+ "text_wrap": True,
227
+ "bg_color": '#DCE6F1',
228
+ "top": 5,
229
+ "left": 5,
230
+ "right": 1,
231
+ "bottom": 5
232
+ },
233
+ "ER-Variable": {
234
+ "align": "center",
235
+ "valign": "vcenter",
236
+ "font_name": "Modern H Medium",
237
+ "font_color": "black",
238
+ "font_size": 10,
239
+ "bold": True,
240
+ "text_wrap": True,
241
+ "bg_color": '#DCE6F1',
242
+ "top": 5,
243
+ "left": 1,
244
+ "right": 1,
245
+ "bottom": 5
246
+ },
247
+ "ER-Compare": {
248
+ "align": "center",
249
+ "valign": "vcenter",
250
+ "font_name": "Modern H Medium",
251
+ "font_color": "black",
252
+ "font_size": 10,
253
+ "text_wrap": True,
254
+ "bg_color": '#DCE6F1',
255
+ "top": 5,
256
+ "left": 1,
257
+ "right": 1,
258
+ "bottom": 5
259
+ },
260
+ "ER-Value": {
261
+ "align": "center",
262
+ "valign": "vcenter",
263
+ "font_name": "Modern H Medium",
264
+ "font_color": "black",
265
+ "font_size": 10,
266
+ "bold": True,
267
+ "text_wrap": True,
268
+ "bg_color": '#DCE6F1',
269
+ "top": 5,
270
+ "left": 5,
271
+ "right": 5,
272
+ "bottom": 5
273
+ },
274
+ "Test Result": {
275
+ "align": "center",
276
+ "valign": "vcenter",
277
+ "font_name": "Modern H Medium",
278
+ "font_color": "black",
279
+ "font_size": 10,
280
+ "bold": True,
281
+ "text_wrap": True,
282
+ "bg_color": '#F2DCDB',
283
+ "top": 5,
284
+ "left": 5,
285
+ "right": 1,
286
+ "bottom": 5
287
+ },
288
+ "Test Result Description": {
289
+ "align": "center",
290
+ "valign": "vcenter",
291
+ "font_name": "Modern H Medium",
292
+ "font_color": "black",
293
+ "font_size": 10,
294
+ "bold": True,
295
+ "text_wrap": True,
296
+ "bg_color": '#F2DCDB',
297
+ "top": 5,
298
+ "left": 1,
299
+ "right": 5,
300
+ "bottom": 5
301
+ },
302
+ "Test Conductor": {
303
+ "align": "center",
304
+ "valign": "vcenter",
305
+ "font_name": "Modern H Medium",
306
+ "font_color": "black",
307
+ "font_size": 10,
308
+ "bold": True,
309
+ "text_wrap": True,
310
+ "bg_color": '#EBF1DE',
311
+ "top": 5,
312
+ "left": 5,
313
+ "right": 1,
314
+ "bottom": 5
315
+ },
316
+ "Test SW": {
317
+ "align": "center",
318
+ "valign": "vcenter",
319
+ "font_name": "Modern H Medium",
320
+ "font_color": "black",
321
+ "font_size": 10,
322
+ "bold": True,
323
+ "text_wrap": True,
324
+ "bg_color": '#EBF1DE',
325
+ "top": 5,
326
+ "left": 1,
327
+ "right": 1,
328
+ "bottom": 5
329
+ },
330
+ "Test HW": {
331
+ "align": "center",
332
+ "valign": "vcenter",
333
+ "font_name": "Modern H Medium",
334
+ "font_color": "black",
335
+ "font_size": 10,
336
+ "bold": True,
337
+ "text_wrap": True,
338
+ "bg_color": '#EBF1DE',
339
+ "top": 5,
340
+ "left": 1,
341
+ "right": 1,
342
+ "bottom": 5
343
+ },
344
+ "Test Vehicle / Engine / HIL": {
345
+ "align": "center",
346
+ "valign": "vcenter",
347
+ "font_name": "Modern H Medium",
348
+ "font_color": "black",
349
+ "font_size": 10,
350
+ "bold": True,
351
+ "text_wrap": True,
352
+ "bg_color": '#EBF1DE',
353
+ "top": 5,
354
+ "left": 1,
355
+ "right": 1,
356
+ "bottom": 5
357
+ },
358
+ "Test Environment": {
359
+ "align": "center",
360
+ "valign": "vcenter",
361
+ "font_name": "Modern H Medium",
362
+ "font_color": "black",
363
+ "font_size": 10,
364
+ "bold": True,
365
+ "text_wrap": True,
366
+ "bg_color": '#EBF1DE',
367
+ "top": 5,
368
+ "left": 1,
369
+ "right": 5,
370
+ "bottom": 5
371
+ },
372
+ "Remark / Comment": {
373
+ "align": "center",
374
+ "valign": "vcenter",
375
+ "font_name": "Modern H Medium",
376
+ "font_color": "black",
377
+ "font_size": 10,
378
+ "bold": True,
379
+ "text_wrap": True,
380
+ "bg_color": '#DAEEF3',
381
+ "top": 5,
382
+ "left": 5,
383
+ "right": 5,
384
+ "bottom": 5
385
+ },
386
+ "Measure / Log File (.dat)": {
387
+ "align": "center",
388
+ "valign": "vcenter",
389
+ "font_name": "Modern H Medium",
390
+ "font_color": "black",
391
+ "font_size": 10,
392
+ "bold": True,
393
+ "text_wrap": True,
394
+ "bg_color": '#D9D9D9',
395
+ "top": 5,
396
+ "left": 5,
397
+ "right": 1,
398
+ "bottom": 5
399
+ },
400
+ "MDA Configuration File (.xda)": {
401
+ "align": "center",
402
+ "valign": "vcenter",
403
+ "font_name": "Modern H Medium",
404
+ "font_color": "black",
405
+ "font_size": 10,
406
+ "bold": True,
407
+ "text_wrap": True,
408
+ "bg_color": '#D9D9D9',
409
+ "top": 5,
410
+ "left": 1,
411
+ "right": 1,
412
+ "bottom": 5
413
+ },
414
+ "Experiment File (.exp)": {
415
+ "align": "center",
416
+ "valign": "vcenter",
417
+ "font_name": "Modern H Medium",
418
+ "font_color": "black",
419
+ "font_size": 10,
420
+ "bold": True,
421
+ "text_wrap": True,
422
+ "bg_color": '#D9D9D9',
423
+ "top": 5,
424
+ "left": 1,
425
+ "right": 5,
426
+ "bottom": 5
427
+ },
428
+ "VIO": {
429
+ "align": "center",
430
+ "valign": "vcenter",
431
+ "font_name": "Modern H Medium",
432
+ "font_color": "black",
433
+ "font_size": 10,
434
+ "bold": True,
435
+ "text_wrap": True,
436
+ "bg_color": '#B7DEE8',
437
+ "top": 5,
438
+ "left": 5,
439
+ "right": 1,
440
+ "bottom": 5
441
+ },
442
+ "SWC": {
443
+ "align": "center",
444
+ "valign": "vcenter",
445
+ "font_name": "Modern H Medium",
446
+ "font_color": "black",
447
+ "font_size": 10,
448
+ "bold": True,
449
+ "text_wrap": True,
450
+ "bg_color": '#B7DEE8',
451
+ "top": 5,
452
+ "left": 1,
453
+ "right": 1,
454
+ "bottom": 5
455
+ },
456
+ "MLT": {
457
+ "align": "center",
458
+ "valign": "vcenter",
459
+ "font_name": "Modern H Medium",
460
+ "font_color": "black",
461
+ "font_size": 10,
462
+ "bold": True,
463
+ "text_wrap": True,
464
+ "bg_color": '#B7DEE8',
465
+ "top": 5,
466
+ "left": 1,
467
+ "right": 1,
468
+ "bottom": 5
469
+ },
470
+ "SLT": {
471
+ "align": "center",
472
+ "valign": "vcenter",
473
+ "font_name": "Modern H Medium",
474
+ "font_color": "black",
475
+ "font_size": 10,
476
+ "bold": True,
477
+ "text_wrap": True,
478
+ "bg_color": '#B7DEE8',
479
+ "top": 5,
480
+ "left": 1,
481
+ "right": 1,
482
+ "bottom": 5
483
+ },
484
+ "SDT": {
485
+ "align": "center",
486
+ "valign": "vcenter",
487
+ "font_name": "Modern H Medium",
488
+ "font_color": "black",
489
+ "font_size": 10,
490
+ "bold": True,
491
+ "text_wrap": True,
492
+ "bg_color": '#B7DEE8',
493
+ "top": 5,
494
+ "left": 1,
495
+ "right": 1,
496
+ "bottom": 5
497
+ },
498
+ "FDT": {
499
+ "align": "center",
500
+ "valign": "vcenter",
501
+ "font_name": "Modern H Medium",
502
+ "font_color": "black",
503
+ "font_size": 10,
504
+ "bold": True,
505
+ "text_wrap": True,
506
+ "bg_color": '#B7DEE8',
507
+ "top": 5,
508
+ "left": 1,
509
+ "right": 1,
510
+ "bottom": 5
511
+ },
512
+ "LVR": {
513
+ "align": "center",
514
+ "valign": "vcenter",
515
+ "font_name": "Modern H Medium",
516
+ "font_color": "black",
517
+ "font_size": 10,
518
+ "bold": True,
519
+ "text_wrap": True,
520
+ "bg_color": '#B7DEE8',
521
+ "top": 5,
522
+ "left": 1,
523
+ "right": 1,
524
+ "bottom": 5
525
+ },
526
+ "DCV": {
527
+ "align": "center",
528
+ "valign": "vcenter",
529
+ "font_name": "Modern H Medium",
530
+ "font_color": "black",
531
+ "font_size": 10,
532
+ "bold": True,
533
+ "text_wrap": True,
534
+ "bg_color": '#B7DEE8',
535
+ "top": 5,
536
+ "left": 1,
537
+ "right": 1,
538
+ "bottom": 5
539
+ },
540
+ "LSL": {
541
+ "align": "center",
542
+ "valign": "vcenter",
543
+ "font_name": "Modern H Medium",
544
+ "font_color": "black",
545
+ "font_size": 10,
546
+ "bold": True,
547
+ "text_wrap": True,
548
+ "bg_color": '#B7DEE8',
549
+ "top": 5,
550
+ "left": 1,
551
+ "right": 1,
552
+ "bottom": 5
553
+ },
554
+ "PSV": {
555
+ "align": "center",
556
+ "valign": "vcenter",
557
+ "font_name": "Modern H Medium",
558
+ "font_color": "black",
559
+ "font_size": 10,
560
+ "bold": True,
561
+ "text_wrap": True,
562
+ "bg_color": '#B7DEE8',
563
+ "top": 5,
564
+ "left": 1,
565
+ "right": 1,
566
+ "bottom": 5
567
+ },
568
+ "EOL": {
569
+ "align": "center",
570
+ "valign": "vcenter",
571
+ "font_name": "Modern H Medium",
572
+ "font_color": "black",
573
+ "font_size": 10,
574
+ "bold": True,
575
+ "text_wrap": True,
576
+ "bg_color": '#B7DEE8',
577
+ "top": 5,
578
+ "left": 1,
579
+ "right": 5,
580
+ "bottom": 5
581
+ },
582
+ }
583
+
584
+ _testcase_value = {
585
+ "align": "center",
586
+ "valign": "vcenter",
587
+ "font_name": "Modern H Medium",
588
+ "font_color": "black",
589
+ "font_size": 10,
590
+ "text_wrap": True,
591
+ "left": 1,
592
+ "right": 1,
593
+ "bottom": 1
594
+ }
595
+ _testcase_description = {
596
+ "align": "left",
597
+ "valign": "vcenter",
598
+ "font_name": "Modern H Medium",
599
+ "font_color": "black",
600
+ "font_size": 10,
601
+ "text_wrap": True,
602
+ "left": 1,
603
+ "right": 1,
604
+ "bottom": 1
605
+ }
606
+
607
+ def __init__(self, wb:Workbook, ws:Worksheet):
608
+ self.wb, self.ws = wb, ws
609
+ self.rgb = lambda r, g, b: f'#{hex(r)[2:].upper()}{hex(g)[2:].upper()}{hex(b)[2:].upper()}'
610
+ self.testcase_label = {}
611
+ self.testcase_value = {}
612
+ self.report_label = {}
613
+ self.report_value = {}
614
+ for col in self._testcase_label:
615
+ prop = self._testcase_description.copy() if "Description" in col else self._testcase_value.copy()
616
+ prop["bg_color"] = self._testcase_label[col]["bg_color"]
617
+ self.testcase_label[col] = wb.add_format(self._testcase_label[col])
618
+ self.testcase_value[col] = wb.add_format(prop)
619
+
620
+ for col in self._testcase_label:
621
+ prop = self._testcase_label[col].copy()
622
+ prop["bottom"] = 1
623
+ if col in ["Category", "Group", "Test Case - ID", "Test Case Name", "Requirement - Traceability"]:
624
+ if col == "Category":
625
+ prop["left"] = 5
626
+ if "Description" in col or col in ["Test Result"]:
627
+ prop["left"] = prop["right"] = 1
628
+ if col == "Test Purpose, Description":
629
+ prop["left"] = 5
630
+ if col.startswith("Test Result"):
631
+ prop["right"] = 5
632
+ if col == "Test Result Description":
633
+ prop_copy = prop.copy()
634
+ prop_copy["right"] = 1
635
+ prop_copy["left"] = 5
636
+ self.report_label["Test Result Graph"] = wb.add_format(prop_copy)
637
+ if col == "Remark / Comment":
638
+ prop["top"] = prop["right"] = 1
639
+ if col in ["Measure / Log File (.dat)", "MDA Configuration File (.xda)", "Experiment File (.exp)"]:
640
+ prop["top"] = 1
641
+ if col == "Measure / Log File (.dat)":
642
+ prop["left"] = 1
643
+ self.report_label[col] = wb.add_format(prop)
644
+
645
+ for col in self._testcase_label:
646
+ prop = self._testcase_description.copy() if "Description" in col else self._testcase_value.copy()
647
+ if col in ["Category", "Group", "Test Case - ID", "Test Case Name", "Requirement - Traceability",
648
+ "Remark / Comment", "Measure / Log File (.dat)", "MDA Configuration File (.xda)",
649
+ "Experiment File (.exp)"]:
650
+ prop["bottom"] = 5
651
+ if "Description" in col and (not "Condition" in col):
652
+ prop["valign"] = "top"
653
+ if col in ["Category", "Test Purpose, Description", "Test Conductor", "Remark / Comment"]:
654
+ prop["left"] = 5
655
+ if col in ["Requirement - Traceability", "Test Result", "Test Result Description", "Test Environment",
656
+ "Experiment File (.exp)"]:
657
+ prop["right"] = 5
658
+ if col == "Test Result":
659
+ prop_copy = prop.copy()
660
+ prop_copy["right"] = 1
661
+ prop_copy["left"] = 5
662
+ self.report_value["Test Result Graph"] = wb.add_format(prop_copy)
663
+
664
+ self.report_value[col] = wb.add_format(prop)
665
+
666
+ return
667
+
668
+ def adjust_width(self):
669
+ self.ws.set_column('A:A', 1.63)
670
+ for col in ["C", "F", "I", "L", "O"]:
671
+ self.ws.set_column(f'{col}:{col}', 3.13)
672
+ for col in ["B", "D", "E", "G", "H", "J", "K", "M", "N", "P"]:
673
+ self.ws.set_column(f'{col}:{col}', 13)
674
+ return
675
+
676
+ @property
677
+ def data(self) -> Format:
678
+ if not hasattr(self, "_format_data"):
679
+ self.__setattr__(
680
+ "_format_data",
681
+ self.wb.add_format({
682
+ 'align': 'center',
683
+ 'valign': 'vcenter',
684
+ 'font_name': 'Modern H Medium',
685
+ 'font_color': 'black',
686
+ 'font_size': 10,
687
+ 'text_wrap': True,
688
+ # 'border': 1,
689
+ 'border_color': '#000000'
690
+ })
691
+ )
692
+ return self.__getattribute__("_format_data")
693
+
694
+ @property
695
+ def desc(self) -> Format:
696
+ if not hasattr(self, "_format_desc"):
697
+ self.__setattr__(
698
+ "_format_desc",
699
+ self.wb.add_format({
700
+ 'align': 'left',
701
+ 'valign': 'top',
702
+ 'font_name': 'Modern H Medium',
703
+ 'font_color': 'black',
704
+ 'font_size': 10,
705
+ 'text_wrap': True,
706
+ # 'border': 1,
707
+ 'border_color': '#000000'
708
+ })
709
+ )
710
+ return self.__getattribute__("_format_desc")
711
+
712
+ @property
713
+ def desc2(self) -> Format:
714
+ if not hasattr(self, "_format_desc2"):
715
+ self.__setattr__(
716
+ "_format_desc2",
717
+ self.wb.add_format({
718
+ 'align': 'left',
719
+ 'valign': 'vcenter',
720
+ 'font_name': 'Modern H Medium',
721
+ 'font_color': 'black',
722
+ 'font_size': 10,
723
+ 'text_wrap': True,
724
+ # 'border': 1,
725
+ 'border_color': '#000000'
726
+ })
727
+ )
728
+ return self.__getattribute__("_format_desc2")
729
+
730
+ @property
731
+ def label_meta(self) -> Format:
732
+ if not hasattr(self, "_format_meta"):
733
+ self.__setattr__(
734
+ "_format_meta",
735
+ self.wb.add_format({
736
+ 'align': 'center',
737
+ 'valign': 'vcenter',
738
+ 'font_name': 'Modern H Medium',
739
+ 'font_color': 'black',
740
+ 'font_size': 10,
741
+ 'text_wrap': True,
742
+ 'bold': True,
743
+ # 'border': 1,
744
+ 'border_color': '#000000',
745
+ 'bg_color': self.rgb(235, 241, 222)
746
+ })
747
+ )
748
+ return self.__getattribute__("_format_meta")
749
+
750
+ @property
751
+ def label_purpose(self) -> Format:
752
+ if not hasattr(self, "_format_purp"):
753
+ self.__setattr__(
754
+ "_format_purp",
755
+ self.wb.add_format({
756
+ 'align': 'center',
757
+ 'valign': 'vcenter',
758
+ 'font_name': 'Modern H Medium',
759
+ 'font_color': 'black',
760
+ 'font_size': 10,
761
+ 'text_wrap': True,
762
+ 'bold': True,
763
+ # 'border': 1,
764
+ 'border_color': '#000000',
765
+ 'bg_color': self.rgb(218, 238, 243)
766
+ })
767
+ )
768
+ return self.__getattribute__("_format_purp")
769
+
770
+ @property
771
+ def label_condition(self) -> Format:
772
+ if not hasattr(self, "_format_cond"):
773
+ self.__setattr__(
774
+ "_format_cond",
775
+ self.wb.add_format({
776
+ 'align': 'center',
777
+ 'valign': 'vcenter',
778
+ 'font_name': 'Modern H Medium',
779
+ 'font_color': 'black',
780
+ 'font_size': 10,
781
+ 'text_wrap': True,
782
+ 'bold': True,
783
+ # 'border': 1,
784
+ 'border_color': '#000000',
785
+ 'bg_color': self.rgb(253, 233, 217)
786
+ })
787
+ )
788
+ return self.__getattribute__("_format_cond")
789
+
790
+ @property
791
+ def label_execution(self) -> Format:
792
+ if not hasattr(self, "_format_exec"):
793
+ self.__setattr__(
794
+ "_format_exec",
795
+ self.wb.add_format({
796
+ 'align': 'center',
797
+ 'valign': 'vcenter',
798
+ 'font_name': 'Modern H Medium',
799
+ 'font_color': 'black',
800
+ 'font_size': 10,
801
+ 'text_wrap': True,
802
+ 'bold': True,
803
+ # 'border': 1,
804
+ 'border_color': '#000000',
805
+ 'bg_color': self.rgb(228, 223, 236)
806
+ })
807
+ )
808
+ return self.__getattribute__("_format_exec")
809
+
810
+ @property
811
+ def label_expectation(self) -> Format:
812
+ if not hasattr(self, "_format_expect"):
813
+ self.__setattr__(
814
+ "_format_expect",
815
+ self.wb.add_format({
816
+ 'align': 'center',
817
+ 'valign': 'vcenter',
818
+ 'font_name': 'Modern H Medium',
819
+ 'font_color': 'black',
820
+ 'font_size': 10,
821
+ 'text_wrap': True,
822
+ 'bold': True,
823
+ # 'border': 1,
824
+ 'border_color': '#000000',
825
+ 'bg_color': self.rgb(220, 230, 241)
826
+ })
827
+ )
828
+ return self.__getattribute__("_format_expect")
829
+
830
+ @property
831
+ def label_result(self) -> Format:
832
+ if not hasattr(self, "_format_res"):
833
+ self.__setattr__(
834
+ "_format_res",
835
+ self.wb.add_format({
836
+ 'align': 'center',
837
+ 'valign': 'vcenter',
838
+ 'font_name': 'Modern H Medium',
839
+ 'font_color': 'black',
840
+ 'font_size': 10,
841
+ 'text_wrap': True,
842
+ 'bold': True,
843
+ # 'border': 1,
844
+ 'border_color': '#000000',
845
+ 'bg_color': self.rgb(242, 220, 219)
846
+ })
847
+ )
848
+ return self.__getattribute__("_format_res")
849
+
850
+ @property
851
+ def label_comment(self) -> Format:
852
+ if not hasattr(self, "_format_comm"):
853
+ self.__setattr__(
854
+ "_format_comm",
855
+ self.wb.add_format({
856
+ 'align': 'center',
857
+ 'valign': 'vcenter',
858
+ 'font_name': 'Modern H Medium',
859
+ 'font_color': 'black',
860
+ 'font_size': 10,
861
+ 'text_wrap': True,
862
+ 'bold': True,
863
+ # 'border': 1,
864
+ 'border_color': '#000000',
865
+ 'bg_color': self.rgb(218, 238, 243)
866
+ })
867
+ )
868
+ return self.__getattribute__("_format_comm")
869
+
870
+ @property
871
+ def label_resource(self) -> Format:
872
+ if not hasattr(self, "_format_src"):
873
+ self.__setattr__(
874
+ "_format_src",
875
+ self.wb.add_format({
876
+ 'align': 'center',
877
+ 'valign': 'vcenter',
878
+ 'font_name': 'Modern H Medium',
879
+ 'font_color': 'black',
880
+ 'font_size': 10,
881
+ 'text_wrap': True,
882
+ 'bold': True,
883
+ # 'border': 1,
884
+ 'border_color': '#000000',
885
+ 'bg_color': self.rgb(217, 217, 217)
886
+ })
887
+ )
888
+ return self.__getattribute__("_format_src")
889
+
890
+ @property
891
+ def label(self) -> dict:
892
+ return {
893
+ "NO": self.label_meta,
894
+ "Category": self.label_meta,
895
+ "Group": self.label_meta,
896
+ "Test Case - ID": self.label_meta,
897
+ "Test Case Name": self.label_meta,
898
+ "Requirement - Traceability": self.label_meta,
899
+ "Test Purpose, Description": self.label_purpose,
900
+ "PreCondition (PC) - Description": self.label_condition,
901
+ "PC-Variable": self.label_condition,
902
+ "PC-Compare": self.label_condition,
903
+ "PC-Value": self.label_condition,
904
+ "Test Execution (TE) - Description": self.label_execution,
905
+ "TE-Variable": self.label_execution,
906
+ "TE-Compare": self.label_execution,
907
+ "TE-Value": self.label_execution,
908
+ "Expected Results (ER) - Description": self.label_expectation,
909
+ "ER-Variable": self.label_expectation,
910
+ "ER-Compare": self.label_expectation,
911
+ "ER-Value": self.label_expectation,
912
+ "Test Result": self.label_result,
913
+ "Test Result Description": self.label_result,
914
+ "Test Conductor": self.label_meta,
915
+ "Test SW": self.label_meta,
916
+ "Test HW": self.label_meta,
917
+ "Test Vehicle / Engine / HIL": self.label_meta,
918
+ "Test Environment": self.label_meta,
919
+ "Remark / Comment": self.label_comment,
920
+ "Measure / Log File (.dat)": self.label_resource,
921
+ "MDA Configuration File (.xda)": self.label_resource,
922
+ "Experiment File (.exp)": self.label_resource,
923
+ "VIO": self.data,
924
+ "SWC": self.data,
925
+ "MLT": self.data,
926
+ "SLT": self.data,
927
+ "SDT": self.data,
928
+ "FDT": self.data,
929
+ "LVR": self.data,
930
+ "DCV": self.data,
931
+ "LSL": self.data,
932
+ "PSV": self.data,
933
+ "EOL": self.data,
934
+ }
935
+
936
+ @property
937
+ def content(self) -> dict:
938
+ return {
939
+ "NO": self.data,
940
+ "Category": self.data,
941
+ "Group": self.data,
942
+ "Test Case - ID": self.data,
943
+ "Test Case Name": self.desc2,
944
+ "Requirement - Traceability": self.data,
945
+ "Test Purpose, Description": self.desc2,
946
+ "PreCondition (PC) - Description": self.data,
947
+ "PC-Variable": self.data,
948
+ "PC-Compare": self.data,
949
+ "PC-Value": self.data,
950
+ "Test Execution (TE) - Description": self.desc2,
951
+ "TE-Variable": self.data,
952
+ "TE-Compare": self.data,
953
+ "TE-Value": self.data,
954
+ "Expected Results (ER) - Description": self.desc2,
955
+ "ER-Variable": self.data,
956
+ "ER-Compare": self.data,
957
+ "ER-Value": self.data,
958
+ "Test Result": self.data,
959
+ "Test Result Description": self.desc2,
960
+ "Test Conductor": self.data,
961
+ "Test SW": self.data,
962
+ "Test HW": self.data,
963
+ "Test Vehicle / Engine / HIL": self.data,
964
+ "Test Environment": self.data,
965
+ "Remark / Comment": self.data,
966
+ "Measure / Log File (.dat)": self.data,
967
+ "MDA Configuration File (.xda)": self.data,
968
+ "Experiment File (.exp)": self.data,
969
+ "VIO": self.data,
970
+ "SWC": self.data,
971
+ "MLT": self.data,
972
+ "SLT": self.data,
973
+ "SDT": self.data,
974
+ "FDT": self.data,
975
+ "LVR": self.data,
976
+ "DCV": self.data,
977
+ "LSL": self.data,
978
+ "PSV": self.data,
979
+ "EOL": self.data,
980
+ }
981
+