AlexRaubach / MetaWing

Analysis tool for X-Wing Second Edition tournament data
https://meta.listfortress.com/
MIT License
2 stars 3 forks source link

Some tournaments are not appearing #19

Closed Alaedar closed 3 years ago

Alaedar commented 3 years ago

Hey ! I've already talked about that with Matthew Whited, but some tournament are either not appearing at all in metawing while being fine and present in listfortress, or appearing like 1 month later (in the example, you have a list that won lima open 2020 in the first picture, and it doesn't appear in metawing then on the second picture) image here the result image

AlexRaubach commented 3 years ago

Let me look into this. Metawing skips importing a tournament if just one list in that tournament isn't valid xws. Sometimes that happens when Metawing's version of X-wing Data is out of data (but it should be autoupdating now) and sometimes a builder, (often a mobile app) will provide invalid xws that the parser rejects.

I guess that, ideally, I'd like to just skip bad lists when importing a tournament instead of rejecting the whole thing, or maybe require some percentage to be bad before rejecting an entire tournament. It'd also be nice to log these import errors somewhere instead of just silently ignoring them.

AlexRaubach commented 3 years ago

Finally figured out what was going on. I spent some time going through the logs of the imports from listfortress, either adding the misspelled xws pilot/ship names to the correction hash we use to import (26452b42cdb125096724886c43749cce2b6cf9fe) or just fixing broken list fortress entries directly.

In this case, it was complaining about not being able to find a pilot with the xws id of 'commandermalarus-xiclasslightshuttle' but unlike most similar issues, that's the right id for that pilot. Eventually, I went through the four lists with Malarus and found one with the following xws. Cmdr Malarus's ship should be a xi light shuttle, not a laatigunship, almost certainly an issue with a janky list building app, especially since all the legit ones fill out the vendor array. I just remade the list in yasb2, fixed it in listfortress and then reimported it successfully.

{"faction":"firstorder","pilots":[{"id":"commandermalarus-xiclasslightshuttle","ship":"laatigunship","upgrades":[],"points":45},{"id":"epsilonsquadroncadet","ship":"tiefofighter","upgrades":[],"points":25},{"id":"epsilonsquadroncadet","ship":"tiefofighter","upgrades":[],"points":25},{"id":"epsilonsquadroncadet","ship":"tiefofighter","upgrades":[],"points":25},{"id":"kyloren","ship":"tievnsilencer","upgrades":[],"points":76}],"name":"New Squad","description":"","points":196,"vendor":[]}