veekun / pokedex

more than you ever wanted to know about Pokémon
MIT License
1.44k stars 637 forks source link

Remove version_group_pokemon_move_methods #334

Closed magical closed 3 years ago

magical commented 3 years ago

Aside from being a mouthful, it's entirely redundant and gets out of sync easily.

Spline pokedex uses it a) when constructing the move table, and b) to filter out half-ripped versions in the comparifier. (B) isn't important and (A) doesn't actually require a real database table. We could just as easily query the database at startup time, build an equivalent structure in memory and use that during move table construction. Or, if it must stay in the database, we could construct it automatically when pokemon_moves is loaded.

magical commented 3 years ago

Another option, from #74, is to add a test to check whether it is outdated.

But that's dumb -- if we know that it is outdated then we have enough information to update it, so we should just do that instead of bugging the user about it.

magical commented 3 years ago

if it must stay in the database, we could construct it automatically when pokemon_moves is loaded.

We can easily do this at the end of load, either before or after Translations. We can even keep the csv file around -- it's harmless during load, and dumping it would let you see if anything changed. Load/dump becomes a simple way to regenerate the csv file, and that gives us a test for free since the CI verifies that load/dump round trips.

It would only need to be regenerated when we're loading pokemon_moves or itself.