From 3f2ecafbe60b3664ab7b18ecfe8e4acb46a3cd3b Mon Sep 17 00:00:00 2001 From: Tibor Frank Date: Tue, 14 Apr 2020 15:57:57 +0200 Subject: PAL: Integrate new comp tables 2 Change-Id: Id7267f5ab13a362894c5fe5a2ae40d51d4b5a36d Signed-off-by: Tibor Frank --- resources/tools/presentation/generator_tables.py | 192 +++--- resources/tools/presentation/pal_utils.py | 8 +- .../presentation/rca/rca-2n-skx-2t1c-ndr-rca1.yaml | 30 + .../presentation/rca/rca-2n-skx-2t1c-ndr-rca2.yaml | 30 + .../presentation/rca/rca-2n-skx-2t1c-pdr-rca1.yaml | 30 + .../presentation/rca/rca-2n-skx-2t1c-pdr-rca2.yaml | 30 + .../presentation/rca/rca-2n-skx-2t1c-pdr.yaml | 30 - .../presentation/rca/rca-3n-skx-2t1c-ndr-rca1.yaml | 39 ++ .../presentation/rca/rca-3n-skx-2t1c-ndr-rca2.yaml | 39 ++ .../presentation/rca/rca-3n-skx-2t1c-pdr-rca1.yaml | 39 ++ .../presentation/rca/rca-3n-skx-2t1c-pdr-rca2.yaml | 39 ++ .../presentation/rca/rca-3n-skx-2t1c-pdr.yaml | 39 -- resources/tools/presentation/specification.yaml | 735 +++++++++++++++------ 13 files changed, 906 insertions(+), 374 deletions(-) create mode 100644 resources/tools/presentation/rca/rca-2n-skx-2t1c-ndr-rca1.yaml create mode 100644 resources/tools/presentation/rca/rca-2n-skx-2t1c-ndr-rca2.yaml create mode 100644 resources/tools/presentation/rca/rca-2n-skx-2t1c-pdr-rca1.yaml create mode 100644 resources/tools/presentation/rca/rca-2n-skx-2t1c-pdr-rca2.yaml delete mode 100644 resources/tools/presentation/rca/rca-2n-skx-2t1c-pdr.yaml create mode 100644 resources/tools/presentation/rca/rca-3n-skx-2t1c-ndr-rca1.yaml create mode 100644 resources/tools/presentation/rca/rca-3n-skx-2t1c-ndr-rca2.yaml create mode 100644 resources/tools/presentation/rca/rca-3n-skx-2t1c-pdr-rca1.yaml create mode 100644 resources/tools/presentation/rca/rca-3n-skx-2t1c-pdr-rca2.yaml delete mode 100644 resources/tools/presentation/rca/rca-3n-skx-2t1c-pdr.yaml (limited to 'resources') diff --git a/resources/tools/presentation/generator_tables.py b/resources/tools/presentation/generator_tables.py index c9205642c6..8ebeadd13a 100644 --- a/resources/tools/presentation/generator_tables.py +++ b/resources/tools/presentation/generator_tables.py @@ -490,7 +490,7 @@ def _tpc_sort_table(table): def _tpc_generate_html_table(header, data, out_file_name, legend=u"", - footnote=u"", sort_data=True): + footnote=u"", sort_data=True, title=u""): """Generate html table from input data with simple sorting possibility. :param header: Table header. @@ -503,12 +503,14 @@ def _tpc_generate_html_table(header, data, out_file_name, legend=u"", :param legend: The legend to display below the table. :param footnote: The footnote to display below the table (and legend). :param sort_data: If True the data sorting is enabled. + :param title: The table (and file) title. :type header: list :type data: list of lists :type out_file_name: str :type legend: str :type footnote: str :type sort_data: bool + :type title: str """ try: @@ -517,9 +519,9 @@ def _tpc_generate_html_table(header, data, out_file_name, legend=u"", idx = 0 params = { u"align-hdr": ( - [u"left", u"center"], - [u"left", u"left", u"center"], - [u"left", u"left", u"left", u"center"] + [u"left", u"right"], + [u"left", u"left", u"right"], + [u"left", u"left", u"left", u"right"] ), u"align-itm": ( [u"left", u"right"], @@ -547,7 +549,11 @@ def _tpc_generate_html_table(header, data, out_file_name, legend=u"", table_header = dict( values=[f"{item.replace(u',', u',
')}
" for item in header], fill_color=u"#7eade7", - align=params[u"align-hdr"][idx] + align=params[u"align-hdr"][idx], + font=dict( + family=u"Courier New", + size=13 + ) ) fig = go.Figure() @@ -562,7 +568,11 @@ def _tpc_generate_html_table(header, data, out_file_name, legend=u"", cells=dict( values=columns, fill_color=fill_color, - align=params[u"align-itm"][idx] + align=params[u"align-itm"][idx], + font=dict( + family=u"Courier New", + size=13 + ) ) ) ) @@ -604,7 +614,11 @@ def _tpc_generate_html_table(header, data, out_file_name, legend=u"", cells=dict( values=[df_sorted.get(col) for col in header], fill_color=fill_color, - align=params[u"align-itm"][idx] + align=params[u"align-itm"][idx], + font=dict( + family=u"Courier New", + size=13 + ) ) ) ) @@ -628,6 +642,9 @@ def _tpc_generate_html_table(header, data, out_file_name, legend=u"", u".. |prein| raw:: html\n\n
\n\n\n"
             u".. |preout| raw:: html\n\n    
\n\n" ) + if title: + rst_file.write(f"{title}\n") + rst_file.write(f"{u'~' * len(title)}\n\n") rst_file.write( u".. raw:: html\n\n" f'