TabbycatDebate / tabbycat

Debating tournament tabulation software for British Parliamentary and a variety of two-team parliamentary formats
https://tabbycat.readthedocs.io/
GNU Affero General Public License v3.0
240 stars 772 forks source link

Round sequencing #327

Open czlee opened 8 years ago

czlee commented 8 years ago

The round.seq field is a hangover from when Tabbycat didn't support break rounds. When we added break round support I think we sort of defaulted to just keeping rounds in "sequential order". For a couple of reasons, this isn't a great strategy:

  1. If there are multiple break categories, it's not clear how the different break categories interleave. By which I don't just mean it's user-defined—some tournaments run multiple break categories simultaneously, and some tournaments might change this on the fly.
  2. If you add a preliminary round, you (the user) have to renumber the sequence numbers of all the break rounds. The same goes for adding a break round when there is more than one break category.

Here are some options:

  1. Maintain the current sequencing system, but don't create break rounds until they actually happen. This means the UI will need to ask the user which break category the round is for, when the draw is generated (if there is more than one break category). When creating a break round, use the next available sequence number. The name etc. of the break round can be inferred from the break size.
  2. Change the sequencing system to separate prelim from break rounds, and to separate rounds in each category. This means that (tournament, seq) pairs will no longer be unique, which will in turn mean it can't be easily sorted using just the one field. For prelim rounds, seq should run in ascending order; for break rounds, seq should run in descending order (since "more rounds", if added, are added to the front; this way, the grand final is always seq=1). The "round order" is not fully defined if there is more than one break category, but in principle would go prelim rounds in ascending order, then break rounds in descending order.

(1) would probably wreak less havoc on the status quo. (2) would require us to rethink URLs, etc.. Though arguably, we should rethink URLs anyway: /australs/draw/round/10/ is probably better off as /australs/draw/open/semi/ (though at the same time, adding a slug field to Round would also be a pain).

philipbelesky commented 8 years ago

It can be a pain to reorder things (I did this with WADL last night) but I'm not sure its a huge pain, when most use cases wont require it, or for cases where it is required (say dropping/adding an ESL octo at Australs) the user should have a vague idea of what to do. In either (1) or (2) prelim rounds still have a seq that could require reordering at some point.

That said (2) seems fine; an ascending seq makes sense. You could always use the abbreviation as the slug — its used in the navigation UI anyway and requiring it to be unique in conjunction with the break category makes sense.

That said I don't think its a huge enough pain that this should be a big priority.