Additional fix in collector

This commit is contained in:
FilippoOlivo
2025-03-12 23:20:46 +01:00
committed by Nicola Demo
parent 9e4a8e887f
commit 7a8a534688

View File

@@ -37,11 +37,10 @@ class Collector:
@property @property
def full(self): def full(self):
""" """
Whether all conditions are ready to be passed to the data module. Returns True if the collector is full. The collector is considered full
The collector is said to be full is all conditions have some entries if all conditions have entries in the data_collection dictionary.
in data_collection dict.
:return: True if all conditions are ready, False otherwise.
:return: True if all conditions are ready.
:rtype: bool :rtype: bool
""" """
@@ -50,17 +49,18 @@ class Collector:
@full.setter @full.setter
def full(self, value): def full(self, value):
""" """
Set the full flag. Set the full variable.
:param bool value: The value to set the full property to. :param bool value: The value to set the full property to.
""" """
check_consistency(value, bool) check_consistency(value, bool)
self._full = value self._full = value
@property @property
def data_collections(self): def data_collections(self):
""" """
Return the data collections. Return the data collections (dictionary where data is stored).
:return: The data collections where the data is stored. :return: The data collections where the data is stored.
:rtype: dict :rtype: dict
@@ -116,7 +116,8 @@ class Collector:
def store_sample_domains(self): def store_sample_domains(self):
""" """
Store inside data collections the sampled data of the problem. These Store inside data collections the sampled data of the problem. These
comes from the conditions that require sampling. comes from the conditions that require sampling (e.g.
DomainEquationCondition).
""" """
for condition_name in self.problem.conditions: for condition_name in self.problem.conditions: