File tree Expand file tree Collapse file tree 3 files changed +28
-1
lines changed
Expand file tree Collapse file tree 3 files changed +28
-1
lines changed Original file line number Diff line number Diff line change @@ -70,6 +70,13 @@ def parse_arguments():
7070 return args
7171
7272
73+ def check_report_completion (args ):
74+ last_entry = shared .path_join (PATHS ["data_phase" ], "gcs_free_culture.png" )
75+ if os .path .exists (last_entry ) and not args .force :
76+ LOGGER .info (f"{ last_entry } already exists. Script completed" )
77+ return
78+
79+
7380def gcs_intro (args ):
7481 """
7582 Write Google Custom Search (GCS) introduction.
@@ -491,7 +498,7 @@ def main():
491498 args = parse_arguments ()
492499 shared .paths_log (LOGGER , PATHS )
493500 shared .git_fetch_and_merge (args , PATHS ["repo" ])
494-
501+ check_report_completion ( args )
495502 gcs_intro (args )
496503 plot_products (args )
497504 plot_tool_status (args )
Original file line number Diff line number Diff line change @@ -73,6 +73,15 @@ def parse_arguments():
7373 return args
7474
7575
76+ def check_report_completion (args ):
77+ last_entry = shared .path_join (
78+ PATHS ["data_phase" ], "github_restriction.png"
79+ )
80+ if os .path .exists (last_entry ) and not args .force :
81+ LOGGER .info (f"{ last_entry } already exists. Script completed" )
82+ return
83+
84+
7685def load_data (args ):
7786 """
7887 Load the collected data from the CSV file.
@@ -243,6 +252,7 @@ def main():
243252 args = parse_arguments ()
244253 shared .paths_log (LOGGER , PATHS )
245254 shared .git_fetch_and_merge (args , PATHS ["repo" ])
255+ check_report_completion (args )
246256 github_intro (args )
247257 plot_totals_by_license_type (args )
248258 plot_totals_by_restriction (args )
Original file line number Diff line number Diff line change @@ -68,6 +68,15 @@ def parse_arguments():
6868 return args
6969
7070
71+ def check_report_completion (args ):
72+ last_entry = shared .path_join (
73+ PATHS ["data_phase" ], "wikipedia_least_language_usage.png"
74+ )
75+ if os .path .exists (last_entry ) and not args .force :
76+ LOGGER .info (f"{ last_entry } already exists. Script completed" )
77+ return
78+
79+
7180def wikipedia_intro (args ):
7281 """
7382 Write Wikipedia introduction.
@@ -261,6 +270,7 @@ def main():
261270 args = parse_arguments ()
262271 shared .paths_log (LOGGER , PATHS )
263272 shared .git_fetch_and_merge (args , PATHS ["repo" ])
273+ check_report_completion (args )
264274 wikipedia_intro (args )
265275 plot_language_representation (args )
266276 plot_highest_language_usage (args )
You can’t perform that action at this time.
0 commit comments