Skip to content

Commit

Permalink
name of files for sorted entities
Browse files Browse the repository at this point in the history
  • Loading branch information
silil committed Sep 29, 2023
1 parent e7ce3f1 commit 5577b8a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/triage/component/architect/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,8 +263,9 @@ def check_entity_ids_in_files(filenames, matrix_uuid):
# get first 2 columns on each file (entity_id, knowledge_date)
for element in filenames:
logging.debug(f"getting entity id and knowledge date from features {element}")
prefix = element.split(".")[0]
if (element.endswith(".csv")) and (element.startswith(matrix_uuid)):
cmd_line = f"cut -d ',' -f 1,2 {element}.csv | sort -k 1,2 > {element}_sorted.csv"
cmd_line = f"cut -d ',' -f 1,2 {element} | sort -k 1,2 > {prefix}_sorted.csv"
subprocess.run(cmd_line, shell=True)


0 comments on commit 5577b8a

Please sign in to comment.