pokemon vs pokemon-form vs pokemon-variety
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 5.4k
- Forks
- 1.2k
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 21
Description
Hi all, something has been on my mind a bit and now has drawn to a head with some updates to the evolution-requirements, where we now have required_pokemon_form pointing to a pokemon-form rather than a specific pokemon. I think there is now a bit of a disconnect between pokemon-varieties and pokemon-forms.
For example, take an evolution with a pokemon variety e.g., rattata-alola, evolution-chain/7. This used to point to the Pokémon at pokemon/10091, but now instead to pokemon-form/10193/. A Pokémon form "belongs" to at most 1 Pokémon (i.e., a 1-to-many relationship), and the only difference being that a form might have some minor field differences (just like a variety might).
I understand that maybe pokemon-form differs from pokemon-variety as it is purely cosmetic rather than a new Pokémon (moves, types etc), but I think it is creating unnecessary complexity when we could just add a new pokemon (which would still be different e.g., sprites).
We have a bunch of duplicated data, e.g., pokemon-form/10193/ copies most of the fields from pokemon/10091. This creates a multitude of problems e.g.,:
Let's assume we want to grab the types (normal/fire/water) of rattata-alola, where exactly should we look now?
It is pretty obfuscated as to which form/variety fields should be taken as ground truth.
I can't think of a case where a pokemon-form would not have any fields changed that could not be represented in a Pokémon. The monotonous part is then copying across these fields to pokemon (e.g., is_mega).
I really think that there is justification in merging pokemon-form with pokemon (just as varieties already does).
Please correct me if I'm overlooking something, but I really think each pokemon-form should be a pokemon, just as pokemon-variety already does (i.e., a pokemon-form/... just points to a new entry in pokemon/....). And, we dont need pokemon-form relation AT ALL.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing the pokemon/10091, pokemon-form/10193, rattata-alola, and evolution-chain/7 resources described in the issue. Trace which fields are currently authoritative for a variety and form, then document the model changes needed to remove duplicated data. Done means the relationship is unambiguous and the affected API resources remain consistent.
Written by the indexing model from the issue text.
Assessment
- Domain
- api
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100