Lines Matching +full:t +full:- +full:v
3 # Copyright (c) 2022-2024 Intel Corporation
4 # SPDX-License-Identifier: Apache-2.0
35 :param parent_name: the short, single-level, name of the ``value``.
146 for k,v in src_dict.items():
149 res_dict[k_pref] = {k_suff: v}
154 res_dict[k_pref][k_suff].append(v)
156 res_dict[k_pref][k_suff] = v
160 def transform(t, args): argument
164 if property_name in t:
165 match = re.match(rule, t[property_name])
167 t.update(match.groupdict(default=""))
171 if excl_item in t:
172 t.pop(excl_item)
174 return t
179 for t in data['testsuites']:
180 name = t['name']
181 _grouping = name.split("/")[-1]
195 t['environment'] = env
196 t['component'] = main_group
197 t['sub_component'] = sub_group
202 if args.flatten and args.flatten in t and isinstance(t[args.flatten], dict):
203 flat = t.pop(args.flatten)
216 for k,v in flat.items():
217 … v[as_name] = k + args.transpose_separator + v[as_name] if as_name in v else k
218 v[as_name + '_depth'] = v[as_name].count(args.transpose_separator)
219 flat_list.append(v)
220 t[args.flatten] = flat_list
222 t[args.flatten] = flat
226 if args.flatten and args.flatten in t and isinstance(t[args.flatten], list):
227 flat = t.pop(args.flatten)
229 t_clone = t.copy()
231 … t_clone.update({ args.flatten + args.flatten_separator + k : v for k,v in flat_item.items() })
233 …t_clone.update({ args.flatten + args.flatten_separator + str(idx) : v for idx,v in enumerate(flat_…
243 "_source": transform(t, args)
308 parser.add_argument('-y','--dry-run', action="store_true", help='Dry run.')
309 parser.add_argument('-c','--create-index', action="store_true", help='Create index.')
310 parser.add_argument('-m', '--map-file', required=False,
312 parser.add_argument('-i', '--index', required=True, default='tests-zephyr-1',
314 parser.add_argument('-r', '--run-date', help='Run date in ISO format', required=False)
315 parser.add_argument('--flatten', required=False, default=None,
322 parser.add_argument('--flatten-dict-name', required=False, default="name",
326 … "and'_depth' suffix will be added for number of `--transpose_separator`s in the name.\n"
328 parser.add_argument('--flatten-list-names', required=False, default=None,
335 parser.add_argument('--flatten-separator', required=False, default="_",
337 parser.add_argument('--transpose-separator', required=False, default="/",
339 "`flatten-dict-name` properties. Default: '%(default)s'")
340 parser.add_argument('--escape-separator', required=False, default='',
343 parser.add_argument('--transform', required=False,
349 parser.add_argument('--exclude', required=False, nargs='*', default=[],
351 help="Don't store these properties in the Elasticsearch index.")
352 parser.add_argument('--run-workflow', required=False,
355 parser.add_argument('--run-branch', required=False,
357 parser.add_argument('--run-id', required=False,
358 help="unique run-id (e.g. from github.run_id context)")
359 parser.add_argument('--run-attempt', required=False,
361 parser.add_argument('--bulk-timeout', required=False, type=int, default=60,