Skip to content

Commit

Permalink
Merge pull request #166 from molssi-seamm/dev
Browse files Browse the repository at this point in the history
Adding time to Results.json
  • Loading branch information
seamm committed May 3, 2024
2 parents d6fc040 + fb7af17 commit 040fd72
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
=======
History
=======
2024.5.3 -- Added the time to Results.json
* Adding time into the Results.json file will allow ensuring that the most
recent data is used, when there are duplicates.

2024.5.1 -- Added ability to store results in Results.json file
* Added column in the results tab for saving results to JSON
* Added separators between the columns of the results table to make clearer which
Expand Down
4 changes: 3 additions & 1 deletion seamm/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import bibtexparser
import calendar
import collections.abc
from datetime import datetime
from datetime import datetime, timezone
import hashlib

try:
Expand Down Expand Up @@ -1257,6 +1257,8 @@ def store_results(

# Save the data as JSON
if len(json_data) > 0:
# Add a timestamp
json_data["iso time"] = datetime.now(timezone.utc).isoformat()
path = Path(self.directory) / "Results.json"
with path.open("w") as fd:
json.dump(
Expand Down

0 comments on commit 040fd72

Please sign in to comment.