"is_default" is not unique per species
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 5.4k
- Forks
- 1.2k
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 21
Description
The PokemonForm documentation describes is_default as
True for exactly one form used as the default for each Pokémon.
Of the 249 Pokémon with more than one form in pokemon.csv, 222 of them have more than one form with is_default set to True.
While the easiest fix would just be to purge these secondary is_default forms, I think that field should just be deprecated and replaced with a different method of determining the primary form. I have to imagine this field is not widely used by API consumers, as it would not work for its documented purpose.
My preferred design would be to simply have the form of the species with the first form ID be the primary form. It looks like there isn't strictly a form_id field, but it roughly corresponds to the form_order field. So my suggestion would be to just define that the form of the Pokémon with the smallest value in form_order is considered the default form.
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 with the PokemonForm documentation and the pokemon.csv data referenced in the issue, then trace how is_default and form_order are exposed by the API. Review the existing comments before settling the replacement rule. Done means the primary-form behavior is agreed, implemented, and documented without leaving the current field's semantics ambiguous.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, backend-api-design
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100