toucan.mvp.calculator.discipline#
Module defining the disciplines ran in the Toucan Tournament and auxiliary methods.
Classes#
Provides an enum holding the different disciplines available. |
Functions#
|
Return the ToucanDiscipline enum class corresponding to a given name. |
Module Contents#
- class toucan.mvp.calculator.discipline.ToucanDiscipline(*args, **kwds)#
Bases:
enum.Enum
Provides an enum holding the different disciplines available.
Notes
The pattern on how to process each line of the files for each discipline match is stored here. The values in each enum are as follows:
Enum ID.
Regex for processing each player’s contribution in a match. Assumed conditions:
Name, nickname and team name can be anything.
Match statistics (scores, rebounds etc.) MUST be a number.
Player number MUST be a number.
Player position MUST be a letter.
Dictionary containing the “evaluation” as a function of the position.
Location in which the points are stored inside the evaluation and whether the points contributed are considered as an addition or subtraction (e.g. goal made or goal received).
Extra rating points (e.g. initial).
- BASKETBALL#
- HANDBALL#
- get_pattern() str #
Accessor method to the line pattern in a match file.
- Returns:
str
The regex expression for a match line.
- get_eval_params() Dict[str, Tuple[int]] #
Accessor method to the evaluation parameters for a player in a match file.
- toucan.mvp.calculator.discipline.get_discipline_by_name(name: str) ToucanDiscipline #
Return the ToucanDiscipline enum class corresponding to a given name.
- Parameters:
- name
str
The name of the discipline.
- name
- Returns:
ToucanDiscipline
The ToucanDiscipline enum.