Skip to content

Commit

Permalink
Sort keys in json for easier diffing
Browse files Browse the repository at this point in the history
  • Loading branch information
tbody-cfs authored and hassec committed Nov 30, 2023
1 parent de249c9 commit 98a7bd2
Show file tree
Hide file tree
Showing 2 changed files with 620 additions and 620 deletions.
2 changes: 1 addition & 1 deletion cfspopcon/file_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,4 +105,4 @@ def write_point_to_file(dataset: xr.Dataset, point_key: str, point_params: dict,
output_dir.mkdir(parents=True, exist_ok=True)

with open(output_dir / f"{point_key}.json", "w") as file:
json.dump(point.to_dict(), file, indent=4)
json.dump(point.to_dict(), file, indent=4, sort_keys=True)
Loading

0 comments on commit 98a7bd2

Please sign in to comment.