No more ranked matches should be run at this point, nor should ratings be updated, nor new bots submitted.
(conn)
| 340 | |
| 341 | |
| 342 | def run(conn) -> None: |
| 343 | """ |
| 344 | No more ranked matches should be run at this point, nor should ratings be |
| 345 | updated, nor new bots submitted. |
| 346 | """ |
| 347 | maps = get_tournament_maps(conn, tag=MAP_TAG) |
| 348 | teams = get_all_teams_and_index_submissions(conn) |
| 349 | |
| 350 | num_teams = len(teams) |
| 351 | if num_teams < 2: |
| 352 | logging.warn('Only {} teams in the tournament, exiting...' |
| 353 | .format(num_teams)) |
| 354 | return |
| 355 | |
| 356 | teams = pad_teams_power_of_two(teams) |
| 357 | logging.info('Fetched {0} teams and {1} maps' |
| 358 | .format(num_teams, len(maps))) |
| 359 | |
| 360 | run_tournament(conn, maps, teams) |
| 361 | |
| 362 | |
| 363 | if __name__ == '__main__': |
no test coverage detected