From d4f1645a2bd2ce3ac9b70dc8a0a24ff78b43827d Mon Sep 17 00:00:00 2001
From: "google-labs-jules[bot]"
<161369871+google-labs-jules[bot]@users.noreply.github.com>
Date: Sat, 13 Dec 2025 18:18:16 +0000
Subject: [PATCH 1/2] feat: Replace outdated logo with a new design
The previous logo, an animation of circling stars, did not accurately represent the purpose of the mapflow package. This change introduces a new static SVG logo that combines a map and a play button, providing a more intuitive and relevant visual identity for the project. The logo generation script has also been updated to produce the new design.
---
_static/logo.svg | 140 ++++++-----------------------------------------
scripts/logo.py | 113 ++++++++------------------------------
2 files changed, 40 insertions(+), 213 deletions(-)
diff --git a/_static/logo.svg b/_static/logo.svg
index 26b37b1..73b4f2f 100644
--- a/_static/logo.svg
+++ b/_static/logo.svg
@@ -1,127 +1,19 @@
-
diff --git a/scripts/logo.py b/scripts/logo.py
index 50103e4..9ab1be2 100644
--- a/scripts/logo.py
+++ b/scripts/logo.py
@@ -1,108 +1,43 @@
-import math
-import random
from pathlib import Path
-from typing import Iterable
-
-def generate_random_rotating_stars_svg(
- output_file: str,
- radii: Iterable[float],
- colors: Iterable[str],
- width: int = 400,
- height: int = 400,
- min_duration: float = 5.0,
- max_duration: float = 20.0,
- star_size: float = 15.0,
-) -> None:
+def generate_map_and_play_logo(output_file: str, width: int = 400, height: int = 400) -> None:
"""
- Génère un SVG animé avec des étoiles tournantes à des rayons, angles initiaux et vitesses aléatoires.
+ Generates a static SVG logo with a map and play button.
Args:
- output_file: Nom du fichier de sortie
- radii: Rayons de trajectoire pour chaque étoile
- colors: Couleurs pour chaque étoile
- width: Largeur de l'image SVG
- height: Hauteur de l'image SVG
- min_duration: Durée minimale de rotation (plus lent)
- max_duration: Durée maximale de rotation (plus rapide)
- star_size: Taille des étoiles
+ output_file: The name of the output file.
+ width: The width of the SVG image.
+ height: The height of the SVG image.
"""
- if len(radii) != len(colors):
- raise ValueError("Les listes de rayons et de couleurs doivent avoir la même longueur")
-
center_x = width / 2
center_y = height / 2
- # Préparation du SVG
svg_content = f"""
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
"""
- for radius, color in zip(radii, colors):
- # Angle initial aléatoire
- initial_angle = random.uniform(0, 360)
- # Durée aléatoire entre min et max
- duration = random.uniform(min_duration, max_duration)
-
- # Position initiale
- x = center_x + radius * math.cos(math.radians(initial_angle))
- y = center_y + radius * math.sin(math.radians(initial_angle))
-
- # Définition de l'étoile à 4 branches
- outer_radius = star_size
- inner_radius = star_size / 2
- star_path = []
- for i in range(8):
- angle = math.radians(i * 45)
- if i % 2 == 0:
- r = outer_radius
- else:
- r = inner_radius
- star_path.append((x + r * math.cos(angle), y + r * math.sin(angle)))
-
- star_path_str = "M" + " L".join(f"{px:.2f},{py:.2f}" for px, py in star_path) + " Z"
-
- svg_content += f"""
-
-
-
-"""
-
- svg_content += ""
-
with open(output_file, "w") as f:
f.write(svg_content)
- print(f"SVG animé créé: {output_file}")
-
+ print(f"Static SVG logo created: {output_file}")
if __name__ == "__main__":
- # Exemple d'utilisation
- random.seed(42) # Pour des résultats reproductibles
-
- n = 10
- # Configuration
- config = {
- "output_file": Path(__file__).parent.parent / "_static" / "logo.svg",
- "radii": [30 + i * 25 for i in range(n)],
- "colors": ["#ffffff"] * n,
- "width": 600,
- "height": 600,
- "min_duration": 5,
- "max_duration": 50,
- "star_size": 8,
- }
-
- generate_random_rotating_stars_svg(**config)
+ output_path = Path(__file__).parent.parent / "_static" / "logo.svg"
+ generate_map_and_play_logo(output_path)
From a4a0d992d94936d46dbab40ba064c97e1284bc2f Mon Sep 17 00:00:00 2001
From: GitHub Actions
Date: Sat, 13 Dec 2025 18:20:21 +0000
Subject: [PATCH 2/2] Format code with Ruff
---
scripts/logo.py | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/scripts/logo.py b/scripts/logo.py
index 9ab1be2..38390b0 100644
--- a/scripts/logo.py
+++ b/scripts/logo.py
@@ -1,5 +1,6 @@
from pathlib import Path
+
def generate_map_and_play_logo(output_file: str, width: int = 400, height: int = 400) -> None:
"""
Generates a static SVG logo with a map and play button.
@@ -24,12 +25,12 @@ def generate_map_and_play_logo(output_file: str, width: int = 400, height: int =
-
-
-
+
+
+
-
+
"""
@@ -38,6 +39,7 @@ def generate_map_and_play_logo(output_file: str, width: int = 400, height: int =
print(f"Static SVG logo created: {output_file}")
+
if __name__ == "__main__":
output_path = Path(__file__).parent.parent / "_static" / "logo.svg"
generate_map_and_play_logo(output_path)