MCPcopy Create free account
hub / github.com/OpenDDS/OpenDDS / readme

Function readme

tools/scripts/android/matrix.py:415–453  ·  view source on GitHub ↗
(matrices, file, **kw)

Source from the content-addressed store, hash-verified

413
414
415def readme(matrices, file, **kw):
416 def print_row(cells):
417 print('|', ' | '.join(cells), '|', file=file)
418
419 # Get All APIs
420 apis = []
421 for matrix in matrices:
422 for api in matrix.apis:
423 if api not in apis:
424 apis.append(api)
425 apis.sort()
426
427 # Get All NDKs
428 ndks = set()
429 for matrix in matrices:
430 for ndk in matrix.ndks:
431 ndks |= {ndk}
432 ndks = sort_ndks(list(ndks))
433
434 # Print Legend
435 for matrix in matrices:
436 name = '`{}`'.format(matrix.name)
437 if matrix.url is not None:
438 name = '[{}]({})'.format(name, matrix.url)
439 print('`{}` = {}'.format(matrix.mark, name), file=file)
440
441 # Print Table Header
442 print_row([''] + list(map(str, apis)))
443 print_row(['---'] * (len(apis) + 1))
444 # Print Rows
445 for ndk in ndks:
446 cells = [ndk]
447 for api in apis:
448 marks = []
449 for matrix in matrices:
450 if matrix.has_build_for(ndk, api):
451 marks.append('`{}`'.format(matrix.mark))
452 cells.append(','.join(marks) if marks else '-')
453 print_row(cells)
454
455
456settings_export = re.compile(r'^(#)?export (\w+)=([^#]*)$')

Callers

nothing calls this directly

Calls 10

setFunction · 0.85
sort_ndksFunction · 0.85
print_rowFunction · 0.85
lenFunction · 0.85
has_build_forMethod · 0.80
printFunction · 0.50
appendMethod · 0.45
sortMethod · 0.45
formatMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected