Difference between revisions of "System.pc2.yaml"

From PC2wiki
Jump to: navigation, search
(initial article)
 
m (update description)
Line 1: Line 1:
 
==Overview==
 
==Overview==
  
A '''system.pc2.yaml''' file contains information used to specify a contest configuration to PC<sup>2</sup>. Contest.yaml files are written in [https://en.wikipedia.org/wiki/YAML YAML] and can be loaded into PC<sup>2</sup> either by using the [[Load_Contest_Configuration#Using_the_pc2_server | --load]] option (when starting a PC<sup>2</sup> Server) or by selecting the '''Import contest.yaml''' button on the [[Import CCS Tab]] of the PC<sup>2</sup> Admin '''Configure Contest''' screen.
+
A '''system.pc2.yaml''' file contains additional yaml settings.   See [[contest.yaml]] for details about yaml files.
 
 
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==
 
==Contents of contest.yaml==
  
For the current [[CLICS]] [[CCS]] specification for a contest.yaml file see [https://clics.ecs.baylor.edu/index.php/Contest_Control_System#contest.yaml CLICS contest.yaml]
+
Typically this file contains PC^2 enhansements see article [[CCS Enhancements]].
 
 
{|border="1" cellpadding="1"
 
|+ 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 [[Scoreboard Freeze|frozen]] form HH:MM:SS
 
|-
 
|}
 
  
 
===Example===
 
===Example===
  
# Contest Configuration, version 1.0
+
See descriptions in [[CCS_Enhancements]] for info on these sections
# 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&sup2; specific keys and values==
 
 
 
The article [[CCS Enhancements]] describes these entries in more detail.
 
 
 
{|border="1" cellpadding="1"
 
|+
 
! Section !! Description
 
|-
 
| [[CCS_Enhancements#Sites_Section|sites]] || Sequence of mappings for [[Site]] information
 
|-
 
| [[CCS_Enhancements#Accounts_Section|accounts]] || set of accounts to generate (same functionality as [[Generate Accounts]])
 
|-
 
| [[CCS_Enhancements#Auto_Judge|auto judge]]|| Define Auto Judge assignments/settings
 
|-
 
| [[CCS_Enhancements#Replay|replay]] || automatic [[Replay]] of previous contest feature
 
|}
 
 
 
===Example===
 
 
 
See descriptions in [[CCS_Enhancements| CCS Enhancements]] for info on these sections
 
 
 
 
   
 
   
 
  accounts:
 
  accounts:

Revision as of 11:15, 30 June 2017

Overview

A system.pc2.yaml file contains additional yaml settings. See contest.yaml for details about yaml files.

Contents of contest.yaml

Typically this file contains PC^2 enhansements see article CCS Enhancements.

Example

See descriptions in CCS_Enhancements for info on these sections

accounts:
  - account: TEAM
    site: 1
    count: 80

  - account: JUDGE
    site: 1
    count: 12

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

  - account: JUDGE
     site: 1
     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

sites:
  - number: 2
    name: 'Site 2'
    password: site2
    IP: localhost
    port: 51002

  - number: 3
    name: 'Site 3'
    password: site3
    IP: localhost
    port: 52002

  - number: 4
    name: 'Site 4'
    password: site4
    IP: localhost
    port: 53002

  - number: 5
    name: 'Site 5'
    password: site5
    IP: localhost
    port: 54002


Other Values

Other custom values are found in the article CCS Enhancements

Creating system.pc2.yaml

Currently the sections that are typically in systems.pc2.yaml are in the contest.yaml

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

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

Loading system.pc2.yaml

See Load Contest Configuration article

See Also