Code Review
/
csit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Report: Hide 2n-icx empty graphs
[csit.git]
/
resources
/
tools
/
presentation
/
generator_files.py
diff --git
a/resources/tools/presentation/generator_files.py
b/resources/tools/presentation/generator_files.py
index
431f213
..
0228858
100644
(file)
--- a/
resources/tools/presentation/generator_files.py
+++ b/
resources/tools/presentation/generator_files.py
@@
-1,4
+1,4
@@
-# Copyright (c) 202
0
Cisco and/or its affiliates.
+# Copyright (c) 202
1
Cisco and/or its affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
@@
-34,7
+34,7
@@
RST_INCLUDE_TABLE = (u"\n.. only:: html\n\n"
u"\n .. raw:: latex\n\n"
u" \\csvautolongtable{{{file_latex}}}\n\n")
u"\n .. raw:: latex\n\n"
u" \\csvautolongtable{{{file_latex}}}\n\n")
-REGEX_NIC_SHORT = re.compile(r'(\d*ge\dp\d)(
\D
*\d*[a-z]*)-')
+REGEX_NIC_SHORT = re.compile(r'(\d*ge\dp\d)(
[a-z]
*\d*[a-z]*)-')
def generate_files(spec, data):
def generate_files(spec, data):
@@
-142,7
+142,7
@@
def file_details_split(file_spec, input_data, frmt=u"rst"):
logging.error(
f" No tables to include in {table_set}. Skipping."
)
logging.error(
f" No tables to include in {table_set}. Skipping."
)
- return
+ continue
logging.info(u" Creating the test data set...")
tests = input_data.filter_data(
logging.info(u" Creating the test data set...")
tests = input_data.filter_data(
@@
-153,7
+153,7
@@
def file_details_split(file_spec, input_data, frmt=u"rst"):
continue_on_error=True
)
if tests.empty:
continue_on_error=True
)
if tests.empty:
- return
+ continue
tests = input_data.merge_data(tests)
tests.sort_index(inplace=True)
tests = input_data.merge_data(tests)
tests.sort_index(inplace=True)
@@
-165,7
+165,7
@@
def file_details_split(file_spec, input_data, frmt=u"rst"):
data_set=u"suites"
)
if suites.empty:
data_set=u"suites"
)
if suites.empty:
- return
+ continue
suites = input_data.merge_data(suites)
suites.sort_index(inplace=True)
suites = input_data.merge_data(suites)
suites.sort_index(inplace=True)
@@
-197,7
+197,7
@@
def file_details_split(file_spec, input_data, frmt=u"rst"):
if chapters[chapter_l1][chapter_l2].get(nic, None) is None:
chapters[chapter_l1][chapter_l2][nic] = dict(
rst_file=f"{join(table_set, chapter_l1)}_{nic}.rst".
if chapters[chapter_l1][chapter_l2].get(nic, None) is None:
chapters[chapter_l1][chapter_l2][nic] = dict(
rst_file=f"{join(table_set, chapter_l1)}_{nic}.rst".
- replace(u"2n1l-", u""),
+ replace(u"2n1l-", u"")
.replace(u"1n1l-", u"")
,
tables=list()
)
for idx, tbl_file in enumerate(table_lst):
tables=list()
)
for idx, tbl_file in enumerate(table_lst):
@@
-205,7
+205,12
@@
def file_details_split(file_spec, input_data, frmt=u"rst"):
chapters[chapter_l1][chapter_l2][nic][u"tables"].append(
(
table_lst.pop(idx),
chapters[chapter_l1][chapter_l2][nic][u"tables"].append(
(
table_lst.pop(idx),
- suite[u"doc"].replace(u'|br|', u'\n\n -')
+ suite[u"doc"].replace(u'"', u"'").
+ replace(u'\n', u' ').
+ replace(u'\r', u'').
+ replace(u'*[', u'\n\n - *[').
+ replace(u"*", u"**").
+ replace(u'\n\n - *[', u' - *[', 1)
)
)
break
)
)
break