Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Analyses of gmax-formes (mostly) have invalid formats #7

Closed
Intenzi opened this issue Nov 11, 2023 · 0 comments
Closed

Analyses of gmax-formes (mostly) have invalid formats #7

Intenzi opened this issue Nov 11, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@Intenzi
Copy link

Intenzi commented Nov 11, 2023

There is possibly a scraping issue with regards to gmax pokemon
I have solely worked with analyses and sets of Sword Shield, thus all of the data below is for gen8.json in analyses and sets.

Concise Issue:

"pokemon": {"ru": {"overview": "...", "sets": [...]}, "pu": {...}, ...}

In the analysis file, each pokemon has various formats. There is an analysis for the format (overview, comments, credits, etc.).
Inside the format, there is also an analysis for each strategy (sets key is always present) in the format (name is always present and description is present only if the analysis for the strategy is written).

The issue being that certain pokemon (listed in details) contain invalid formats (only in their analysis json and not in their sets json).
These formats can be noticed to be invalid as they don't actually have an analysis or a set on their corresponding smogon page.
The invalid format issue can be further segregated into two types:-

  1. the format key (1v1 in below example) contains the poke's base-forme's 'format analysis' i.e. overview, credits, etc. however there is no sets key.
"pokemon": {"1v1": {"overview": "...", "credits": "..."}, "anythinggoes": {"overview": "...", "sets": [...], "credits": "..."}, ...}
  1. the entire invalid format's data is empty
"pokemon": {"1v1": {}, "anythinggoes": {"overview": "...", "sets": [...]}, ...}

Details:

Smogon is wack to place both the gmax/forme and the poke's analysis in the same place but I'm sure you're using the export pokepaste to check which of the two's set it actually is

  1. however, the analysis gets written for both gmax and non gmax pokemon

I did a small python check on gen8.json of analysis

for poke in dt:
    for format_ in dt[poke]:
        # and statement basically ensuring there is something in there and its not an empty dict
        if not "sets" in dt[poke][format_] and dt[poke][format_]:
            print(poke, format_)

Results Being:-

Venusaur vgc2022
Venusaur-Gmax vgc2021
Venusaur-Gmax nationaldexmonotype
Charizard vgc2022
Charizard vgc2021
Charizard-Gmax nationaldexmonotype
Snorlax battlestadiumsingles
Darmanitan-Zen 1v1
Zygarde balancedhackmons
Zygarde-Complete nationaldexag
Rillaboom battlestadiumsingles
Rillaboom vgc2022
Rillaboom vgc2021
Rillaboom-Gmax camomons
Rillaboom-Gmax godlygift
Rillaboom-Gmax nationaldex
Cinderace battlestadiumsingles
Cinderace-Gmax almostanyability
Cinderace-Gmax stabmons
Cinderace-Gmax nationaldexmonotype
Coalossal-Gmax zu
Urshifu-Gmax ubers
Urshifu-Gmax vgc2021
Urshifu-Gmax 1v1
Urshifu battlestadiumsingles
Urshifu-Rapid-Strike vgc2021
Urshifu-Rapid-Strike-Gmax cap
Urshifu-Rapid-Strike-Gmax stabmons
Urshifu-Rapid-Strike-Gmax godlygift
Urshifu-Rapid-Strike-Gmax nationaldex

These are all the pokemon and their formats that have an analysis with no set i.e. if you go to the json file and check urshifu-gmax 1v1, you'll find that it contains comments, credits, teams but no sets. If you go to its corresponding smogon page -> https://www.smogon.com/dex/ss/pokemon/urshifu/1v1/ although its already clearcut that gmax can't be used in 1v1 format, you'll notice that all sets are for urshifu not urshifu gmax. And for just confirmation sake if you go back to the analysis json file at urshifu this time, you will find that the 1v1 sets are all properly present.

Why I believe the issue to be the case with analysis scraping only is that there is no 1v1 format in the corresponding sets.json for urshifu-gmax however there is a 1v1 format in its analyses json.

  1. The other issue would be empty analyses for formats. Now, this is to be expected when there is nothing written for the format other than an exportable set. However, the format should not be shown when there is no set written for that pokemon in that format in the first place.
    Acceptable:
    "vgc2020": {"sets": [{"name": "Choice Band"}, {"name": "Assault Vest"}]},
    Bug / Non Acceptable:
    "nationaldexmonotype": {} // no sets?? whys the format there
    I would love to go through the scraping code and find out why this has occured however my brain is not braining rn so I'm assuming this is once again to do with pokemon with formes due to the results I got below.

I did a small python check of gen8.json of analyses once again

for poke in dt:
    for format_ in dt[poke]:
        # completely empty, no sets no credits nothing
        if not dt[poke][format_]:
            print(poke, format_)

Results Being:-

Venusaur battlestadiumdoubles
Venusaur-Gmax vgc2020
Venusaur-Gmax godlygift
Venusaur-Gmax 1v1
Snorlax-Gmax nationaldexru
Darmanitan balancedhackmons
Darmanitan-Zen nationaldexru
Zygarde-Complete mixandmega
Zygarde-Complete 1v1
Zygarde-Complete 2v2doubles
Rillaboom vgc2020
Rillaboom-Gmax 1v1
Rillaboom-Gmax 2v2doubles
Rillaboom-Gmax nationaldexmonotype
Cinderace vgc2020
Cinderace-Gmax 2v2doubles
Coalossal vgc2020
Hatterene vgc2020
Hatterene-Gmax godlygift
Urshifu vgc2020
Urshifu-Rapid-Strike vgc2020
Urshifu-Rapid-Strike-Gmax 1v1
Urshifu-Rapid-Strike-Gmax nationaldexuu
Urshifu-Rapid-Strike-Gmax nationaldexmonotype

These results are different from the results up above, with the similarity in both being that it deals with gmax/formes (in most)
What you will find however is that this issue is not present in their corresponding sets.json

@Intenzi Intenzi added the bug Something isn't working label Nov 11, 2023
scheibo added a commit that referenced this issue Nov 14, 2023
@scheibo scheibo closed this as completed Nov 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

2 participants