From c23ff03ae771fec32bdad3249d45276f5fbfb6f0 Mon Sep 17 00:00:00 2001 From: Ariel Costas Guerrero Date: Fri, 25 Apr 2025 10:31:05 +0200 Subject: Sort stops consistently to avoid PRs where they are reordered --- data/download-stops.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'data') diff --git a/data/download-stops.py b/data/download-stops.py index 002b093..0b7d77a 100644 --- a/data/download-stops.py +++ b/data/download-stops.py @@ -99,7 +99,10 @@ def main(): # Filter out hidden stops visible_stops = [stop for stop in processed_stops if not stop.get("hide")] print(f"Removed {len(processed_stops) - len(visible_stops)} hidden stops") - + + # Sort stops by ID ascending + visible_stops.sort(key=lambda x: x["stopId"]) + # Save to public directory output_file = os.path.join(script_dir, "..", "public", "stops.json") -- cgit v1.3