Skip to content

Commit

Permalink
move yaml to end of file (#612)
Browse files Browse the repository at this point in the history
  • Loading branch information
doutriaux1 committed Jul 24, 2019
1 parent 794ebe7 commit 0ac0e39
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions pcmdi_metrics/io/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,9 @@ def write(self, data, type='json', mode="w", *args, **kwargs):
out_dict = OrderedDict({"provenance": generateProvenance()})
f = open(file_name, "w")
update_dict(out_dict, data)
if "yaml" in out_dict["provenance"]["conda"]:
out_dict["yaml"] = out_dict["provenance"]["conda"]["yaml"]
del(out_dict["provenance"]["conda"]["yaml"])
json.dump(out_dict, f, cls=CDMSDomainsEncoder, *args, **kwargs)
f.close()

Expand Down
4 changes: 2 additions & 2 deletions pcmdi_metrics/version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
__version__ = 'v1.2'
__git_tag_describe__ = 'v1.2-61-g10aeda6'
__git_sha1__ = '10aeda62665ba4bc671da10a0ff8facc708487f5'
__git_tag_describe__ = 'v1.2-65-g794ebe7'
__git_sha1__ = '794ebe7b363f440b52f2d51fe46a33f18286fc33'

0 comments on commit 0ac0e39

Please sign in to comment.