Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
jdddog committed May 15, 2023
1 parent ce6ce1e commit 63af63b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions observatory-platform/observatory/platform/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,9 @@ def save_jsonl(file_path: str, data: List[Dict]) -> None:
:return: None.
"""

with jsonlines.Writer(file_path) as writer:
writer.write_all(data)
with open(file_path, mode="w") as f:
with jsonlines.Writer(f) as writer:
writer.write_all(data)


def load_file(file_name: str, modes="r"):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -660,6 +660,7 @@ def compare_lists_of_dicts(expected: List[Dict], actual: List[Dict], primary_key
all_matched = True
for key in expected_dict:
diff = DeepDiff(expected_dict[key], actual_dict[key], ignore_order=True)
logging.info(f"primary_key: {key}")
for diff_type, changes in diff.items():
all_matched = False
if diff_type == "values_changed":
Expand Down

0 comments on commit 63af63b

Please sign in to comment.