This PR adds new fields and API stuff related to track validation.
Added closing_leaderboard field to models.Competition. This field stores
a competition's leaderboard at the time when the competition was closed. The
Competition.get_leaderboard() method was also refactored to show this
final leaderboard when the competition is already closed instead of
calculating the leaderboard dynamically (this is only done when the
leaderboard is requested and the competition is still open)
Added is_valid and validation_error fields to tracks.Track. These
fields store information on a track's validity. The values are populated
during the track ingestion phase (done on smb-backend). A track that is not
valid will not have its indexes (emissions, costs, etc) calculated, nor will
it be counted towards active competitions or badge assignments.
The API has also been enhanced in order to show these new fields on all
track-related endpoints. These endpoints now also have is_valid as an
additional filter. This means it is possible to request only valid/invalid
tracks. For example:
This PR adds new fields and API stuff related to track validation.
Added
closing_leaderboard
field tomodels.Competition
. This field stores a competition's leaderboard at the time when the competition was closed. TheCompetition.get_leaderboard()
method was also refactored to show this final leaderboard when the competition is already closed instead of calculating the leaderboard dynamically (this is only done when the leaderboard is requested and the competition is still open)Added
is_valid
andvalidation_error
fields totracks.Track
. These fields store information on a track's validity. The values are populated during the track ingestion phase (done on smb-backend). A track that is not valid will not have its indexes (emissions, costs, etc) calculated, nor will it be counted towards active competitions or badge assignments.The API has also been enhanced in order to show these new fields on all track-related endpoints. These endpoints now also have
is_valid
as an additional filter. This means it is possible to request only valid/invalid tracks. For example: