:returns: List of specifications of tables to be generated.
:rtype: list
"""
- return self._specification[u"tables"]
+ return self._specification.get(u"tables", list())
@property
def plots(self):
:returns: List of specifications of plots to be generated.
:rtype: list
"""
- return self._specification[u"plots"]
+ return self._specification.get(u"plots", list())
@property
def files(self):
:returns: List of specifications of files to be generated.
:rtype: list
"""
- return self._specification[u"files"]
+ return self._specification.get(u"files", list())
@property
def cpta(self):
self._specification[u"environment"][u"limits"] = \
self._cfg_yaml[idx].get(u"limits", None)
+ self._specification[u"environment"][u"frequency"] = \
+ self._cfg_yaml[idx].get(u"frequency", dict())
+
self._specification[u"environment"][u"urls"] = \
self._cfg_yaml[idx].get(u"urls", None)
idx = self._get_type_index(u"static")
if idx is None:
logging.warning(u"No static content specified.")
+ self._specification[u"static"] = dict()
+ return
for key, value in self._cfg_yaml[idx].items():
if isinstance(value, str):
table[u"columns"][i][u"data-replacement"] = \
self.data_sets[data_set]
+ if table.get(u"lines", None):
+ for i in range(len(table[u"lines"])):
+ data_set = table[u"lines"][i].get(u"data-set", None)
+ if isinstance(data_set, str):
+ table[u"lines"][i][u"data-set"] = \
+ self.data_sets[data_set]
+
except KeyError:
raise PresentationError(
- f"Wrong data set used in {table.get(u'title', u'')}."
+ f"Wrong set '{data_set}' used in {table.get(u'title', u'')}."
)
self._specification[u"tables"].append(table)
logging.info(u"Parsing specification: INPUT")
- for data_set in self.data_sets.values():
- if data_set == "data-sets":
- continue
- for job, builds in data_set.items():
+ idx = self._get_type_index(u"input")
+ if idx is None:
+ logging.info(u"Creating the list of inputs from data sets.")
+ for data_set in self.data_sets.values():
+ if data_set == "data-sets":
+ continue
+ for job, builds in data_set.items():
+ for build in builds:
+ self.add_build(
+ job,
+ {
+ u"build": build,
+ u"status": None,
+ u"file-name": None,
+ u"source": None
+ }
+ )
+ else:
+ logging.info(u"Reading pre-defined inputs.")
+ for job, builds in self._cfg_yaml[idx][u"builds"].items():
for build in builds:
self.add_build(
job,