Skip to content

Commit 0c72711

Browse files
authored
Merge pull request #21 from TaskarCenterAtUW/feature-1063-issues
Update osw_qm_calculator_service.py
2 parents 2bc0d3a + 0a98b6a commit 0c72711

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

src/services/osw_qm_calculator_service.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,19 +56,20 @@ def calculate_quality_metric(self, input_file, algorithm_names, output_path, ixn
5656
edges_file_basename = os.path.basename(edges_file_path)
5757
edges_file_without_extension = os.path.splitext(edges_file_basename)[0]
5858
for algorithm_name in algorithm_names:
59-
qm_edges_output_path = os.path.join(output_unzip_folder.name, f'{algorithm_name}_{edges_file_without_extension}.geojson')
59+
qm_edges_output_path = os.path.join(output_unzip_folder.name, f'{algorithm_name}_qm.geojson')
6060
qm_calculator = self.get_osw_qm_calculator(algorithm_name, ixn_file, edges_file_path, qm_edges_output_path)
6161
start_time = time.time()
6262
qm_calculator.calculate_quality_metric()
6363
end_time = time.time()
6464
logger.info(f"Time taken to calculate quality metrics for {algorithm_name}: {end_time - start_time} seconds")
6565
# Copy the rest of the files from input to output
66-
for file_path in input_files_path:
67-
if 'edges' in file_path:
68-
continue
69-
file_basename = os.path.basename(file_path)
70-
output_file_path = os.path.join(output_unzip_folder.name, file_basename)
71-
os.rename(file_path, output_file_path)
66+
# Dont copy the other files here.
67+
# for file_path in input_files_path:
68+
# if 'edges' in file_path:
69+
# continue
70+
# file_basename = os.path.basename(file_path)
71+
# output_file_path = os.path.join(output_unzip_folder.name, file_basename)
72+
# os.rename(file_path, output_file_path)
7273

7374
logger.info(f"Finished calculating quality metrics for input files: {input_files_path}")
7475
logger.info(f'Zipping output files to {output_path}')

0 commit comments

Comments
 (0)