Add game data seeding from PokeAPI with level ranges
Seed the database with Pokemon game data for 5 games (FireRed, LeafGreen, Emerald, HeartGold, SoulSilver) using pokebase. Includes Alembic migrations for route unique constraints and encounter level ranges, a two-phase seed system (offline fetch to JSON, then idempotent upserts), and Dockerfile updates for the seed runner. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
11
.beans/nuzlocke-tracker-igl3--name-generation.md
Normal file
11
.beans/nuzlocke-tracker-igl3--name-generation.md
Normal file
@@ -0,0 +1,11 @@
|
||||
---
|
||||
# nuzlocke-tracker-igl3
|
||||
title: Name Generation
|
||||
status: draft
|
||||
type: feature
|
||||
priority: normal
|
||||
created_at: 2026-02-05T13:45:15Z
|
||||
updated_at: 2026-02-05T13:46:30Z
|
||||
---
|
||||
|
||||
For nuzlockes I want to implement name generation. The user should be able to provide a naming scheme or a list of nick names that can then be selected when a new encounter is registered.
|
||||
@@ -0,0 +1,26 @@
|
||||
---
|
||||
# nuzlocke-tracker-j28y
|
||||
title: Curate route ordering to match game progression
|
||||
status: todo
|
||||
type: task
|
||||
created_at: 2026-02-05T13:37:39Z
|
||||
updated_at: 2026-02-05T13:37:39Z
|
||||
parent: nuzlocke-tracker-f5ob
|
||||
---
|
||||
|
||||
Routes are currently in alphabetical order from PokeAPI. Update the order field in each game's JSON seed file to reflect actual game progression (e.g., Pallet Town → Route 1 → Viridian City → Route 2 → ...).
|
||||
|
||||
## Details
|
||||
- 646 routes total across 5 games
|
||||
- FireRed and LeafGreen share the same route progression (Kanto)
|
||||
- HeartGold and SoulSilver share the same route progression (Johto + Kanto)
|
||||
- Emerald has its own progression (Hoenn)
|
||||
- So effectively 3 unique orderings to define
|
||||
- After updating JSON files, re-run the seed: `podman compose exec -e PYTHONUNBUFFERED=1 -w /app/src api python -m app.seeds`
|
||||
|
||||
## Files
|
||||
- `backend/src/app/seeds/data/firered.json`
|
||||
- `backend/src/app/seeds/data/leafgreen.json`
|
||||
- `backend/src/app/seeds/data/emerald.json`
|
||||
- `backend/src/app/seeds/data/heartgold.json`
|
||||
- `backend/src/app/seeds/data/soulsilver.json`
|
||||
@@ -1,31 +1,34 @@
|
||||
---
|
||||
# nuzlocke-tracker-k5lm
|
||||
title: Initial Game Data Seeding
|
||||
status: todo
|
||||
status: completed
|
||||
type: task
|
||||
priority: normal
|
||||
created_at: 2026-02-04T15:44:12Z
|
||||
updated_at: 2026-02-04T15:47:29Z
|
||||
updated_at: 2026-02-05T13:37:50Z
|
||||
parent: nuzlocke-tracker-f5ob
|
||||
---
|
||||
|
||||
Create seed data for the database with initial games, routes, and Pokémon.
|
||||
|
||||
## Checklist
|
||||
- [ ] Research and compile data for MVP games:
|
||||
- [ ] Pokémon FireRed/LeafGreen (Gen 3 Kanto remakes - popular for Nuzlockes)
|
||||
- [ ] Pokémon Emerald (Gen 3 Hoenn)
|
||||
- [ ] Pokémon HeartGold/SoulSilver (Gen 4 Johto remakes)
|
||||
- [ ] For each game, gather:
|
||||
- [ ] All routes/areas in progression order
|
||||
- [ ] Available wild Pokémon per route
|
||||
- [ ] Encounter methods (grass, surf, fish, etc.)
|
||||
- [ ] Create seed scripts/migrations to populate database
|
||||
- [ ] Include Pokémon base data (national dex, names, types, sprite URLs)
|
||||
- [ ] Document data sources for attribution
|
||||
- [x] Research and compile data for MVP games:
|
||||
- [x] Pokémon FireRed/LeafGreen (Gen 3 Kanto remakes - popular for Nuzlockes)
|
||||
- [x] Pokémon Emerald (Gen 3 Hoenn)
|
||||
- [x] Pokémon HeartGold/SoulSilver (Gen 4 Johto remakes)
|
||||
- [x] For each game, gather:
|
||||
- [x] All routes/areas in progression order
|
||||
- [x] Available wild Pokémon per route
|
||||
- [x] Encounter methods (grass, surf, fish, etc.)
|
||||
- [x] Create seed scripts/migrations to populate database
|
||||
- [x] Include Pokémon base data (national dex, names, types, sprite URLs)
|
||||
- [x] Document data sources for attribution
|
||||
- [x] Curate route ordering to match game progression — split to nuzlocke-tracker-j28y
|
||||
|
||||
## Notes
|
||||
- Use PokeAPI or Bulbapedia as data sources
|
||||
- Admin panel allows adding more games later
|
||||
- Focus on accuracy for the 3 MVP games
|
||||
- Sprite URLs can point to existing sprite repositories
|
||||
|
||||
## Data Sources
|
||||
- Game data (routes, encounters, Pokemon): [PokeAPI](https://pokeapi.co/) via [pokebase](https://github.com/PokeAPI/pokebase) Python wrapper
|
||||
- Sprites: [PokeAPI/sprites](https://github.com/PokeAPI/sprites) on GitHub
|
||||
Reference in New Issue
Block a user