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

Support DebateXML import #5

Open
tienne-B opened this issue Nov 7, 2019 · 6 comments
Open

Support DebateXML import #5

tienne-B opened this issue Nov 7, 2019 · 6 comments
Labels
enhancement New feature or request

Comments

@tienne-B
Copy link
Contributor

tienne-B commented Nov 7, 2019

DebateXML is an interchange format for debate tourmaments so that data may be passed through various applications. It would be nice to be able to import a tournament through DebateXML to support importing from various systems (MIT-Tab has export).

The possible difficulty is that only aggregate results are kept for these records while DebateXML structures the data as a tournament (like tournament->round->debate, etc.).

@roddajohn
Copy link
Contributor

An import is in progress to read from MIT-Tab specifically (a PR is coming on MIT-Tab, and there's a bunch of import code already here), through an MIT Tab API (and the new outrounds feature on MIT Tab).

I don't think there's a plan to write a DebateXML import simply because APDA tournaments basically never use anything other than MIT Tab. More than happy to write it if a need pops up, or you could totally if you wanted to.

@pdvt
Copy link
Contributor

pdvt commented Nov 7, 2019

Actually, this could be useful for importing BP tournaments (and NorthAms) that contribute autoquals.

@roddajohn roddajohn added the enhancement New feature or request label Nov 7, 2019
@tienne-B
Copy link
Contributor Author

I've somewhat started on this and have got participant (team/debater) and school import. The two next things would be results import and round import. For each of them I'd need some guidance. For results, I will need to reconstruct the team/speaker standings. What is the APDA ranking precedence? As for rounds, the model is APDA-specific, so couldn't be used for BP. In TOURNAMENT_TYPES, is there an equivalent key?

Structuring the import as if the tournament object is already in the database.

@roddajohn
Copy link
Contributor

@tienne-B I'd say don't worry about round import for now. There is no BP TOURNAMENT_TYPES setting, but there are types for NorthAms, etc. You can check out how I've done the import code, but it presumes that the tournament object exists and is setup correctly.

What do you mean by APDA ranking precedence?

@tienne-B
Copy link
Contributor Author

tienne-B commented Nov 10, 2019

I know there is no BP setting, but each setting is itself a dictionary; and it seems like qual is True for APDA and false for BP.

In SpeakerResult and TeamResult, there is the place field. I assume it is for their ranking within the tournament. So the best speaker/team gets 1, and so on. However DebateXML doesn't keep rankings, just the scores. Therefore, the importer would have to construct these rankings. I'd assume by points/wins first (including elimination) then team score second. Am I correct?

For the standings models, are the objects automatically generated, or is there more to do?

@roddajohn
Copy link
Contributor

The setting maps to the way that they count in APDA rankings. NorthAms grants autoquals for example, but not SOTY, NOTY, TOTY, or qual points, and that is reflected in the settings. You shouldn't have to touch the settings to get the import to work.

place you are correct in assuming refers to the place in the tournament. We give autoquals based on how teams did at the tournament, so whomever is the top team at NorthAms gets an autoqual, etc, if they are from an APDA school (which other code takes care of). I really don't like the idea of constructing the awards on our end unless we know they precisely and always match the final rankings of teams after outrounds have happened.

Standings models are auto generated after calling the update_soty code, for example. The develop branch has an example of how this import works for APDA tournaments from MIT-Tab. I can also get that part to work if the import works.

Thanks for working on this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants