Filter out Max Raid den routes from Sword/Shield game data
All checks were successful
CI / backend-lint (pull_request) Successful in 8s
CI / frontend-lint (pull_request) Successful in 29s

Den child routes (~561 per game) bloated the route list without being
useful for Nuzlocke tracking. Adds filter_den_routes() to strip children
matching "(Den " from the route hierarchy, reducing Sw/Sh from ~1,007
to 446 routes each.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Julian Tabel
2026-02-13 09:18:29 +01:00
parent 659dcf2252
commit b7be099aee
5 changed files with 862 additions and 97067 deletions

View File

@@ -341,3 +341,15 @@ def build_routes(
))
return routes
def filter_den_routes(routes: list[Route]) -> list[Route]:
"""Remove Max Raid den child routes from the route list.
Dens are identified by "(Den " in the child route name.
Only children are filtered — parent routes are kept.
"""
for route in routes:
if route.children:
route.children = [c for c in route.children if "(Den " not in c.name]
return routes