Closed cwschilly closed 3 months ago
Thanks @nlslatt , I just added tests for the new args and re-requested review
======================================================================
ERROR [0.004s]: test_json_data_files_validate_comm_links (tests.unit.imported.test_JSON_data_files_validator.TestJSONDataFilesValidator.test_json_data_files_validate_comm_links)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/runner/work/LB-analysis-framework/LB-analysis-framework/tests/unit/imported/test_JSON_data_files_validator.py", line 204, in test_json_data_files_validate_comm_links
JSONDataFilesValidator().main()
File "/home/runner/work/LB-analysis-framework/LB-analysis-framework/src/lbaf/imported/JSON_data_files_validator.py", line 456, in main
self.__validate_file(file_path=self.__file_path)
File "/home/runner/work/LB-analysis-framework/LB-analysis-framework/src/lbaf/imported/JSON_data_files_validator.py", line 425, in __validate_file
if not self.validate_comm_links(all_jsons):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/work/LB-analysis-framework/LB-analysis-framework/src/lbaf/imported/JSON_data_files_validator.py", line 436, in validate_comm_links
if data["phases"][n].get("communications") is not None:
~~~~~~~~~~~~~~^^^
IndexError: list index out of range
Looking into this now
@nlslatt Fixed; validate_comm_links
pulls all files from the specified JSON's directory and loops through their phase
dicts, but one of the files in tests/unit/data/JSON_data_file_validator
had nothing to loop through:
{"type":"LBDatafile","phases":[]}
I just created a new directory specifically for the validate_comm_links
test.
Post-merge review: good to me. Thanks
Fixes #523