File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55# Standard library
66import argparse
77import csv
8- import json
98import os
109import re
1110import sys
6160 PATHS ["data_1-fetch" ], "arxiv_4_count_by_author_bucket.csv"
6261)
6362# records metadata for each run for audit, reproducibility, and provenance
64- FILE_PROVENANCE = shared .path_join (
65- PATHS ["data_1-fetch" ], "arxiv_provenance.json"
66- )
63+ FILE_PROVENANCE = shared .path_join (PATHS ["data" ], "arxiv_provenance.yaml" )
6764
6865HEADER_COUNT = ["TOOL_IDENTIFIER" , "COUNT" ]
6966HEADER_CATEGORY = ["TOOL_IDENTIFIER" , "CATEGORY" , "COUNT" ]
@@ -590,11 +587,11 @@ def query_arxiv(args):
590587 "script" : os .path .basename (__file__ ),
591588 }
592589
593- # write provenance JSON for auditing
590+ # write provenance YAML for auditing
594591 try :
595592 os .makedirs (os .path .dirname (FILE_PROVENANCE ), exist_ok = True )
596593 with open (FILE_PROVENANCE , "w" , encoding = "utf-8" ) as fh :
597- json .dump (provenance_data , fh , indent = 2 )
594+ yaml .dump (provenance_data , fh , default_flow_style = False , indent = 2 )
598595 except Exception as e :
599596 LOGGER .warning ("Failed to write provenance file: %s" , e )
600597
You can’t perform that action at this time.
0 commit comments