Skip to content

Commit

Permalink
Pretty print manifest.json
Browse files Browse the repository at this point in the history
jobs.json was already effectively pretty-printed as it is overwritten at
a later stage, but now both writes of jobs.json are consistent in
printing pretty.
  • Loading branch information
berland committed Dec 19, 2024
1 parent a159fa7 commit 2a4b6be
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/ert/enkf_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,12 +284,19 @@ def create_run_path(
)
with open(run_path / "jobs.json", mode="wb") as fptr:
fptr.write(
orjson.dumps(forward_model_output, option=orjson.OPT_NON_STR_KEYS)
orjson.dumps(
forward_model_output,
option=orjson.OPT_NON_STR_KEYS | orjson.OPT_INDENT_2,
)
)
# Write MANIFEST file to runpath use to avoid NFS sync issues
data = _manifest_to_json(ensemble, run_arg.iens, run_arg.itr)
with open(run_path / "manifest.json", mode="wb") as fptr:
fptr.write(orjson.dumps(data, option=orjson.OPT_NON_STR_KEYS))
fptr.write(
orjson.dumps(
data, option=orjson.OPT_NON_STR_KEYS | orjson.OPT_INDENT_2
)
)

runpaths.write_runpath_list(
[ensemble.iteration], [real.iens for real in run_args if real.active]
Expand Down

0 comments on commit 2a4b6be

Please sign in to comment.