Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion scripts/3-report/gcs_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,13 @@ def parse_arguments():
return args


def check_report_completion(args):
last_entry = shared.path_join(PATHS["data_phase"], "gcs_free_culture.png")
if os.path.exists(last_entry) and not args.force:
LOGGER.info(f"{last_entry} already exists. Script completed")
return


def gcs_intro(args):
"""
Write Google Custom Search (GCS) introduction.
Expand Down Expand Up @@ -491,7 +498,7 @@ def main():
args = parse_arguments()
shared.paths_log(LOGGER, PATHS)
shared.git_fetch_and_merge(args, PATHS["repo"])

check_report_completion(args)
gcs_intro(args)
plot_products(args)
plot_tool_status(args)
Expand Down
10 changes: 10 additions & 0 deletions scripts/3-report/github_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,15 @@ def parse_arguments():
return args


def check_report_completion(args):
last_entry = shared.path_join(
PATHS["data_phase"], "github_restriction.png"
)
if os.path.exists(last_entry) and not args.force:
LOGGER.info(f"{last_entry} already exists. Script completed")
return


def load_data(args):
"""
Load the collected data from the CSV file.
Expand Down Expand Up @@ -243,6 +252,7 @@ def main():
args = parse_arguments()
shared.paths_log(LOGGER, PATHS)
shared.git_fetch_and_merge(args, PATHS["repo"])
check_report_completion(args)
github_intro(args)
plot_totals_by_license_type(args)
plot_totals_by_restriction(args)
Expand Down
10 changes: 10 additions & 0 deletions scripts/3-report/wikipedia_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,15 @@ def parse_arguments():
return args


def check_report_completion(args):
last_entry = shared.path_join(
PATHS["data_phase"], "wikipedia_least_language_usage.png"
)
if os.path.exists(last_entry) and not args.force:
LOGGER.info(f"{last_entry} already exists. Script completed")
return


def wikipedia_intro(args):
"""
Write Wikipedia introduction.
Expand Down Expand Up @@ -261,6 +270,7 @@ def main():
args = parse_arguments()
shared.paths_log(LOGGER, PATHS)
shared.git_fetch_and_merge(args, PATHS["repo"])
check_report_completion(args)
wikipedia_intro(args)
plot_language_representation(args)
plot_highest_language_usage(args)
Expand Down