Skip to content

Commit 39e692e

Browse files
committed
Made review changes
1 parent 9d8b082 commit 39e692e

File tree

4 files changed

+12
-8
lines changed

4 files changed

+12
-8
lines changed

scripts/2-process/gcs_process.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ def process_product_totals(args, count_data):
120120
data.items(), columns=["CC legal tool product", "Count"]
121121
)
122122
file_path = shared.path_join(PATHS["data_phase"], "gcs_product_totals.csv")
123-
shared.data_to_csv(args, data, file_path, PATHS)
123+
shared.data_to_csv(args, data, file_path)
124124

125125

126126
def process_latest_prior_retired_totals(args, count_data):

scripts/2-process/github_process.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,8 @@ def process_totals_by_license(args, count_data):
9494
data.reset_index(drop=True, inplace=True)
9595
file_path = shared.path_join(
9696
PATHS["data_phase"], "github_totals_by_license.csv"
97-
shared.data_to_csv(args, data, file_paths, PATH)
97+
)
98+
shared.data_to_csv(args, data, file_path)
9899

99100

100101
def process_totals_by_restriction(args, count_data):
@@ -128,7 +129,7 @@ def process_totals_by_restriction(args, count_data):
128129
file_path = shared.path_join(
129130
PATHS["data_phase"], "github_totals_by_restriction.csv"
130131
)
131-
shared.data_to_csv(args, data, file_path, PATHS)
132+
shared.data_to_csv(args, data, file_path)
132133

133134

134135
def main():

scripts/2-process/wikipedia_process.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def process_highest_language_usage(args, count_data):
102102
file_path = shared.path_join(
103103
PATHS["data_phase"], "wikipedia_highest_language_usage.csv"
104104
)
105-
shared.data_to_csv(args, top_10, file_path, PATHS)
105+
shared.data_to_csv(args, top_10, file_path)
106106

107107

108108
def process_least_language_usage(args, count_data):
@@ -125,7 +125,8 @@ def process_least_language_usage(args, count_data):
125125
file_path = shared.path_join(
126126
PATHS["data_phase"], "wikipedia_least_language_usage.csv"
127127
)
128-
shared.data_to_csv(args, bottom_10, file_path, PATHS)
128+
shared.data_to_csv(args, bottom_10, file_path)
129+
129130

130131
def process_language_representation(args, count_data):
131132
"""
@@ -150,7 +151,7 @@ def process_language_representation(args, count_data):
150151
file_path = shared.path_join(
151152
PATHS["data_phase"], "wikipedia_language_representation.csv"
152153
)
153-
shared.data_to_csv(args, language_counts, file_path, PATHS)
154+
shared.data_to_csv(args, language_counts, file_path)
154155

155156

156157
def main():

scripts/shared.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,16 @@ def __init__(self, message, exit_code=None):
3737
super().__init__(self.message)
3838

3939

40-
def data_to_csv(args, data, file_path, PATHS):
40+
def data_to_csv(args, data, file_path):
4141
if not args.enable_save:
4242
return
43-
os.makedirs(PATHS["data_phase"], exist_ok=True)
43+
os.makedirs(args.paths["data_phase"], exist_ok=True)
4444
# emulate csv.unix_dialect
4545
data.to_csv(
4646
file_path, index=False, quoting=csv.QUOTE_ALL, lineterminator="\n"
4747
)
48+
49+
4850
def check_for_data_files(args, file_paths, QUARTER):
4951
if args.force:
5052
return

0 commit comments

Comments
 (0)