-
-
Notifications
You must be signed in to change notification settings - Fork 882
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Re-implement rank filters for queryset standings
This commit makes the ranked annotations NULL for the purposes of the ranking annotator when using queryset-based standings. To simplify the task, rank filters are now a two-tuple (count field, minimum count) which are then passed to the StandingsGenerator to create the appropriate function or pass to the ranking annotator, which passes to the QuerySet metric generator that creates a new annotation with the given field and value to wrap in the conditional (NULL if false). This commit also deduplicates the previous get_rank_filter methods to use class attributes for preference and field, and removes an extraneous default parameter.
- Loading branch information
Showing
5 changed files
with
57 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters