Normalize CSV identifiers to ASCII slugs#1438
Normalize CSV identifiers to ASCII slugs#1438LoicOuth wants to merge 2 commits intoPokeAPI:masterfrom
Conversation
- Remove Unicode apostrophes (') from item names
- Remove accents (è) from location names
- Remove Unicode characters (ñ) from item names
- Remove parentheses from item identifiers
- Replace + with - in move meta categories
- Replace & with nothing in item names
Fixes 16 invalid identifiers to comply with ASCII slug pattern ^[a-z0-9-]+$
Is there an error here? Which issue? |
|
Just a note on your original PR:
I think a lot of your replies in the previous issue and PR are LLM generated. It is really hard to tell what is human and what isn't anymore on this platform. I strongly suggest writing your own messages back to humans and not relying on a bot to do your thinking. We will not accept contributions from humans who haven't given good thought to what they're doing and just copied and pasted a prompt to a bot and then opened a PR. That isn't contribution, that is noise. Outsourcing effort to machines shifts the effort from you creating the code, to use reviewing it and dealing with what the bot is producing. |
| 1670,scarlet-book,20,0,, | ||
| 1671,violet-book,20,0,, | ||
| 1672,kofu’s-wallet,22,0,, | ||
| 1672,kofus-wallet,22,0,, |
There was a problem hiding this comment.
Given these were all originally broken and not returning anything, I think it's okay to just update them?
FWIW - I feel like most people use the hypermedia links in API responses to access items, which uses IDs.
There was a problem hiding this comment.
Yes I was pretty sure from the beginning that these PRs were both AI, but I figured I'd be thorough with the review since this was something that would benefit future contributions. Since we offer accessing the URLs with the identifiers (which is actually what I tend to use) I think it's best to make sure that the URLs are all accessible.
It's been frustrating that the past three PRs have been all AI, but I see you're updating AI guidelines so I hope things will be different moving forward.
Ok, I understand. It’s true that I used LLM to write the PR descriptions and some messages to save time. I also understand that this can make the review process take more time for you and that it may raise doubts about my code in that case, but I have no problem discussing it if necessary. I’ll be more careful next time and will write my messages myself. I Apologize. |
Normalize CSV identifiers to ASCII slug format
Fixes the invalid identifiers identified by #1436
Context
This PR normalizes 16 resource identifiers in CSV files to comply with the ASCII slug format (
^[a-z0-9-]+$). These identifiers contained Unicode characters, accents, or special characters that caused API endpoint issues.Changes
items.csv (10 corrections):
kofu's-wallet→kofus-wallet(Unicode apostrophe U+2019)leader's-crest→leaders-crest(Unicode apostrophe U+2019)jalapeño→jalapeno(Unicode character ñ)steel-bottle-(r)→steel-bottle-r(parentheses)steel-bottle-(y)→steel-bottle-y(parentheses)steel-bottle-(b)→steel-bottle-b(parentheses)plaid-tablecloth-(y)→plaid-tablecloth-y(parentheses)plaid-tablecloth-(b)→plaid-tablecloth-b(parentheses)plaid-tablecloth-(r)→plaid-tablecloth-r(parentheses)b&w-grass-tablecloth→bw-grass-tablecloth(ampersand)locations.csv (2 corrections):
rivière-walk→riviere-walk(accent è)dernière-way→derniere-way(accent è)move_meta_categories.csv (4 corrections):
damage+ailment→damage-ailment(plus sign)damage+lower→damage-lower(plus sign)damage+raise→damage-raise(plus sign)damage+heal→damage-heal(plus sign)Normalization Rules
()→ removed&→ removed (b-and-w → bw)+→ replaced with hyphen-Testing
After these changes, the CSV validation test introduced in PR #1437 passes successfully: