DARMA-tasking / LB-analysis-framework

Analysis framework for exploring, testing, and comparing load balancing strategies
Other
5 stars 1 forks source link

#523: Fix CI after JSONValidator changes #524

Closed cwschilly closed 3 months ago

cwschilly commented 4 months ago

Fixes #523

cwschilly commented 4 months ago

Thanks @nlslatt , I just added tests for the new args and re-requested review

nlslatt commented 4 months ago
  ======================================================================
  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
cwschilly commented 4 months ago

Looking into this now

cwschilly commented 4 months ago

@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.

ppebay commented 3 months ago

Post-merge review: good to me. Thanks