@@ -49,14 +49,16 @@ class ChangeSummary:
49
49
artifacts.
50
50
"""
51
51
52
- def __init__ (self , new_artifacts_dir , current_artifacts_dir , file_list ):
52
+ def __init__ (self , new_artifacts_dir , current_artifacts_dir , temp_dir , file_list ):
53
53
"""Initializes an instance of a ChangeSummary.
54
54
55
55
Args:
56
56
new_artifacts_dir (str): The relative path to the directory with the
57
57
new discovery artifacts.
58
58
current_artifacts_dir (str): The relative path to the directory with
59
59
the current discovery artifacts.
60
+ temp_dir (str): The relative path to the directory used for
61
+ temporary storage where intermediate files will be stored.
60
62
file_list (list): A list of strings containing files to analyze.
61
63
"""
62
64
if file_list is None :
@@ -65,6 +67,7 @@ def __init__(self, new_artifacts_dir, current_artifacts_dir, file_list):
65
67
self ._file_list = file_list
66
68
self ._new_artifacts_dir = new_artifacts_dir
67
69
self ._current_artifacts_dir = current_artifacts_dir
70
+ self ._temp_dir = temp_dir
68
71
69
72
# Sanity checks to ensure artifact directories exist
70
73
self ._raise_if_artifacts_dir_not_found (self ._new_artifacts_dir )
@@ -497,16 +500,15 @@ def detect_discovery_changes(self):
497
500
sort_columns = ["Name" , "Version" , "ChangeType" , "Key" ]
498
501
result .sort_values (by = sort_columns , ascending = True , inplace = True )
499
502
500
- # Create a temp/ folder which be used by the `createcommits.sh` and
501
- # `buildprbody.py` scripts
502
- temp_folder = "temp/"
503
- os .makedirs (os .path .dirname (temp_folder ), exist_ok = True )
503
+ # Create a folder which be used by the `createcommits.sh` and
504
+ # `buildprbody.py` scripts.
505
+ os .makedirs (os .path .dirname (self ._temp_dir ), exist_ok = True )
504
506
505
507
# Create a summary which contains a conventional commit message
506
508
# for each API and write it to disk.
507
- summary_df = self ._get_summary_and_write_to_disk (result , temp_folder )
509
+ summary_df = self ._get_summary_and_write_to_disk (result , self . _temp_dir )
508
510
509
511
# Create verbose change information for each API which contains
510
512
# a list of changes by key and write it to disk.
511
- self ._write_verbose_changes_to_disk (result , temp_folder , summary_df )
513
+ self ._write_verbose_changes_to_disk (result , self . _temp_dir , summary_df )
512
514
0 commit comments