Championships

class sol.models.championship.Championship(**kwargs)

A serie of tournments organized by the same club.

championshipRanking(limit=None, onlywomen=False)

Summarize the championship, collecting final prizes of the players.

For each tuple of players collect the earned prize in each tourney of the championship, or zero if the players did not participate to a given event.

limit and onlywomen are used by the general rankings, to consider only last year tourneys and to produce women ranking respectively.

If skipworstprizes is set and limit is not, then up to that number of worst prizes of each competitor will be ignored; to avoid degenerated ranking, do that only when the number of tourneys of the championship is greater than skipworstprizes.

Results in a tuple of two items, the first being a list of dates, the second a list of tuples, sorted by total prize: each tuple contains five items, a tuple of players, their total prize, a list of their prizes sorted by date of event, the number of prizes and finally None or a list of skipped prizes.

closed

Whether the championships is close, and its ranking finalized.

couplings

Kind of coupling used to build next turn, used as default value for the corresponding field when creating a new tourney.

description

Description of the championship.

idchampionship

Primary key.

idclub

Organizer club’s ID.

idprevious

Previous championship’s ID.

playersperteam

Number of players per team.

previous

Previous championship.

prizes

Kind of prize-giving.

This is used to determine which method will be used to assign final prizes. It may be:

asis
means that the final prize is the same as the competitor’s points;
fixed
means the usual way, that is 18 points to the winner, 16 to the second, 14 to the third, 13 to the fourth, ..., 1 point to the 16th, 0 points after that;
fixed40

similar to fixed, but applied to best fourty scores starting from 1000:

  1. 1000
  2. 900
  3. 800
  4. 750
  5. 700
  6. 650
  7. 600
  8. 550
  9. 500
  10. 450
  11. 400
  12. 375
  13. 350
  14. 325
  15. 300
  16. 275
  17. 250
  18. 225
  19. 200
  20. 175
  21. 150
  22. 140
  23. 130
  24. 120
  25. 110
  26. 100
  27. 90
  28. 80
  29. 70
  30. 60
  31. 50
  32. 40
  33. 35
  34. 30
  35. 25
  36. 20
  37. 15
  38. 10
  39. 5
  40. 1
millesimal
is the classic method, that distributes a multiple of 1000/num-of-competitors;
weighted
is similar to millesimal but uses the previous championship ranking to compute the value of the tourney.
serialize(serializer)

Reduce a single championship to a simple dictionary

skipworstprizes

Number of worst prizes to skip in computing the ranking.

tourneys

Tourneys in this championship.

Previous topic

Clubs

Next topic

Competitors

This Page