diff --git a/diagrams/dasharo_forks.py b/diagrams/dasharo_forks.py index 3d2b2b6..1286dc1 100755 --- a/diagrams/dasharo_forks.py +++ b/diagrams/dasharo_forks.py @@ -13,12 +13,15 @@ logging.basicConfig(level=logging.INFO, handlers=[logging.StreamHandler()]) def run_gh_command(command): try: - result = subprocess.run(command, shell=True, check=True, text=True, capture_output=True) + result = subprocess.run( + command, shell=True, check=True, text=True, capture_output=True + ) return result.stdout.strip() except subprocess.CalledProcessError as e: print(f"An error occurred: {e}") return None + def count_prs(repo, state, date): # Construct the GitHub CLI command command = f"gh pr list --repo {repo} --state {state} --search 'created:<={date}' -L 10000 --json number --jq '. | length'" @@ -32,6 +35,7 @@ def count_prs(repo, state, date): else: return 0 + def count_closed_prs(repo, state, date): # Construct the GitHub CLI command command = f"gh pr list --repo {repo} --state {state} --search 'closed:<={date}' -L 10000 --json number --jq '. | length'" @@ -45,7 +49,17 @@ def count_closed_prs(repo, state, date): else: return 0 -dates = ["2023-03-16", "2023-07-06", "2023-09-28", "2023-12-03", "2024-03-11", "2024-06-10", "2024-09-09", "2024-12-10"] + +dates = [ + "2023-03-16", + "2023-07-06", + "2023-09-28", + "2023-12-03", + "2024-03-11", + "2024-06-10", + "2024-09-09", + "2024-12-10", +] repo = "Dasharo/coreboot" # Data storage @@ -53,10 +67,10 @@ data = {"Merged": [], "Closed": [], "Open": []} # Gather data for date in dates: - total_prs = count_prs(repo, 'all', date) - merged_prs = count_prs(repo, 'merged', date) - closed_prs = count_closed_prs(repo, 'closed', date) - merged_prs - open_prs = count_prs(repo, 'open', date) + total_prs = count_prs(repo, "all", date) + merged_prs = count_prs(repo, "merged", date) + closed_prs = count_closed_prs(repo, "closed", date) - merged_prs + open_prs = count_prs(repo, "open", date) data["Merged"].append(merged_prs) data["Closed"].append(closed_prs) data["Open"].append(open_prs) @@ -65,46 +79,81 @@ for date in dates: plt.figure(figsize=(10, 6)) # Stacked bar chart -bars_merged = plt.bar(dates, data["Merged"], color='#38d430', label='Merged PRs') -bars_closed = plt.bar(dates, data["Closed"], bottom=data["Merged"], color='#272727', label='Closed PRs') -bars_open = plt.bar(dates, data["Open"], bottom=[m+c for m, c in zip(data["Merged"], data["Closed"])], color='#1E90FF', label='Open PRs') +bars_merged = plt.bar(dates, data["Merged"], color="#38d430", label="Merged PRs") +bars_closed = plt.bar( + dates, data["Closed"], bottom=data["Merged"], color="#272727", label="Closed PRs" +) +bars_open = plt.bar( + dates, + data["Open"], + bottom=[m + c for m, c in zip(data["Merged"], data["Closed"])], + color="#1E90FF", + label="Open PRs", +) # Add titles and labels -plt.title('PR Statistics for Dasharo/coreboot downstream', fontsize=18, fontweight='bold', color='#272727') -plt.xlabel('Date', fontsize=16, fontweight='bold', color='#272727') -plt.ylabel('Number of PRs', fontsize=16, fontweight='bold', color='#272727') +plt.title( + "PR Statistics for Dasharo/coreboot downstream", + fontsize=18, + fontweight="bold", + color="#272727", +) +plt.xlabel("Date", fontsize=16, fontweight="bold", color="#272727") +plt.ylabel("Number of PRs", fontsize=16, fontweight="bold", color="#272727") + def add_labels_merged(bars): for bar in bars: height = bar.get_height() font_s = 14 - plt.annotate(f'{height}', - xy=(bar.get_x() + bar.get_width() / 2, bar.get_y() + height / 2), - xytext=(0, 3), # 3 points vertical offset - textcoords="offset points", - ha='center', va='bottom', color='white', fontsize=font_s, fontweight='bold') + plt.annotate( + f"{height}", + xy=(bar.get_x() + bar.get_width() / 2, bar.get_y() + height / 2), + xytext=(0, 3), # 3 points vertical offset + textcoords="offset points", + ha="center", + va="bottom", + color="white", + fontsize=font_s, + fontweight="bold", + ) + def add_labels_closed(bars, offset=0): for bar in bars: height = bar.get_height() font_s = 14 logging.info("height:{}, x:{}, y:{}".format(height, bar.get_x(), bar.get_y())) - plt.annotate(f'{height}', - xy=(bar.get_x() + bar.get_width() / 2, bar.get_y() + height / 2 - offset), - xytext=(0, 3), # 3 points vertical offset - textcoords="offset points", - ha='center', va='bottom', color='white', fontsize=font_s, fontweight='bold') + plt.annotate( + f"{height}", + xy=(bar.get_x() + bar.get_width() / 2, bar.get_y() + height / 2 - offset), + xytext=(0, 3), # 3 points vertical offset + textcoords="offset points", + ha="center", + va="bottom", + color="white", + fontsize=font_s, + fontweight="bold", + ) + def add_labels_open(bars, offset=0): for bar in bars: height = bar.get_height() font_s = 14 logging.info("height:{}, x:{}, y:{}".format(height, bar.get_x(), bar.get_y())) - plt.annotate(f'{height}', - xy=(bar.get_x() + bar.get_width() / 2, bar.get_y() + height / 2 - offset), - xytext=(0, 3), # 3 points vertical offset - textcoords="offset points", - ha='center', va='bottom', color='black', fontsize=font_s, fontweight='bold') + plt.annotate( + f"{height}", + xy=(bar.get_x() + bar.get_width() / 2, bar.get_y() + height / 2 - offset), + xytext=(0, 3), # 3 points vertical offset + textcoords="offset points", + ha="center", + va="bottom", + color="black", + fontsize=font_s, + fontweight="bold", + ) + # Add labels to the bars add_labels_merged(bars_merged) @@ -115,10 +164,10 @@ add_labels_open(bars_open, offset=5) plt.legend(fontsize=12) # Set the background color -plt.gca().set_facecolor('#f5f5f5') +plt.gca().set_facecolor("#f5f5f5") # Save the plot as an image file -plt.savefig('public/dug_8/dasharo_coreboot.png') +plt.savefig("public/dug_8/dasharo_coreboot.png") # Optionally, close the plot to free up memory plt.close() @@ -130,9 +179,9 @@ data = {"Merged": [], "Closed": [], "Open": []} # Gather data for date in dates: - merged_prs = count_prs(repo, 'merged', date) - closed_prs = count_closed_prs(repo, 'closed', date) - merged_prs - open_prs = count_prs(repo, 'open', date) + merged_prs = count_prs(repo, "merged", date) + closed_prs = count_closed_prs(repo, "closed", date) - merged_prs + open_prs = count_prs(repo, "open", date) data["Merged"].append(merged_prs) data["Closed"].append(closed_prs) data["Open"].append(open_prs) @@ -141,14 +190,27 @@ for date in dates: plt.figure(figsize=(10, 6)) # Stacked bar chart -bars_merged = plt.bar(dates, data["Merged"], color='#38d430', label='Merged PRs') -bars_closed = plt.bar(dates, data["Closed"], bottom=data["Merged"], color='#272727', label='Closed PRs') -bars_open = plt.bar(dates, data["Open"], bottom=[m+c for m, c in zip(data["Merged"], data["Closed"])], color='#1E90FF', label='Open PRs') +bars_merged = plt.bar(dates, data["Merged"], color="#38d430", label="Merged PRs") +bars_closed = plt.bar( + dates, data["Closed"], bottom=data["Merged"], color="#272727", label="Closed PRs" +) +bars_open = plt.bar( + dates, + data["Open"], + bottom=[m + c for m, c in zip(data["Merged"], data["Closed"])], + color="#1E90FF", + label="Open PRs", +) # Add titles and labels -plt.title('PR Statistics for Dasharo/edk2 fork', fontsize=18, fontweight='bold', color='#272727') -plt.xlabel('Date', fontsize=16, fontweight='bold', color='#272727') -plt.ylabel('Number of PRs', fontsize=16, fontweight='bold', color='#272727') +plt.title( + "PR Statistics for Dasharo/edk2 fork", + fontsize=18, + fontweight="bold", + color="#272727", +) +plt.xlabel("Date", fontsize=16, fontweight="bold", color="#272727") +plt.ylabel("Number of PRs", fontsize=16, fontweight="bold", color="#272727") # Add labels to the bars add_labels_merged(bars_merged) @@ -159,10 +221,10 @@ add_labels_open(bars_open, offset=1) plt.legend(fontsize=12) # Set the background color -plt.gca().set_facecolor('#f5f5f5') +plt.gca().set_facecolor("#f5f5f5") # Save the plot as an image file -plt.savefig('public/dug_8/dasharo_edk2.png') +plt.savefig("public/dug_8/dasharo_edk2.png") # Optionally, close the plot to free up memory plt.close() diff --git a/diagrams/dasharo_issues.py b/diagrams/dasharo_issues.py index 6bf1db6..8679c95 100755 --- a/diagrams/dasharo_issues.py +++ b/diagrams/dasharo_issues.py @@ -14,25 +14,30 @@ import requests from datetime import datetime import subprocess + def get_github_token(): # Path to the GitHub hosts.yml file - config_path = os.path.expanduser('~/.config/gh/hosts.yml') + config_path = os.path.expanduser("~/.config/gh/hosts.yml") # Read the YAML file - with open(config_path, 'r') as file: + with open(config_path, "r") as file: config = yaml.safe_load(file) # Extract the OAuth token - return config['github.com']['oauth_token'] + return config["github.com"]["oauth_token"] + def run_gh_command(command): try: - result = subprocess.run(command, shell=True, check=True, text=True, capture_output=True) + result = subprocess.run( + command, shell=True, check=True, text=True, capture_output=True + ) return result.stdout.strip() except subprocess.CalledProcessError as e: print(f"An error occurred: {e}") return None + def count_issues(repo, state, date): # Construct the GitHub CLI command command = f"gh issue list --repo {repo} --state {state} --search 'created:<={date}' -L 10000 --json number --jq '. | length'" @@ -46,6 +51,7 @@ def count_issues(repo, state, date): else: return 0 + def count_closed_issues(repo, state, date): # Construct the GitHub CLI command command = f"gh issue list --repo {repo} --state {state} --search 'closed:<={date}' -L 10000 --json number --jq '. | length'" @@ -59,16 +65,26 @@ def count_closed_issues(repo, state, date): else: return 0 + repo = "Dasharo/dasharo-issues" -dates = ["2023-03-16", "2023-07-06", "2023-09-28", "2023-12-03", "2024-03-11", "2024-06-10", "2024-09-09", "2024-12-10"] +dates = [ + "2023-03-16", + "2023-07-06", + "2023-09-28", + "2023-12-03", + "2024-03-11", + "2024-06-10", + "2024-09-09", + "2024-12-10", +] # Data storage data = {"Closed": [], "Open": []} # Gather data for date in dates: - closed_issues = count_closed_issues(repo, 'closed', date) - open_issues = count_issues(repo, 'open', date) + closed_issues = count_closed_issues(repo, "closed", date) + open_issues = count_issues(repo, "open", date) data["Closed"].append(closed_issues) data["Open"].append(open_issues) @@ -76,23 +92,33 @@ for date in dates: plt.figure(figsize=(10, 6)) # Stacked bar chart -bars_closed = plt.bar(dates, data["Closed"], color='#38d430', label='Closed issues') -bars_open = plt.bar(dates, data["Open"], bottom=data["Closed"], color='#272727', label='Open issues') +bars_closed = plt.bar(dates, data["Closed"], color="#38d430", label="Closed issues") +bars_open = plt.bar( + dates, data["Open"], bottom=data["Closed"], color="#272727", label="Open issues" +) # Add titles and labels -plt.title('Dasharo Issues Statistics', fontsize=18, fontweight='bold', color='#272727') -plt.xlabel('Date', fontsize=16, fontweight='bold', color='#272727') -plt.ylabel('Number of Issues', fontsize=16, fontweight='bold', color='#272727') +plt.title("Dasharo Issues Statistics", fontsize=18, fontweight="bold", color="#272727") +plt.xlabel("Date", fontsize=16, fontweight="bold", color="#272727") +plt.ylabel("Number of Issues", fontsize=16, fontweight="bold", color="#272727") + # Function to add labels inside the bars -def add_labels(bars, color='white'): +def add_labels(bars, color="white"): for bar in bars: height = bar.get_height() - plt.annotate(f'{height}', - xy=(bar.get_x() + bar.get_width() / 2, bar.get_y() + height / 2), - xytext=(0, 3), # 3 points vertical offset - textcoords="offset points", - ha='center', va='bottom', color=color, fontsize=14, fontweight='bold') + plt.annotate( + f"{height}", + xy=(bar.get_x() + bar.get_width() / 2, bar.get_y() + height / 2), + xytext=(0, 3), # 3 points vertical offset + textcoords="offset points", + ha="center", + va="bottom", + color=color, + fontsize=14, + fontweight="bold", + ) + # Add labels to the bars add_labels(bars_closed) @@ -102,10 +128,10 @@ add_labels(bars_open) plt.legend(fontsize=12) # Set the background color -plt.gca().set_facecolor('#f5f5f5') +plt.gca().set_facecolor("#f5f5f5") # Save the plot as an image file -plt.savefig('public/dug_8/dasharo_issues.png') +plt.savefig("public/dug_8/dasharo_issues.png") # Optionally, close the plot to free up memory plt.close() diff --git a/diagrams/dasharo_market_share.py b/diagrams/dasharo_market_share.py index ae8aef3..02029e9 100755 --- a/diagrams/dasharo_market_share.py +++ b/diagrams/dasharo_market_share.py @@ -14,76 +14,76 @@ laptops = {} desktops = {} workstation = {} -emulation["Q3'21"] = 0 -emulation["Q4'21"] = 0 -emulation["Q1'22"] = 0 -emulation["Q2'22"] = 0 -emulation["Q3'22"] = 0 -emulation["Q4'22"] = 0 -emulation["Q1'23"] = 0 -emulation["Q2'23"] = 0 -emulation["Q3'23"] = 0 -emulation["Q4'23"] = 1 -emulation["Q1'24"] = 0 -emulation["Q2'24"] = 1 -emulation["Q3'24"] = 0 -emulation["Q4'24"] = 0 -laptops["Q3'21"] = 3 -laptops["Q4'21"] = 3 -laptops["Q1'22"] = 5 -laptops["Q2'22"] = 4 -laptops["Q3'22"] = 1 -laptops["Q4'22"] = 3 -laptops["Q1'23"] = 2 -laptops["Q2'23"] = 2 -laptops["Q3'23"] = 0 -laptops["Q4'23"] = 4 -laptops["Q1'24"] = 5 -laptops["Q2'24"] = 1 -laptops["Q3'24"] = 2 -laptops["Q4'24"] = 2 -network_appliance["Q3'21"] = 0 -network_appliance["Q4'21"] = 0 -network_appliance["Q1'22"] = 1 -network_appliance["Q2'22"] = 2 -network_appliance["Q3'22"] = 2 -network_appliance["Q4'22"] = 3 -network_appliance["Q1'23"] = 1 -network_appliance["Q2'23"] = 2 -network_appliance["Q3'23"] = 0 -network_appliance["Q4'23"] = 0 -network_appliance["Q1'24"] = 1 -network_appliance["Q2'24"] = 4 -network_appliance["Q3'24"] = 2 -network_appliance["Q4'24"] = 0 -desktops["Q3'21"] = 0 -desktops["Q4'21"] = 0 -desktops["Q1'22"] = 0 -desktops["Q2'22"] = 5 -desktops["Q3'22"] = 0 -desktops["Q4'22"] = 1 -desktops["Q1'23"] = 1 -desktops["Q2'23"] = 0 -desktops["Q3'23"] = 2 -desktops["Q4'23"] = 0 -desktops["Q1'24"] = 4 -desktops["Q2'24"] = 0 -desktops["Q3'24"] = 0 -desktops["Q4'24"] = 2 -workstation["Q3'21"] = 0 -workstation["Q4'21"] = 4 -workstation["Q1'22"] = 1 -workstation["Q2'22"] = 1 -workstation["Q3'22"] = 2 -workstation["Q4'22"] = 0 -workstation["Q1'23"] = 0 -workstation["Q2'23"] = 0 -workstation["Q3'23"] = 1 -workstation["Q4'23"] = 0 -workstation["Q1'24"] = 0 -workstation["Q2'24"] = 0 -workstation["Q3'24"] = 0 -workstation["Q4'24"] = 0 +emulation["Q3'21"] = 0 +emulation["Q4'21"] = 0 +emulation["Q1'22"] = 0 +emulation["Q2'22"] = 0 +emulation["Q3'22"] = 0 +emulation["Q4'22"] = 0 +emulation["Q1'23"] = 0 +emulation["Q2'23"] = 0 +emulation["Q3'23"] = 0 +emulation["Q4'23"] = 1 +emulation["Q1'24"] = 0 +emulation["Q2'24"] = 1 +emulation["Q3'24"] = 0 +emulation["Q4'24"] = 0 +laptops["Q3'21"] = 3 +laptops["Q4'21"] = 3 +laptops["Q1'22"] = 5 +laptops["Q2'22"] = 4 +laptops["Q3'22"] = 1 +laptops["Q4'22"] = 3 +laptops["Q1'23"] = 2 +laptops["Q2'23"] = 2 +laptops["Q3'23"] = 0 +laptops["Q4'23"] = 4 +laptops["Q1'24"] = 5 +laptops["Q2'24"] = 1 +laptops["Q3'24"] = 2 +laptops["Q4'24"] = 2 +network_appliance["Q3'21"] = 0 +network_appliance["Q4'21"] = 0 +network_appliance["Q1'22"] = 1 +network_appliance["Q2'22"] = 2 +network_appliance["Q3'22"] = 2 +network_appliance["Q4'22"] = 3 +network_appliance["Q1'23"] = 1 +network_appliance["Q2'23"] = 2 +network_appliance["Q3'23"] = 0 +network_appliance["Q4'23"] = 0 +network_appliance["Q1'24"] = 1 +network_appliance["Q2'24"] = 4 +network_appliance["Q3'24"] = 2 +network_appliance["Q4'24"] = 0 +desktops["Q3'21"] = 0 +desktops["Q4'21"] = 0 +desktops["Q1'22"] = 0 +desktops["Q2'22"] = 5 +desktops["Q3'22"] = 0 +desktops["Q4'22"] = 1 +desktops["Q1'23"] = 1 +desktops["Q2'23"] = 0 +desktops["Q3'23"] = 2 +desktops["Q4'23"] = 0 +desktops["Q1'24"] = 4 +desktops["Q2'24"] = 0 +desktops["Q3'24"] = 0 +desktops["Q4'24"] = 2 +workstation["Q3'21"] = 0 +workstation["Q4'21"] = 4 +workstation["Q1'22"] = 1 +workstation["Q2'22"] = 1 +workstation["Q3'22"] = 2 +workstation["Q4'22"] = 0 +workstation["Q1'23"] = 0 +workstation["Q2'23"] = 0 +workstation["Q3'23"] = 1 +workstation["Q4'23"] = 0 +workstation["Q1'24"] = 0 +workstation["Q2'24"] = 0 +workstation["Q3'24"] = 0 +workstation["Q4'24"] = 0 dates = list(laptops.keys()) emulation_values = np.array(list(emulation.values())) @@ -92,27 +92,77 @@ laptop_values = np.array(list(laptops.values())) desktop_values = np.array(list(desktops.values())) workstation_values = np.array(list(workstation.values())) -total_releases = sum(emulation_values) + sum(network_appliance_values) + sum(laptop_values) + sum(desktop_values) + sum(workstation_values) +total_releases = ( + sum(emulation_values) + + sum(network_appliance_values) + + sum(laptop_values) + + sum(desktop_values) + + sum(workstation_values) +) plt.figure(figsize=(10, 6)) -bars_emulation = plt.bar(dates, emulation_values, color='#272727', label=f'Emulation ({sum(emulation_values)/total_releases*100:.1f}%)') -bars_network_appliance = plt.bar(dates, network_appliance_values, bottom=emulation_values, color='#1f77b4', label=f'Network Appliance ({sum(network_appliance_values)/total_releases*100:.1f}%)') -bars_laptop = plt.bar(dates, laptop_values, bottom=emulation_values+network_appliance_values, color='#38d430', label=f'Laptop ({sum(laptop_values)/total_releases*100:.1f}%)') -bars_desktop = plt.bar(dates, desktop_values, bottom=emulation_values+network_appliance_values+laptop_values, color='#ff7f0e', label=f'Desktop ({sum(desktop_values)/total_releases*100:.1f}%)') -bars_workstation = plt.bar(dates, workstation_values, bottom=emulation_values+network_appliance_values+laptop_values+desktop_values, color='#d62728', label=f'Workstation ({sum(workstation_values)/total_releases*100:.1f}%)') +bars_emulation = plt.bar( + dates, + emulation_values, + color="#272727", + label=f"Emulation ({sum(emulation_values)/total_releases*100:.1f}%)", +) +bars_network_appliance = plt.bar( + dates, + network_appliance_values, + bottom=emulation_values, + color="#1f77b4", + label=f"Network Appliance ({sum(network_appliance_values)/total_releases*100:.1f}%)", +) +bars_laptop = plt.bar( + dates, + laptop_values, + bottom=emulation_values + network_appliance_values, + color="#38d430", + label=f"Laptop ({sum(laptop_values)/total_releases*100:.1f}%)", +) +bars_desktop = plt.bar( + dates, + desktop_values, + bottom=emulation_values + network_appliance_values + laptop_values, + color="#ff7f0e", + label=f"Desktop ({sum(desktop_values)/total_releases*100:.1f}%)", +) +bars_workstation = plt.bar( + dates, + workstation_values, + bottom=emulation_values + network_appliance_values + laptop_values + desktop_values, + color="#d62728", + label=f"Workstation ({sum(workstation_values)/total_releases*100:.1f}%)", +) + +plt.title( + "Dasharo Public Releases per market segment", + fontsize=18, + fontweight="bold", + color="#272727", +) +plt.xlabel("Date", fontsize=16, fontweight="bold", color="#272727") +plt.ylabel("Number of Releases", fontsize=16, fontweight="bold", color="#272727") -plt.title('Dasharo Public Releases per market segment', fontsize=18, fontweight='bold', color='#272727') -plt.xlabel('Date', fontsize=16, fontweight='bold', color='#272727') -plt.ylabel('Number of Releases', fontsize=16, fontweight='bold', color='#272727') # Function to add labels inside the bars -def add_labels(bars, color='white', offset=0): +def add_labels(bars, color="white", offset=0): for bar in bars: height = bar.get_height() if height != 0: - plt.text(bar.get_x() + bar.get_width() / 2, bar.get_y() + height / 2, - f'{height}', ha='center', va='center', color=color, fontsize=14, fontweight='bold') + plt.text( + bar.get_x() + bar.get_width() / 2, + bar.get_y() + height / 2, + f"{height}", + ha="center", + va="center", + color=color, + fontsize=14, + fontweight="bold", + ) + add_labels(bars_emulation) add_labels(bars_network_appliance) @@ -122,8 +172,8 @@ add_labels(bars_workstation) plt.legend(fontsize=12) -plt.gca().set_facecolor('#f5f5f5') +plt.gca().set_facecolor("#f5f5f5") -plt.savefig('public/dug_8/dasharo_per_segment.png', dpi=300) +plt.savefig("public/dug_8/dasharo_per_segment.png", dpi=300) plt.close() diff --git a/diagrams/dasharo_roadmap.py b/diagrams/dasharo_roadmap.py index 39c7968..69dc147 100755 --- a/diagrams/dasharo_roadmap.py +++ b/diagrams/dasharo_roadmap.py @@ -23,20 +23,42 @@ roadmap.add_logo("img/dasharo_logo_white.png", "top-right", 140, 140) sample_1 = roadmap.add_group("coreboot+UEFI\nv0.9.0") -sample_1.add_task("Validation", "2024-10-01", "2024-12-31", style="rounded", fill_colour="#34A853") -sample_1.add_task("DPP Release", "2025-01-01", "2025-03-31", style="rounded", fill_colour="#FD7E14") +sample_1.add_task( + "Validation", "2024-10-01", "2024-12-31", style="rounded", fill_colour="#34A853" +) +sample_1.add_task( + "DPP Release", "2025-01-01", "2025-03-31", style="rounded", fill_colour="#FD7E14" +) sample_2 = roadmap.add_group("coreboot+SeaBIOS\nv24.08.00.01", font_size=31) -sample_2.add_task("Validation", "2025-04-01", "2025-06-30", style="rounded", fill_colour="#34A853") -sample_2.add_task("DPP Release", "2025-07-01", "2025-09-30", style="rounded", fill_colour="#FD7E14") +sample_2.add_task( + "Validation", "2025-04-01", "2025-06-30", style="rounded", fill_colour="#34A853" +) +sample_2.add_task( + "DPP Release", "2025-07-01", "2025-09-30", style="rounded", fill_colour="#FD7E14" +) sample_3 = roadmap.add_group("coreboot+Heads\nv0.9.0") -sample_3.add_task("Release Candidate", "2025-01-01", "2025-03-31", style="rounded", fill_colour="#7E14FD") -sample_3.add_task("Community Release", "2025-04-01", "2025-06-30", style="rounded", fill_colour="#ADD8E6") +sample_3.add_task( + "Release Candidate", + "2025-01-01", + "2025-03-31", + style="rounded", + fill_colour="#7E14FD", +) +sample_3.add_task( + "Community Release", + "2025-04-01", + "2025-06-30", + style="rounded", + fill_colour="#ADD8E6", +) -roadmap.set_footer(f"Dasharo Community Support Roadmap | {date} ({version}) | CC-BY-SA-4.0") +roadmap.set_footer( + f"Dasharo Community Support Roadmap | {date} ({version}) | CC-BY-SA-4.0" +) roadmap.draw() roadmap.save(f"public/{dug_id}/dcs_sample_roadmap_{version}.png") @@ -51,10 +73,24 @@ roadmap.add_logo("img/dasharo_logo_white.png", "top-right", 140, 140) qemu_q35_v24080001 = roadmap.add_group("coreboot+UEFI\nv24.08.00.01") -qemu_q35_v24080001.add_task("Release Candidate", "2024-10-01", "2024-12-31", style="rounded", fill_colour="#7E14FD") -qemu_q35_v24080001.add_task("Community Release", "2025-01-01", "2025-03-31", style="rounded", fill_colour="#ADD8E6") +qemu_q35_v24080001.add_task( + "Release Candidate", + "2024-10-01", + "2024-12-31", + style="rounded", + fill_colour="#7E14FD", +) +qemu_q35_v24080001.add_task( + "Community Release", + "2025-01-01", + "2025-03-31", + style="rounded", + fill_colour="#ADD8E6", +) -roadmap.set_footer(f"Dasharo Community Support Roadmap | {date} ({version}) | CC-BY-SA-4.0") +roadmap.set_footer( + f"Dasharo Community Support Roadmap | {date} ({version}) | CC-BY-SA-4.0" +) roadmap.draw() roadmap.save(f"public/{dug_id}/dcs_emu_roadmap_{version}.png") @@ -71,11 +107,19 @@ pcengines_24080001 = roadmap.add_group("coreboot+SeaBIOS\nv24.08.00.01", font_si pcengines_24110001 = roadmap.add_group("coreboot+SeaBIOS\nv24.11.00.01", font_size=28) pcengines_091 = roadmap.add_group("coreboot+UEFI\nv0.9.1", font_size=28) -pcengines_091.add_task("DPP\nRelease", "2025-01-01", "2025-03-31", style="rounded", fill_colour="#FD7E14") -pcengines_24080001.add_task("DPP\nRelease", "2024-10-01", "2024-12-31", style="rounded", fill_colour="#FD7E14") -pcengines_24110001.add_task("DPP\nRelease", "2024-10-01", "2024-12-31", style="rounded", fill_colour="#FD7E14") +pcengines_091.add_task( + "DPP\nRelease", "2025-01-01", "2025-03-31", style="rounded", fill_colour="#FD7E14" +) +pcengines_24080001.add_task( + "DPP\nRelease", "2024-10-01", "2024-12-31", style="rounded", fill_colour="#FD7E14" +) +pcengines_24110001.add_task( + "DPP\nRelease", "2024-10-01", "2024-12-31", style="rounded", fill_colour="#FD7E14" +) -roadmap.set_footer(f"Dasharo Community Support Roadmap | {date} ({version}) | CC-BY-SA-4.0") +roadmap.set_footer( + f"Dasharo Community Support Roadmap | {date} ({version}) | CC-BY-SA-4.0" +) roadmap.draw() roadmap.save(f"public/{dug_id}/dcs_network_appliance_roadmap_{version}_pt1.png") @@ -87,9 +131,13 @@ roadmap.set_timeline(TimelineMode.QUARTERLY, start="2024-10-01", number_of_items roadmap.add_logo("img/dasharo_logo_white.png", "top-right", 140, 140) protectli = roadmap.add_group("coreboot+SeaBIOS\nv0.9.0", font_size=30) -protectli.add_task("DPP\nRelease", "2025-01-01", "2025-03-31", style="rounded", fill_colour="#FD7E14") +protectli.add_task( + "DPP\nRelease", "2025-01-01", "2025-03-31", style="rounded", fill_colour="#FD7E14" +) -roadmap.set_footer(f"Dasharo Community Support Roadmap | {date} ({version}) | CC-BY-SA-4.0") +roadmap.set_footer( + f"Dasharo Community Support Roadmap | {date} ({version}) | CC-BY-SA-4.0" +) roadmap.draw() roadmap.save(f"public/{dug_id}/dcs_network_appliance_roadmap_{version}_pt2.png") @@ -100,9 +148,13 @@ roadmap.set_timeline(TimelineMode.QUARTERLY, start="2024-01-01", number_of_items roadmap.add_logo("img/dasharo_logo_white.png", "top-right", 140, 140) mb = roadmap.add_group("Dasharo (coreboot+UEFI)\nv0.9.0\n") -mb.add_task("DPP\nRelease", "2024-10-01", "2024-12-31", style="rounded", fill_colour="#FD7E14") +mb.add_task( + "DPP\nRelease", "2024-10-01", "2024-12-31", style="rounded", fill_colour="#FD7E14" +) -roadmap.set_footer(f"Dasharo Community Support Roadmap | {date} ({version}) | CC-BY-SA-4.0") +roadmap.set_footer( + f"Dasharo Community Support Roadmap | {date} ({version}) | CC-BY-SA-4.0" +) roadmap.draw() roadmap.save(f"public/{dug_id}/dcs_network_appliance_roadmap_{version}_pt3.png") @@ -113,11 +165,24 @@ roadmap.set_timeline(TimelineMode.QUARTERLY, start="2024-07-01", number_of_items roadmap.add_logo("img/dasharo_logo_white.png", "top-right", 140, 140) mb = roadmap.add_group("coreboot+UEFI\nv0.9.0") -mb.add_task("Porting", "2024-07-01", "2024-08-15", style="rounded", fill_colour="#EA4335") -mb.add_task("Validation", "2024-08-16", "2024-09-30", style="rounded", fill_colour="#34A853", font_size=23) -mb.add_task("DPP Release", "2024-10-01", "2024-12-31", style="rounded", fill_colour="#FD7E14") +mb.add_task( + "Porting", "2024-07-01", "2024-08-15", style="rounded", fill_colour="#EA4335" +) +mb.add_task( + "Validation", + "2024-08-16", + "2024-09-30", + style="rounded", + fill_colour="#34A853", + font_size=23, +) +mb.add_task( + "DPP Release", "2024-10-01", "2024-12-31", style="rounded", fill_colour="#FD7E14" +) -roadmap.set_footer(f"Dasharo Community Support Roadmap | {date} ({version}) | CC-BY-SA-4.0") +roadmap.set_footer( + f"Dasharo Community Support Roadmap | {date} ({version}) | CC-BY-SA-4.0" +) roadmap.draw() roadmap.save(f"public/{dug_id}/dcs_network_appliance_roadmap_{version}_pt4.png") @@ -131,16 +196,30 @@ roadmap.set_timeline(TimelineMode.QUARTERLY, start="2024-10-01", number_of_items roadmap.add_logo("img/dasharo_logo_white.png", "top-right", 140, 140) novacustom_v56tu = roadmap.add_group("V56TU\ncoreboot+Heads\nv0.9.0") -novacustom_v56tu.add_task("Validation", "2024-10-01", "2024-12-31", style="rounded", fill_colour="#34A853") -novacustom_v56tu.add_task("DPP Release", "2024-10-01", "2024-12-31", style="rounded", fill_colour="#FD7E14") +novacustom_v56tu.add_task( + "Validation", "2024-10-01", "2024-12-31", style="rounded", fill_colour="#34A853" +) +novacustom_v56tu.add_task( + "DPP Release", "2024-10-01", "2024-12-31", style="rounded", fill_colour="#FD7E14" +) novacustom_nv4x = roadmap.add_group("NV4x\ncoreboot+Heads\nv0.9.2") -novacustom_nv4x.add_task("Validation", "2025-01-01", "2025-03-31", style="rounded", fill_colour="#34A853") -novacustom_nv4x.add_task("DPP Release", "2025-01-01", "2025-03-31", style="rounded", fill_colour="#FD7E14") +novacustom_nv4x.add_task( + "Validation", "2025-01-01", "2025-03-31", style="rounded", fill_colour="#34A853" +) +novacustom_nv4x.add_task( + "DPP Release", "2025-01-01", "2025-03-31", style="rounded", fill_colour="#FD7E14" +) novacustom_172x = roadmap.add_group("NV4x\ncoreboot+SeaBIOS\nv1.7.2.x", font_size=31) -novacustom_172x.add_task("Validation", "2025-01-01", "2025-03-31", style="rounded", fill_colour="#34A853") -novacustom_172x.add_task("DPP Release", "2025-01-01", "2025-03-31", style="rounded", fill_colour="#FD7E14") +novacustom_172x.add_task( + "Validation", "2025-01-01", "2025-03-31", style="rounded", fill_colour="#34A853" +) +novacustom_172x.add_task( + "DPP Release", "2025-01-01", "2025-03-31", style="rounded", fill_colour="#FD7E14" +) -roadmap.set_footer(f"Dasharo Community Support Roadmap | {date} ({version}) | CC-BY-SA-4.0") +roadmap.set_footer( + f"Dasharo Community Support Roadmap | {date} ({version}) | CC-BY-SA-4.0" +) roadmap.draw() roadmap.save(f"public/{dug_id}/dcs_laptop_roadmap_{version}.png") @@ -155,10 +234,16 @@ roadmap.set_timeline(TimelineMode.QUARTERLY, start="2024-10-01", number_of_items roadmap.add_logo("img/dasharo_logo_white.png", "top-right", 140, 140) dell_optiplex = roadmap.add_group("coreboot+SeaBIOS\nv0.1.1", font_size=31) -dell_optiplex.add_task("Validation", "2024-10-01", "2024-12-31", style="rounded", fill_colour="#34A853") -dell_optiplex.add_task("DPP Release", "2024-10-01", "2024-12-31", style="rounded", fill_colour="#FD7E14") +dell_optiplex.add_task( + "Validation", "2024-10-01", "2024-12-31", style="rounded", fill_colour="#34A853" +) +dell_optiplex.add_task( + "DPP Release", "2024-10-01", "2024-12-31", style="rounded", fill_colour="#FD7E14" +) -roadmap.set_footer(f"Dasharo Community Support Roadmap | {date} ({version}) | CC-BY-SA-4.0") +roadmap.set_footer( + f"Dasharo Community Support Roadmap | {date} ({version}) | CC-BY-SA-4.0" +) roadmap.draw() roadmap.save(f"public/{dug_id}/dcs_desktop_dell_roadmap_{version}.png") @@ -170,14 +255,28 @@ roadmap.set_timeline(TimelineMode.QUARTERLY, start="2024-10-01", number_of_items roadmap.add_logo("img/dasharo_logo_white.png", "top-right", 140, 140) msi_z690_114 = roadmap.add_group("coreboot+UEFI\nv1.1.4") -msi_z690_114.add_task("Validation", "2024-10-01", "2024-12-31", style="rounded", fill_colour="#34A853") -msi_z690_114.add_task("DPP Release", "2024-10-01", "2024-12-31", style="rounded", fill_colour="#FD7E14") +msi_z690_114.add_task( + "Validation", "2024-10-01", "2024-12-31", style="rounded", fill_colour="#34A853" +) +msi_z690_114.add_task( + "DPP Release", "2024-10-01", "2024-12-31", style="rounded", fill_colour="#FD7E14" +) msi_z690_dcr = roadmap.add_group("coreboot+UEFI\nv1.2.0") -msi_z690_dcr.add_task("Validation", "2025-01-01", "2025-03-31", style="rounded", fill_colour="#34A853") -msi_z690_dcr.add_task("Community Release", "2025-01-01", "2025-03-31", style="rounded", fill_colour="#ADD8E6") +msi_z690_dcr.add_task( + "Validation", "2025-01-01", "2025-03-31", style="rounded", fill_colour="#34A853" +) +msi_z690_dcr.add_task( + "Community Release", + "2025-01-01", + "2025-03-31", + style="rounded", + fill_colour="#ADD8E6", +) -roadmap.set_footer(f"Dasharo Community Support Roadmap | {date} ({version}) | CC-BY-SA-4.0") +roadmap.set_footer( + f"Dasharo Community Support Roadmap | {date} ({version}) | CC-BY-SA-4.0" +) roadmap.draw() roadmap.save(f"public/{dug_id}/dcs_desktop_msi_z690_roadmap_{version}.png") @@ -189,13 +288,25 @@ roadmap.set_timeline(TimelineMode.QUARTERLY, start="2024-10-01", number_of_items roadmap.add_logo("img/dasharo_logo_white.png", "top-right", 140, 140) msi_z790_092 = roadmap.add_group("coreboot+UEFI\nv0.9.2") -msi_z790_092.add_task("DPP Release", "2024-10-01", "2024-12-31", style="rounded", fill_colour="#FD7E14") +msi_z790_092.add_task( + "DPP Release", "2024-10-01", "2024-12-31", style="rounded", fill_colour="#FD7E14" +) msi_z790_dcr = roadmap.add_group("coreboot+UEFI\nv1.0.0") -msi_z790_dcr.add_task("Validation", "2025-01-01", "2025-03-31", style="rounded", fill_colour="#34A853") -msi_z790_dcr.add_task("Community Release", "2025-01-01", "2025-03-31", style="rounded", fill_colour="#ADD8E6") +msi_z790_dcr.add_task( + "Validation", "2025-01-01", "2025-03-31", style="rounded", fill_colour="#34A853" +) +msi_z790_dcr.add_task( + "Community Release", + "2025-01-01", + "2025-03-31", + style="rounded", + fill_colour="#ADD8E6", +) -roadmap.set_footer(f"Dasharo Community Support Roadmap | {date} ({version}) | CC-BY-SA-4.0") +roadmap.set_footer( + f"Dasharo Community Support Roadmap | {date} ({version}) | CC-BY-SA-4.0" +) roadmap.draw() roadmap.save(f"public/{dug_id}/dcs_desktop_msi_z790_roadmap_{version}.png") @@ -207,16 +318,40 @@ roadmap.set_timeline(TimelineMode.QUARTERLY, start="2023-10-01", number_of_items roadmap.add_logo("img/dasharo_logo_white.png", "top-right", 140, 140) msi_z790 = roadmap.add_group("MSI PRO Z790-P v0.9.0\n coreboot+Heads") -msi_z790.add_task("Porting", "2023-11-16", "2023-12-31", style="rounded", fill_colour="#EA4335") -msi_z790.add_task("Validation", "2024-01-01", "2024-02-14", style="rounded", fill_colour="#34A853", font_size=23) -msi_z790.add_task("DPP Release", "2024-02-15", "2024-03-31", style="rounded", fill_colour="#FD7E14") +msi_z790.add_task( + "Porting", "2023-11-16", "2023-12-31", style="rounded", fill_colour="#EA4335" +) +msi_z790.add_task( + "Validation", + "2024-01-01", + "2024-02-14", + style="rounded", + fill_colour="#34A853", + font_size=23, +) +msi_z790.add_task( + "DPP Release", "2024-02-15", "2024-03-31", style="rounded", fill_colour="#FD7E14" +) msi_z690 = roadmap.add_group("MSI PRO Z690-A v0.9.0\n coreboot+Heads") -msi_z690.add_task("Porting", "2023-11-16", "2023-12-31", style="rounded", fill_colour="#EA4335") -msi_z690.add_task("Validation", "2024-01-01", "2024-02-14", style="rounded", fill_colour="#34A853", font_size=23) -msi_z690.add_task("DPP Release", "2024-02-15", "2024-03-31", style="rounded", fill_colour="#FD7E14") +msi_z690.add_task( + "Porting", "2023-11-16", "2023-12-31", style="rounded", fill_colour="#EA4335" +) +msi_z690.add_task( + "Validation", + "2024-01-01", + "2024-02-14", + style="rounded", + fill_colour="#34A853", + font_size=23, +) +msi_z690.add_task( + "DPP Release", "2024-02-15", "2024-03-31", style="rounded", fill_colour="#FD7E14" +) -roadmap.set_footer(f"Dasharo Community Support Roadmap | {date} ({version}) | CC-BY-SA-4.0") +roadmap.set_footer( + f"Dasharo Community Support Roadmap | {date} ({version}) | CC-BY-SA-4.0" +) roadmap.draw() roadmap.save(f"public/{dug_id}/dcs_desktop_msi_heads_roadmap_{version}.png") @@ -227,11 +362,24 @@ roadmap.set_timeline(TimelineMode.QUARTERLY, start="2023-10-01", number_of_items roadmap.add_logo("img/dasharo_logo_white.png", "top-right", 140, 140) asrock = roadmap.add_group("ASRock X370 Killer SLI/ac") -asrock.add_task("Porting", "2023-10-01", "2024-02-14", style="rounded", fill_colour="#EA4335") -asrock.add_task("Validation", "2024-02-15", "2024-03-31", style="rounded", fill_colour="#34A853", font_size=23) -asrock.add_task("DPP Release", "2024-04-01", "2024-06-30", style="rounded", fill_colour="#FD7E14") +asrock.add_task( + "Porting", "2023-10-01", "2024-02-14", style="rounded", fill_colour="#EA4335" +) +asrock.add_task( + "Validation", + "2024-02-15", + "2024-03-31", + style="rounded", + fill_colour="#34A853", + font_size=23, +) +asrock.add_task( + "DPP Release", "2024-04-01", "2024-06-30", style="rounded", fill_colour="#FD7E14" +) -roadmap.set_footer(f"Dasharo Community Support Roadmap | {date} ({version}) | CC-BY-SA-4.0") +roadmap.set_footer( + f"Dasharo Community Support Roadmap | {date} ({version}) | CC-BY-SA-4.0" +) roadmap.draw() roadmap.save(f"public/{dug_id}/dcs_desktop_asrock_roadmap_{version}.png") @@ -244,7 +392,9 @@ roadmap.set_subtitle("subject to change") roadmap.set_timeline(TimelineMode.QUARTERLY, start="2023-10-01", number_of_items=4) roadmap.add_logo("img/dasharo_logo_white.png", "top-right", 140, 140) -roadmap.set_footer(f"Dasharo Community Support Roadmap | {date} ({version}) | CC-BY-SA-4.0") +roadmap.set_footer( + f"Dasharo Community Support Roadmap | {date} ({version}) | CC-BY-SA-4.0" +) roadmap.draw() roadmap.save(f"public/{dug_id}/dcs_workstation_roadmap_{version}.png") @@ -257,7 +407,9 @@ roadmap.set_subtitle("subject to change") roadmap.set_timeline(TimelineMode.QUARTERLY, start="2023-10-01", number_of_items=4) roadmap.add_logo("img/dasharo_logo_white.png", "top-right", 140, 140) -roadmap.set_footer(f"Dasharo Community Support Roadmap | {date} ({version}) | CC-BY-SA-4.0") +roadmap.set_footer( + f"Dasharo Community Support Roadmap | {date} ({version}) | CC-BY-SA-4.0" +) roadmap.draw() roadmap.save(f"public/{dug_id}/dcs_server_roadmap_{version}.png") diff --git a/diagrams/dasharo_roadmap_kpis.py b/diagrams/dasharo_roadmap_kpis.py index 5068449..b4b1bcd 100755 --- a/diagrams/dasharo_roadmap_kpis.py +++ b/diagrams/dasharo_roadmap_kpis.py @@ -10,35 +10,35 @@ dspr = {} # Dasharo Community Releases note that v0.1.0 of opti-plex and x11 does not # count since those were not released officially -dcr["Q3'21"] = 0 -dcr["Q4'21"] = 4 -dcr["Q1'22"] = 1 -dcr["Q2'22"] = 6 -dcr["Q3'22"] = 2 -dcr["Q4'22"] = 1 -dcr["Q1'23"] = 1 -dcr["Q2'23"] = 0 -dcr["Q3'23"] = 3 -dcr["Q4'23"] = 1 -dcr["Q1'24"] = 4 -dcr["Q2'24"] = 4 -dcr["Q3'24"] = 0 -dcr["Q4'24"] = 2 +dcr["Q3'21"] = 0 +dcr["Q4'21"] = 4 +dcr["Q1'22"] = 1 +dcr["Q2'22"] = 6 +dcr["Q3'22"] = 2 +dcr["Q4'22"] = 1 +dcr["Q1'23"] = 1 +dcr["Q2'23"] = 0 +dcr["Q3'23"] = 3 +dcr["Q4'23"] = 1 +dcr["Q1'24"] = 4 +dcr["Q2'24"] = 4 +dcr["Q3'24"] = 0 +dcr["Q4'24"] = 2 # Dasharo Supporter Package Releases (DSPR) -dspr["Q3'21"] = 3 -dspr["Q4'21"] = 3 -dspr["Q1'22"] = 6 -dspr["Q2'22"] = 6 -dspr["Q3'22"] = 3 -dspr["Q4'22"] = 6 -dspr["Q1'23"] = 3 -dspr["Q2'23"] = 4 -dspr["Q3'23"] = 0 -dspr["Q4'23"] = 4 -dspr["Q1'24"] = 6 -dspr["Q2'24"] = 2 -dspr["Q3'24"] = 4 -dspr["Q4'24"] = 2 +dspr["Q3'21"] = 3 +dspr["Q4'21"] = 3 +dspr["Q1'22"] = 6 +dspr["Q2'22"] = 6 +dspr["Q3'22"] = 3 +dspr["Q4'22"] = 6 +dspr["Q1'23"] = 3 +dspr["Q2'23"] = 4 +dspr["Q3'23"] = 0 +dspr["Q4'23"] = 4 +dspr["Q1'24"] = 6 +dspr["Q2'24"] = 2 +dspr["Q3'24"] = 4 +dspr["Q4'24"] = 2 dates = list(dcr.keys()) dcr_values = list(dcr.values()) @@ -46,23 +46,44 @@ dspr_values = list(dspr.values()) plt.figure(figsize=(10, 6)) -bars_dspr = plt.bar(dates, dspr_values, color='#272727', label='Dasharo Support Package Releases') -bars_dcr = plt.bar(dates, dcr_values, bottom=dspr_values, color='#38d430', label='Dasharo Community Releases') +bars_dspr = plt.bar( + dates, dspr_values, color="#272727", label="Dasharo Support Package Releases" +) +bars_dcr = plt.bar( + dates, + dcr_values, + bottom=dspr_values, + color="#38d430", + label="Dasharo Community Releases", +) + +plt.title( + "Number of Dasharo Public Releases in time", + fontsize=18, + fontweight="bold", + color="#272727", +) +plt.xlabel("Date", fontsize=16, fontweight="bold", color="#272727") +plt.ylabel("Number of Releases", fontsize=16, fontweight="bold", color="#272727") -plt.title('Number of Dasharo Public Releases in time', fontsize=18, fontweight='bold', color='#272727') -plt.xlabel('Date', fontsize=16, fontweight='bold', color='#272727') -plt.ylabel('Number of Releases', fontsize=16, fontweight='bold', color='#272727') # Function to add labels inside the bars -def add_labels(bars, color='white', offset=0): +def add_labels(bars, color="white", offset=0): for bar in bars: height = bar.get_height() if height != 0: - plt.annotate(f'{height}', - xy=(bar.get_x() + bar.get_width() / 2, bar.get_y()), - xytext=(0, 3), # 3 points vertical offset - textcoords="offset points", - ha='center', va='bottom', color=color, fontsize=14, fontweight='bold') + plt.annotate( + f"{height}", + xy=(bar.get_x() + bar.get_width() / 2, bar.get_y()), + xytext=(0, 3), # 3 points vertical offset + textcoords="offset points", + ha="center", + va="bottom", + color=color, + fontsize=14, + fontweight="bold", + ) + add_labels(bars_dcr) add_labels(bars_dspr) @@ -71,16 +92,25 @@ add_labels(bars_dspr) for i in range(len(dates)): if dcr_values[i] != 0 and dspr_values[i] != 0: total = dcr_values[i] + dspr_values[i] - plt.annotate(f'{total}', - xy=(bars_dcr[i].get_x() + bars_dcr[i].get_width() / 2, bars_dcr[i].get_y() + bars_dcr[i].get_height()), - xytext=(0, 3), # 3 points vertical offset - textcoords="offset points", - ha='center', va='bottom', color='black', fontsize=14, fontweight='bold') + plt.annotate( + f"{total}", + xy=( + bars_dcr[i].get_x() + bars_dcr[i].get_width() / 2, + bars_dcr[i].get_y() + bars_dcr[i].get_height(), + ), + xytext=(0, 3), # 3 points vertical offset + textcoords="offset points", + ha="center", + va="bottom", + color="black", + fontsize=14, + fontweight="bold", + ) plt.legend(fontsize=12) -plt.gca().set_facecolor('#f5f5f5') +plt.gca().set_facecolor("#f5f5f5") -plt.savefig('public/dug_8/dasharo_releases_kpis.png', dpi=300) +plt.savefig("public/dug_8/dasharo_releases_kpis.png", dpi=300) plt.close() diff --git a/diagrams/dasharo_roadmap_states.py b/diagrams/dasharo_roadmap_states.py index 4da40c9..e1c7728 100755 --- a/diagrams/dasharo_roadmap_states.py +++ b/diagrams/dasharo_roadmap_states.py @@ -14,46 +14,46 @@ ontrack = {} released = {} removed = {} -new["2023-03-16"] = 9 -changed["2023-03-16"] = 0 -ontrack["2023-03-16"] = 0 -released["2023-03-16"] = 0 -removed["2023-03-16"] = 0 -new["2023-07-06"] = 3 -changed["2023-07-06"] = 6 -ontrack["2023-07-06"] = 3 -released["2023-07-06"] = 0 -removed["2023-07-06"] = 0 -new["2023-09-28"] = 5 -changed["2023-09-28"] = 4 -ontrack["2023-09-28"] = 5 -released["2023-09-28"] = 3 -removed["2023-09-28"] = 0 -new["2023-12-03"] = 1 -changed["2023-12-03"] = 11 -ontrack["2023-12-03"] = 1 -released["2023-12-03"] = 1 -removed["2023-12-03"] = 0 -new["2024-03-11"] = 9 -changed["2024-03-11"] = 7 -ontrack["2024-03-11"] = 2 -released["2024-03-11"] = 3 -removed["2024-03-11"] = 2 -new["2024-06-10"] = 2 -changed["2024-06-10"] = 7 -ontrack["2024-06-10"] = 5 -released["2024-06-10"] = 3 -removed["2024-06-10"] = 1 -new["2024-09-09"] = 1 -changed["2024-09-09"] = 7 -ontrack["2024-09-09"] = 4 -removed["2024-09-09"] = 2 -released["2024-09-09"] = 3 -new["2024-12-12"] = 3 -changed["2024-12-12"] = 8 -ontrack["2024-12-12"] = 0 -removed["2024-12-12"] = 2 -released["2024-12-12"] = 2 +new["2023-03-16"] = 9 +changed["2023-03-16"] = 0 +ontrack["2023-03-16"] = 0 +released["2023-03-16"] = 0 +removed["2023-03-16"] = 0 +new["2023-07-06"] = 3 +changed["2023-07-06"] = 6 +ontrack["2023-07-06"] = 3 +released["2023-07-06"] = 0 +removed["2023-07-06"] = 0 +new["2023-09-28"] = 5 +changed["2023-09-28"] = 4 +ontrack["2023-09-28"] = 5 +released["2023-09-28"] = 3 +removed["2023-09-28"] = 0 +new["2023-12-03"] = 1 +changed["2023-12-03"] = 11 +ontrack["2023-12-03"] = 1 +released["2023-12-03"] = 1 +removed["2023-12-03"] = 0 +new["2024-03-11"] = 9 +changed["2024-03-11"] = 7 +ontrack["2024-03-11"] = 2 +released["2024-03-11"] = 3 +removed["2024-03-11"] = 2 +new["2024-06-10"] = 2 +changed["2024-06-10"] = 7 +ontrack["2024-06-10"] = 5 +released["2024-06-10"] = 3 +removed["2024-06-10"] = 1 +new["2024-09-09"] = 1 +changed["2024-09-09"] = 7 +ontrack["2024-09-09"] = 4 +removed["2024-09-09"] = 2 +released["2024-09-09"] = 3 +new["2024-12-12"] = 3 +changed["2024-12-12"] = 8 +ontrack["2024-12-12"] = 0 +removed["2024-12-12"] = 2 +released["2024-12-12"] = 2 dates = list(new.keys()) new_values = np.array(list(new.values())) @@ -62,27 +62,74 @@ ontrack_values = np.array(list(ontrack.values())) released_values = np.array(list(released.values())) removed_values = np.array(list(removed.values())) -total_releases = sum(new_values) + sum(changed_values) + sum(ontrack_values) + sum(released_values) + sum(removed_values) +total_releases = ( + sum(new_values) + + sum(changed_values) + + sum(ontrack_values) + + sum(released_values) + + sum(removed_values) +) plt.figure(figsize=(10, 6)) -bars_new = plt.bar(dates, new_values, color='#4CAF50', label=f'New ({sum(new_values)/total_releases*100:.1f}%)') -bars_changed = plt.bar(dates, changed_values, bottom=new_values, color='#FFC107', label=f'Changed ({sum(changed_values)/total_releases*100:.1f}%)') -bars_ontrack = plt.bar(dates, ontrack_values, bottom=new_values+changed_values, color='#2196F3', label=f'On Track ({sum(ontrack_values)/total_releases*100:.1f}%)') -bars_released = plt.bar(dates, released_values, bottom=new_values+changed_values+ontrack_values, color='#9E9E9E', label=f'Released ({sum(released_values)/total_releases*100:.1f}%)') -bars_removed = plt.bar(dates, removed_values, bottom=new_values+changed_values+ontrack_values+released_values, color='#F44336', label=f'Removed ({sum(removed_values)/total_releases*100:.1f}%)') +bars_new = plt.bar( + dates, + new_values, + color="#4CAF50", + label=f"New ({sum(new_values)/total_releases*100:.1f}%)", +) +bars_changed = plt.bar( + dates, + changed_values, + bottom=new_values, + color="#FFC107", + label=f"Changed ({sum(changed_values)/total_releases*100:.1f}%)", +) +bars_ontrack = plt.bar( + dates, + ontrack_values, + bottom=new_values + changed_values, + color="#2196F3", + label=f"On Track ({sum(ontrack_values)/total_releases*100:.1f}%)", +) +bars_released = plt.bar( + dates, + released_values, + bottom=new_values + changed_values + ontrack_values, + color="#9E9E9E", + label=f"Released ({sum(released_values)/total_releases*100:.1f}%)", +) +bars_removed = plt.bar( + dates, + removed_values, + bottom=new_values + changed_values + ontrack_values + released_values, + color="#F44336", + label=f"Removed ({sum(removed_values)/total_releases*100:.1f}%)", +) + +plt.title( + "Dasharo Roadmap Status Overview ", fontsize=18, fontweight="bold", color="#272727" +) +plt.xlabel("Date", fontsize=16, fontweight="bold", color="#272727") +plt.ylabel("Number of Releases", fontsize=16, fontweight="bold", color="#272727") -plt.title('Dasharo Roadmap Status Overview ', fontsize=18, fontweight='bold', color='#272727') -plt.xlabel('Date', fontsize=16, fontweight='bold', color='#272727') -plt.ylabel('Number of Releases', fontsize=16, fontweight='bold', color='#272727') # Function to add labels inside the bars -def add_labels(bars, color='white', offset=0): +def add_labels(bars, color="white", offset=0): for bar in bars: height = bar.get_height() if height != 0: - plt.text(bar.get_x() + bar.get_width() / 2, bar.get_y() + height / 2, - f'{height}', ha='center', va='center', color=color, fontsize=14, fontweight='bold') + plt.text( + bar.get_x() + bar.get_width() / 2, + bar.get_y() + height / 2, + f"{height}", + ha="center", + va="center", + color=color, + fontsize=14, + fontweight="bold", + ) + add_labels(bars_new) add_labels(bars_changed) @@ -90,19 +137,35 @@ add_labels(bars_ontrack) add_labels(bars_released) add_labels(bars_removed) + # Function to add sum on top of stacked bars -def add_sum_labels(bars1, bars2, bars3, bars4, bars5, color='black'): +def add_sum_labels(bars1, bars2, bars3, bars4, bars5, color="black"): for bar1, bar2, bar3, bar4, bar5 in zip(bars1, bars2, bars3, bars4, bars5): - total_height = bar1.get_height() + bar2.get_height() + bar3.get_height() + bar4.get_height() + bar5.get_height() - plt.text(bar1.get_x() + bar1.get_width() / 2, total_height, - f'{total_height}', ha='center', va='bottom', color=color, fontsize=14, fontweight='bold') + total_height = ( + bar1.get_height() + + bar2.get_height() + + bar3.get_height() + + bar4.get_height() + + bar5.get_height() + ) + plt.text( + bar1.get_x() + bar1.get_width() / 2, + total_height, + f"{total_height}", + ha="center", + va="bottom", + color=color, + fontsize=14, + fontweight="bold", + ) + add_sum_labels(bars_new, bars_changed, bars_ontrack, bars_released, bars_removed) plt.legend(fontsize=12) -plt.gca().set_facecolor('#f5f5f5') +plt.gca().set_facecolor("#f5f5f5") -plt.savefig('public/dug_8/dasharo_roadmap_states.png', dpi=300) +plt.savefig("public/dug_8/dasharo_roadmap_states.png", dpi=300) plt.close() diff --git a/diagrams/dasharo_team_events_roadmap.py b/diagrams/dasharo_team_events_roadmap.py index 201fb1b..654a169 100755 --- a/diagrams/dasharo_team_events_roadmap.py +++ b/diagrams/dasharo_team_events_roadmap.py @@ -10,7 +10,7 @@ from roadmapper.timelinemode import TimelineMode """" Dasharo Team Events Roadmap Q3-Q4'24 """ -roadmap = Roadmap(1900,1100, colour_theme="diagrams/dasharo.json", show_marker=False) +roadmap = Roadmap(1900, 1100, colour_theme="diagrams/dasharo.json", show_marker=False) roadmap.set_title("Dasharo Team Events Roadmap Q4'24-Q1'25") roadmap.set_subtitle("subject to change") roadmap.set_timeline(TimelineMode.MONTHLY, start="2024-09-01", number_of_items=7) @@ -20,19 +20,67 @@ dasharo = roadmap.add_group("Dasharo") zarhus = roadmap.add_group("Zarhus") pet = roadmap.add_group("Pace Enterprise Training") -dasharo.add_task("DUG#8 &\nvPub 0xD", "2024-11-12", "2024-12-12", style="rounded", fill_colour="#38d430") -fosdem = dasharo.add_task("FOSDEM 2025", "2025-01-04", "2025-02-04", style="rounded", fill_colour="#38d430") -fosdem.add_milestone("Open-source firmware\ndevroom", "2025-02-04", font_size=30, text_alignment="right:35%") -dasharo.add_task("DUG#9 & vPub 0xE", "2025-02-20", "2025-03-20", style="rounded", fill_colour="#38d430") +dasharo.add_task( + "DUG#8 &\nvPub 0xD", + "2024-11-12", + "2024-12-12", + style="rounded", + fill_colour="#38d430", +) +fosdem = dasharo.add_task( + "FOSDEM 2025", "2025-01-04", "2025-02-04", style="rounded", fill_colour="#38d430" +) +fosdem.add_milestone( + "Open-source firmware\ndevroom", + "2025-02-04", + font_size=30, + text_alignment="right:35%", +) +dasharo.add_task( + "DUG#9 & vPub 0xE", + "2025-02-20", + "2025-03-20", + style="rounded", + fill_colour="#38d430", +) -xen = dasharo.add_task("Xen Winter Meetup", "2024-12-31", "2025-01-31", style="rounded", fill_colour="#38d430") -xen.add_milestone("Enabling UEFI Secure Boot\nin XCP-ng: Establishing\na Robust Chain of Trust", "2025-01-31", font_size=30, text_alignment="right:35%") +xen = dasharo.add_task( + "Xen Winter Meetup", + "2024-12-31", + "2025-01-31", + style="rounded", + fill_colour="#38d430", +) +xen.add_milestone( + "Enabling UEFI Secure Boot\nin XCP-ng: Establishing\na Robust Chain of Trust", + "2025-01-31", + font_size=30, + text_alignment="right:35%", +) -yocto = zarhus.add_task("Yocto Project Dev Day 2024", "2024-09-10", "2024-10-19", style="rounded", fill_colour="#ff8c00") -yocto.add_milestone("Practical Security for Embedded Systems:\nImplementing TEE and Secure Storage", "2024-10-19", font_size=30, text_alignment="right:35%") +yocto = zarhus.add_task( + "Yocto Project Dev Day 2024", + "2024-09-10", + "2024-10-19", + style="rounded", + fill_colour="#ff8c00", +) +yocto.add_milestone( + "Practical Security for Embedded Systems:\nImplementing TEE and Secure Storage", + "2024-10-19", + font_size=30, + text_alignment="right:35%", +) -hwio = pet.add_task("Hardwear.io", "2024-09-21", "2024-10-21", style="rounded", fill_colour="#9370db") -hwio.add_milestone("Mastering UEFI Secure Boot\nand Intel Root of Trust Technologies", "2024-10-21", font_size=30, text_alignment="right:35%") +hwio = pet.add_task( + "Hardwear.io", "2024-09-21", "2024-10-21", style="rounded", fill_colour="#9370db" +) +hwio.add_milestone( + "Mastering UEFI Secure Boot\nand Intel Root of Trust Technologies", + "2024-10-21", + font_size=30, + text_alignment="right:35%", +) roadmap.set_footer("Dasharo Team Events Roadmap | December 2024 | CC-BY-SA-4.0") roadmap.draw() @@ -41,7 +89,7 @@ roadmap.save("public/dug_8/dasharo_team_roadmap.png") """" Dasharo Team Events Roadmap Q2-Q3'25 """ -roadmap2 = Roadmap(1900,1100, colour_theme="diagrams/dasharo.json", show_marker=False) +roadmap2 = Roadmap(1900, 1100, colour_theme="diagrams/dasharo.json", show_marker=False) roadmap2.set_title("Dasharo Team Events Roadmap Q2-Q3'25") roadmap2.set_subtitle("subject to change") roadmap2.set_timeline(TimelineMode.MONTHLY, start="2025-03-01", number_of_items=7) @@ -50,12 +98,37 @@ roadmap2.add_logo("img/dasharo_logo_white.png", "top-right", 140, 140) dasharo = roadmap2.add_group("Dasharo") pet = roadmap2.add_group("Pace Enterprise Training") -dasharo.add_task("DUG#10 &\nvPub 0xF", "2025-05-13", "2025-06-12", style="rounded", fill_colour="#38d430") -dasharo.add_task("DUG#11 &\nvPub 0x10", "2025-08-18", "2025-09-18", style="rounded", fill_colour="#38d430") -dasharo.add_task("Qubes OS Summit 2025", "2025-09-01", "2025-09-30", style="rounded", fill_colour="#38d430") +dasharo.add_task( + "DUG#10 &\nvPub 0xF", + "2025-05-13", + "2025-06-12", + style="rounded", + fill_colour="#38d430", +) +dasharo.add_task( + "DUG#11 &\nvPub 0x10", + "2025-08-18", + "2025-09-18", + style="rounded", + fill_colour="#38d430", +) +dasharo.add_task( + "Qubes OS Summit 2025", + "2025-09-01", + "2025-09-30", + style="rounded", + fill_colour="#38d430", +) -hwio = pet.add_task("Hardwear.io", "2025-04-27", "2025-05-27", style="rounded", fill_colour="#9370db") -hwio.add_milestone("Mastering UEFI Secure Boot\nand Intel Root of Trust Technologies", "2025-05-27", font_size=30, text_alignment="right:35%") +hwio = pet.add_task( + "Hardwear.io", "2025-04-27", "2025-05-27", style="rounded", fill_colour="#9370db" +) +hwio.add_milestone( + "Mastering UEFI Secure Boot\nand Intel Root of Trust Technologies", + "2025-05-27", + font_size=30, + text_alignment="right:35%", +) roadmap2.set_footer("Dasharo Team Events Roadmap | December 2024 | CC-BY-SA-4.0") roadmap2.draw() diff --git a/diagrams/dasharo_upstreaming.py b/diagrams/dasharo_upstreaming.py index 9e04cae..f049333 100755 --- a/diagrams/dasharo_upstreaming.py +++ b/diagrams/dasharo_upstreaming.py @@ -11,7 +11,7 @@ logging.basicConfig(level=logging.INFO, handlers=[logging.StreamHandler()]) added = {} removed = {} -logging.info('Adding data to dictionaries') +logging.info("Adding data to dictionaries") added["2023-07-06"] = 2240 removed["2023-07-06"] = 298 added["2023-09-28"] = 4203 @@ -27,55 +27,72 @@ removed["2024-09-09"] = 272 added["2024-12-10"] = 50 removed["2024-12-10"] = 10 -logging.info('Creating lists from dictionaries') +logging.info("Creating lists from dictionaries") dates = list(added.keys()) added_values = list(added.values()) removed_values = list(removed.values()) -logging.info('Creating figure') +logging.info("Creating figure") plt.figure(figsize=(10, 6)) -logging.info('Creating bars') -bars_added = plt.bar(dates, added_values, color='#38d430', label='Added lines') -bars_removed = plt.bar(dates, removed_values, bottom=added_values, color='#272727', label='Removed lines') +logging.info("Creating bars") +bars_added = plt.bar(dates, added_values, color="#38d430", label="Added lines") +bars_removed = plt.bar( + dates, removed_values, bottom=added_values, color="#272727", label="Removed lines" +) + +logging.info("Setting title and labels") +plt.title("Contribution Statistics", fontsize=18, fontweight="bold", color="#272727") +plt.xlabel("Date", fontsize=16, fontweight="bold", color="#272727") +plt.ylabel("Number of Lines", fontsize=16, fontweight="bold", color="#272727") -logging.info('Setting title and labels') -plt.title('Contribution Statistics', fontsize=18, fontweight='bold', color='#272727') -plt.xlabel('Date', fontsize=16, fontweight='bold', color='#272727') -plt.ylabel('Number of Lines', fontsize=16, fontweight='bold', color='#272727') def add_labels_added(bars): for bar in bars: height = bar.get_height() font_s = 14 - plt.annotate(f'{height}', - xy=(bar.get_x() + bar.get_width() / 2, bar.get_y() + height / 2 - 90), - xytext=(0, 3), # 3 points vertical offset - textcoords="offset points", - ha='center', va='bottom', color='white', fontsize=font_s, fontweight='bold') + plt.annotate( + f"{height}", + xy=(bar.get_x() + bar.get_width() / 2, bar.get_y() + height / 2 - 90), + xytext=(0, 3), # 3 points vertical offset + textcoords="offset points", + ha="center", + va="bottom", + color="white", + fontsize=font_s, + fontweight="bold", + ) + def add_labels_removed(bars): for bar in bars: height = bar.get_height() font_s = 14 logging.info("height:{}, x:{}, y:{}".format(height, bar.get_x(), bar.get_y())) - plt.annotate(f'{height}', - xy=(bar.get_x() + bar.get_width() / 2, bar.get_y() + height - 60), - xytext=(0, 3), # 3 points vertical offset - textcoords="offset points", - ha='center', va='bottom', color='black', fontsize=font_s, fontweight='bold') + plt.annotate( + f"{height}", + xy=(bar.get_x() + bar.get_width() / 2, bar.get_y() + height - 60), + xytext=(0, 3), # 3 points vertical offset + textcoords="offset points", + ha="center", + va="bottom", + color="black", + fontsize=font_s, + fontweight="bold", + ) + add_labels_added(bars_added) add_labels_removed(bars_removed) -logging.info('Adding legend') +logging.info("Adding legend") plt.legend(fontsize=12) -logging.info('Setting facecolor') -plt.gca().set_facecolor('#f5f5f5') +logging.info("Setting facecolor") +plt.gca().set_facecolor("#f5f5f5") -logging.info('Saving figure') -plt.savefig('public/dug_8/dasharo_coreboot_upstraming.png', dpi=300) +logging.info("Saving figure") +plt.savefig("public/dug_8/dasharo_coreboot_upstraming.png", dpi=300) -logging.info('Closing figure') +logging.info("Closing figure") plt.close() diff --git a/diagrams/dasharo_users.py b/diagrams/dasharo_users.py index f980952..ab4d387 100755 --- a/diagrams/dasharo_users.py +++ b/diagrams/dasharo_users.py @@ -8,36 +8,64 @@ import matplotlib.pyplot as plt import matplotlib.ticker as ticker # Data -quarters = ["2023-03-16", "2023-07-06", "2023-09-28", "2023-12-03", "2024-03-11", "2024-06-10", "2024-09-09", "2024-12-10"] +quarters = [ + "2023-03-16", + "2023-07-06", + "2023-09-28", + "2023-12-03", + "2024-03-11", + "2024-06-10", + "2024-09-09", + "2024-12-10", +] # Dasharo Matrix Space counter users = [104, 162, 201, 234, 257, 311, 358, 401] # Create the plot plt.figure(figsize=(12, 7)) -plt.plot(quarters, users, marker='o', linestyle='-', color='#38d430', linewidth=2, markersize=10) +plt.plot( + quarters, + users, + marker="o", + linestyle="-", + color="#38d430", + linewidth=2, + markersize=10, +) # Add titles and labels -plt.title('Dasharo Matrix Space User Base', fontsize=18, fontweight='bold', color='#272727') -plt.xlabel('Date', fontsize=16, fontweight='bold', color='#272727') -plt.ylabel('Number of Users', fontsize=16, fontweight='bold', color='#272727') +plt.title( + "Dasharo Matrix Space User Base", fontsize=18, fontweight="bold", color="#272727" +) +plt.xlabel("Date", fontsize=16, fontweight="bold", color="#272727") +plt.ylabel("Number of Users", fontsize=16, fontweight="bold", color="#272727") # Customize the tick marks -plt.xticks(fontsize=14, color='#272727') -plt.yticks(fontsize=14, color='#272727') -plt.gca().yaxis.set_major_formatter(ticker.FormatStrFormatter('%d')) +plt.xticks(fontsize=14, color="#272727") +plt.yticks(fontsize=14, color="#272727") +plt.gca().yaxis.set_major_formatter(ticker.FormatStrFormatter("%d")) # Add a grid with a lighter color and dashed line -plt.grid(color='#a9a9a9', linestyle='--', linewidth=0.5) +plt.grid(color="#a9a9a9", linestyle="--", linewidth=0.5) # Highlight each data point with annotations for i, txt in enumerate(users): - plt.annotate(txt, (quarters[i], users[i]), textcoords="offset points", xytext=(0,10), ha='center', fontsize=14, fontweight='bold', color='#38d430') + plt.annotate( + txt, + (quarters[i], users[i]), + textcoords="offset points", + xytext=(0, 10), + ha="center", + fontsize=14, + fontweight="bold", + color="#38d430", + ) # Set the background color -plt.gca().set_facecolor('#f5f5f5') +plt.gca().set_facecolor("#f5f5f5") # Save the plot as an image file -plt.savefig('public/dug_8/dasharo_users.png') +plt.savefig("public/dug_8/dasharo_users.png") # Optionally, close the plot to free up memory plt.close() diff --git a/diagrams/dts_issues.py b/diagrams/dts_issues.py index 4645d95..f034a58 100755 --- a/diagrams/dts_issues.py +++ b/diagrams/dts_issues.py @@ -14,25 +14,30 @@ import requests from datetime import datetime import subprocess + def get_github_token(): # Path to the GitHub hosts.yml file - config_path = os.path.expanduser('~/.config/gh/hosts.yml') + config_path = os.path.expanduser("~/.config/gh/hosts.yml") # Read the YAML file - with open(config_path, 'r') as file: + with open(config_path, "r") as file: config = yaml.safe_load(file) # Extract the OAuth token - return config['github.com']['oauth_token'] + return config["github.com"]["oauth_token"] + def run_gh_command(command): try: - result = subprocess.run(command, shell=True, check=True, text=True, capture_output=True) + result = subprocess.run( + command, shell=True, check=True, text=True, capture_output=True + ) return result.stdout.strip() except subprocess.CalledProcessError as e: print(f"An error occurred: {e}") return None + def count_issues(repo, state, date): # Construct the GitHub CLI command command = f"gh issue list --label DasharoToolsSuite --repo {repo} --state {state} --search 'created:<={date}' -L 10000 --json number --jq '. | length'" @@ -46,6 +51,7 @@ def count_issues(repo, state, date): else: return 0 + repo = "Dasharo/dasharo-issues" dates = ["2023-03-16", "2023-07-06", "2023-09-28", "2023-12-03"] @@ -54,9 +60,9 @@ data = {"Total": [], "Closed": [], "Open": []} # Gather data for date in dates: - total_issues = count_issues(repo, 'all', date) - closed_issues = count_issues(repo, 'closed', date) - open_issues = count_issues(repo, 'open', date) + total_issues = count_issues(repo, "all", date) + closed_issues = count_issues(repo, "closed", date) + open_issues = count_issues(repo, "open", date) data["Total"].append(total_issues) data["Closed"].append(closed_issues) data["Open"].append(open_issues) @@ -65,23 +71,33 @@ for date in dates: plt.figure(figsize=(10, 6)) # Stacked bar chart -bars_closed = plt.bar(dates, data["Closed"], color='#38d430', label='Closed issues') -bars_open = plt.bar(dates, data["Open"], bottom=data["Closed"], color='#272727', label='Open issues') +bars_closed = plt.bar(dates, data["Closed"], color="#38d430", label="Closed issues") +bars_open = plt.bar( + dates, data["Open"], bottom=data["Closed"], color="#272727", label="Open issues" +) # Add titles and labels -plt.title('Dasharo Issues Statistics', fontsize=18, fontweight='bold', color='#272727') -plt.xlabel('Date', fontsize=16, fontweight='bold', color='#272727') -plt.ylabel('Number of Issues', fontsize=16, fontweight='bold', color='#272727') +plt.title("Dasharo Issues Statistics", fontsize=18, fontweight="bold", color="#272727") +plt.xlabel("Date", fontsize=16, fontweight="bold", color="#272727") +plt.ylabel("Number of Issues", fontsize=16, fontweight="bold", color="#272727") + # Function to add labels inside the bars -def add_labels(bars, color='white'): +def add_labels(bars, color="white"): for bar in bars: height = bar.get_height() - plt.annotate(f'{height}', - xy=(bar.get_x() + bar.get_width() / 2, bar.get_y() + height / 2), - xytext=(0, 3), # 3 points vertical offset - textcoords="offset points", - ha='center', va='bottom', color=color, fontsize=14, fontweight='bold') + plt.annotate( + f"{height}", + xy=(bar.get_x() + bar.get_width() / 2, bar.get_y() + height / 2), + xytext=(0, 3), # 3 points vertical offset + textcoords="offset points", + ha="center", + va="bottom", + color=color, + fontsize=14, + fontweight="bold", + ) + # Add labels to the bars add_labels(bars_closed) @@ -91,10 +107,10 @@ add_labels(bars_open) plt.legend(fontsize=12) # Set the background color -plt.gca().set_facecolor('#f5f5f5') +plt.gca().set_facecolor("#f5f5f5") # Save the plot as an image file -plt.savefig('dts_issues_2023q4.png') +plt.savefig("dts_issues_2023q4.png") # Optionally, close the plot to free up memory plt.close() diff --git a/diagrams/dts_releases_2023.py b/diagrams/dts_releases_2023.py index 242888c..cc971fe 100755 --- a/diagrams/dts_releases_2023.py +++ b/diagrams/dts_releases_2023.py @@ -18,8 +18,12 @@ roadmap.add_logo("../../img/dasharo_logo_white.png", "top-right", 140, 140) dts_1213 = roadmap.add_group("DTS") -dts_1213.add_milestone("Porting", "2024-01-01", "2024-02-14", style="rounded", fill_colour="#EA4335") +dts_1213.add_milestone( + "Porting", "2024-01-01", "2024-02-14", style="rounded", fill_colour="#EA4335" +) -roadmap.set_footer("Dasharo Community Support Roadmap | December 2023 (v0.4) | CC-BY-SA-4.0") +roadmap.set_footer( + "Dasharo Community Support Roadmap | December 2023 (v0.4) | CC-BY-SA-4.0" +) roadmap.draw() roadmap.save("dts_releases_2023.png") diff --git a/diagrams/dts_roadmap.py b/diagrams/dts_roadmap.py index 00f055c..251ecdd 100755 --- a/diagrams/dts_roadmap.py +++ b/diagrams/dts_roadmap.py @@ -18,15 +18,37 @@ roadmap.add_logo("../../img/dasharo_logo_white.png", "top-right", 140, 140) dts_1213 = roadmap.add_group("DTS v1.2.13") -dts_1213.add_task("Porting", "2024-01-01", "2024-02-14", style="rounded", fill_colour="#EA4335") -dts_1213.add_task("Validation", "2024-02-15", "2024-03-06", style="rounded", fill_colour="#34A853") -dts_1213.add_task("Community Release", "2024-03-07", "2024-03-31", style="rounded", fill_colour="#ADD8E6") +dts_1213.add_task( + "Porting", "2024-01-01", "2024-02-14", style="rounded", fill_colour="#EA4335" +) +dts_1213.add_task( + "Validation", "2024-02-15", "2024-03-06", style="rounded", fill_colour="#34A853" +) +dts_1213.add_task( + "Community Release", + "2024-03-07", + "2024-03-31", + style="rounded", + fill_colour="#ADD8E6", +) dts_200 = roadmap.add_group("DTS v2.0.0") -dts_200.add_task("Porting", "2024-01-01", "2024-03-31", style="rounded", fill_colour="#EA4335") -dts_200.add_task("Validation", "2024-04-01", "2024-05-15", style="rounded", fill_colour="#34A853") -dts_200.add_task("Community Release", "2024-05-16", "2024-06-30", style="rounded", fill_colour="#ADD8E6") +dts_200.add_task( + "Porting", "2024-01-01", "2024-03-31", style="rounded", fill_colour="#EA4335" +) +dts_200.add_task( + "Validation", "2024-04-01", "2024-05-15", style="rounded", fill_colour="#34A853" +) +dts_200.add_task( + "Community Release", + "2024-05-16", + "2024-06-30", + style="rounded", + fill_colour="#ADD8E6", +) -roadmap.set_footer("Dasharo Community Support Roadmap | December 2023 (v0.4) | CC-BY-SA-4.0") +roadmap.set_footer( + "Dasharo Community Support Roadmap | December 2023 (v0.4) | CC-BY-SA-4.0" +) roadmap.draw() roadmap.save("dts_roadmap_v0.4.png")