Difference between revisions of "Contest.yaml"

From PC2wiki
Jump to: navigation, search
m (removed problemset and languages)
m (See Also: add links)
Line 128: Line 128:
 
* [[problem.yaml]]
 
* [[problem.yaml]]
 
* [[problemset.yaml]]
 
* [[problemset.yaml]]
 +
* [[system.yaml]]
 +
* [[system.pc2.yaml]]
 
* [[CCS_Enhancements| CCS Enhancements]]
 
* [[CCS_Enhancements| CCS Enhancements]]
 
* [[Export Tab]]
 
* [[Export Tab]]

Revision as of 16:25, 27 June 2017

Overview

A contest.yaml file contains information used to specify a contest configuration to PC2. Contest.yaml files are written in YAML and can be loaded into PC2 either by using the --load option (when starting a PC2 Server) or by selecting the Import contest.yaml button on the Import CCS tab of the PC2 Admin Configure Contest screen.

A contest.yaml file consists of lines containing either colon-separated key:value pairs, or a list of items (called "mappings") starting with a dash. Whitespace (but not allowing tab characters) are used to indicate nested structure.

Contents of contest.yaml

For the current CCS specification for a contest.yaml see contest.yaml

contest.yaml keys
Key Description
name Name of contest
short-name Short name of contest
start-time Date and time in ISO 8601 format (wall-clock time that the contest starts)
duration Duration as h:mm:ss (length of contest, in contest time)
scoreboard-freeze-length Time before end of contest when scoreboard will be frozen form HH:MM:SS
default-clars Sequence of pre-defined clarification answers. The first will be pre-selected
clar-categories Sequence of categories for clarifications.

Example

# Contest Configuration, version 1.0 
# PC^2 Version: Version 9.3 20110918 (Sunday, September 18th 2011 23:51 UTC) Java ver 1.6.0_20 build 2345 Windows XP 5.1 (x86) 
# Created: 2011-09-18 18:05:40 PDT

name: Sample Contest
short-name: SampCon
elapsed: 0:00:00
remaining: 5:00:00
running: false
# Freeze at 1 hour before the end of the contest
scoreboard-freeze-length: 1:00:00

PC² specific keys and values

The article CCS Enhancements describes these entries in more detail.

Section Description
sites Sequence of mappings for Site information
accounts set of accounts to generate (same functionality as Generate Accounts)
auto judge Define Auto Judge assignments/settings
replay automatic Replay of previous contest feature

Example

accounts:
 - account: TEAM
     site: 1
    count: 20
 
- account: JUDGE
     site: 1
    count: 8

 - account: SCOREBOARD
     site: 1
    count: 1

sites:
 - number: 1
     name: Site 1
       IP: 130.86.67.202
     port: 50002
 password: siteone

 - number: 2
     name: Site 2
       IP: 130.86.67.201
     port: 50002

auto-judging:
  - account: JUDGE
     site: 1
     number: 2
     letters: A
     enabled: yes

  - account: JUDGE
     number: 4,5,6
     letters: B,C,D

  - account: JUDGE
     site: 2
     number: all
     letters: B,C,D

  - account: JUDGE
     site: 1
     number: 1,3
     letters: F
     enabled: no

Other Values

Other custom values are found in the article CCS Enhancements

Creating contest.yaml

A contest.yaml, problem.yaml and data files can be saved using either:

  1. the Export Contest YAML feature
  2. or use the Export Contest XML Report

Loading contest.yaml

Use the Admin Import CCS tab, Import contest.yaml button.


See Also