diff --git a/docs/Portable App.drawio b/docs/Portable App.drawio index 4dee088..0cd3fae 100644 --- a/docs/Portable App.drawio +++ b/docs/Portable App.drawio @@ -1,11 +1,11 @@ - + - + - + @@ -2734,32 +2734,44 @@ - + - + - + - + - + - - + + - - + + + + + + + + + + + + + + @@ -2768,15 +2780,15 @@ - + - + - + @@ -2786,13 +2798,13 @@ - + - + - + diff --git a/src/portable_app_framework/__init__.py b/src/portable_app_framework/__init__.py index ca90e30..fe16135 100644 --- a/src/portable_app_framework/__init__.py +++ b/src/portable_app_framework/__init__.py @@ -108,7 +108,7 @@ def qualify(self) -> bool: manifest=self.manifest, ) res_building_motif_validation = building_motif_validation.validate() - + res = any([res_basic_validation, res_building_motif_validation]) except Exception as e: self.logger.error(f'Error during the validation of the manifest: {e}') @@ -166,6 +166,7 @@ def clean(self, *args, **kwargs): if clean_fn is not None and callable(clean_fn): # Call the function with the provided arguments self.res_clean = clean_fn(*args, **kwargs) + return self.res_clean else: print(f"Function {clean_fn} not found in analyze module.") return None @@ -186,6 +187,7 @@ def analyze(self, *args, **kwargs): if analyze_fn is not None and callable(analyze_fn): # Call the function with the provided arguments self.res_analyze = analyze_fn(*args, **kwargs) + return self.res_analyze else: print(f"Function {analyze_fn} not found in analyze module.") return None diff --git a/src/portable_app_framework/utils/util_qualify.py b/src/portable_app_framework/utils/util_qualify.py index 2afb56b..28561df 100644 --- a/src/portable_app_framework/utils/util_qualify.py +++ b/src/portable_app_framework/utils/util_qualify.py @@ -67,6 +67,7 @@ def validate(self) -> bool: Validate the graph :return: print the validation report """ + # todo dismiss logger buildingmotif # in-memory instance BuildingMOTIF("sqlite://") # remind to deactivate logger from BuildingMOTIF class in python package @@ -107,7 +108,7 @@ def validate(self) -> bool: valid = validation_result.valid # print validation result - logger.info(f"[BuildingMOTIF] Model is valid? {valid}") + logger_new.info(f"[BuildingMOTIF] Model is valid? {valid}") # if not valid print the validation results if not validation_result.valid: diff --git a/test/data/test_qualify_fail.ttl b/test/data/test_qualify_fail.ttl index bee1669..8ebec03 100644 --- a/test/data/test_qualify_fail.ttl +++ b/test/data/test_qualify_fail.ttl @@ -6,5 +6,5 @@ bldg:AHU brick:hasPoint bldg:MA_TEMP . bldg:MA_TEMP1 - a brick:Temperature_Sensor . + a brick:AHU .