Skip to content

Commit

Permalink
Save the list of cases after a build for reproducibility #186
Browse files Browse the repository at this point in the history
  • Loading branch information
aquemy committed Feb 17, 2022
1 parent 16c02e3 commit 60dc2e3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions echr/steps/generate_sqlite.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,19 @@ def get_files(doc_ids, input_folder):
return cases_files


def save_cases_list(build, cases_files):
path = os.path.join(build, 'build_cases.txt')
with open(path, 'w') as f:
for l in cases_files:
f.write('{}\n'.format(l.split('/')[-1].split('_')[0]))



def populate_database(console, build, update, doc_ids):
input_folder = os.path.join(build, 'raw', 'preprocessed_documents')

cases_files = get_files(doc_ids, input_folder)
save_cases_list(build, cases_files)

db.connect()
if True:
Expand Down

0 comments on commit 60dc2e3

Please sign in to comment.