From 5577b8ad7a2fabcb319a3d9c2f78cd72cb2b2e64 Mon Sep 17 00:00:00 2001 From: Liliana Millan Date: Fri, 29 Sep 2023 19:00:02 +0000 Subject: [PATCH] name of files for sorted entities --- src/triage/component/architect/utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/triage/component/architect/utils.py b/src/triage/component/architect/utils.py index 946df06e8..a51a95a79 100644 --- a/src/triage/component/architect/utils.py +++ b/src/triage/component/architect/utils.py @@ -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) \ No newline at end of file