Skip to content

add latest berries and alter schema to allow empty properties from th…#1572

Open
programgames wants to merge 2 commits into
PokeAPI:masterfrom
programgames:add-latest-berries
Open

add latest berries and alter schema to allow empty properties from th…#1572
programgames wants to merge 2 commits into
PokeAPI:masterfrom
programgames:add-latest-berries

Conversation

@programgames

@programgames programgames commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

#1126
I added both hopo berry and roseli item.

Also Kee,Marangua,Hopo and Roseli berries in the berry table.
As you said in the issue, new berries don't have much properties as old ones do I had to change the schema to allow empty values.

Datas came from Serebii and bulbapedia :

and then :

I would like to know if it a good practice to add new data add the end of the file like I did.

Thank you

@Naramsim Naramsim left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's ok to put everything at the end of the file

Comment thread data/v2/build.py Outdated
growth_time=int(info[7]),
soil_dryness=int(info[8]),
smoothness=int(info[9]),
id=int(info[0]) if info[0] and info[0].strip() else None,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't allow None values for id, name, and other required fields. Better to remove the else None part

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed in a4c3b7c

Comment thread data/v2/build.py Outdated
growth_time=int(info[7]),
soil_dryness=int(info[8]),
smoothness=int(info[9]),
id=int(info[0]) if info[0] and info[0].strip() else None,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

]

operations = [
migrations.AlterField(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really need these? Can they not just be values like 0? (Note: berries are a weak domain of my pokemon knowledge)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since Sword and Shield, the concept of crop cultivation has been removed, null values from my point of view seems more appropriate because if we use 0 it would say 'this berry has a natural gift of 0' for example. But this concept doesn't exist in SW, SV and after.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants