Skip to content
Snippets Groups Projects
Commit a6f9299e authored by Cain, Payton David's avatar Cain, Payton David
Browse files

print result, save file as json, set metadata start/end times with result

parent b6d434f2
No related branches found
No related tags found
2 merge requests!146Release CMO metadata to production,!76I/O metadata for generate_matrix
...@@ -75,8 +75,8 @@ def generate_matrix( ...@@ -75,8 +75,8 @@ def generate_matrix(
station=observatory, station=observatory,
created_by="generate_matrix", created_by="generate_matrix",
metadata=result.dict(), metadata=result.dict(),
starttime=starttime, starttime=result.starttime,
endtime=endtime, endtime=result.endtime,
network="NT", network="NT",
category=MetadataCategory.ADJUSTED_MATRIX, category=MetadataCategory.ADJUSTED_MATRIX,
) )
...@@ -84,7 +84,7 @@ def generate_matrix( ...@@ -84,7 +84,7 @@ def generate_matrix(
if output_file: if output_file:
with open(output_file, "w") as file: with open(output_file, "w") as file:
json.dump(result.dict(), file) file.write(result.json())
if not output_file and not output_metadata: if not output_file and not output_metadata:
raise ValueError("Output method not provided") print(result.json(indent=2))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment