-
Notifications
You must be signed in to change notification settings - Fork 24
Contest Data Package (CDP)
A contest data package (CDP) is a collection of files organized in a specific directory structure intended to support contest configuration, data management, and results generation. The specification for a CDP was originally developed by the Competitive Learning Initiative Contest Systems [CLICS] group operating under the auspices of the International Collegiate Programming Contest (ICPC).
The CLICS group has subsequently deprecated the CDP specification in favor of a newer Contest Package Format (CPF) specification. However, PC2 continues to support the older CDP specification (in addition to supporting elements of the newer CPF specification).
The CDP specification comprises a description of the organization of contest data. A CDP consists of a set of folders which include:
- config/, holding contest initialization and configuration data;
- images/, holding image data (such as banners, logos, and team pictures);
- submissions/, holding submissions from teams;
- results/, holding files containing contest results;
- events/, holding descriptions of events which occur during a contest;
Each of these is described in more detail below; additional details are given at YAML Contest Configuration.
The config
folder contains configuration (input) files to configure PC2. The config
folder is the only folder needed to load a contest configuration into PC2; the rest of the folders described as part of a CDP are either optional or are used for post-contest archival of contest data and results.
The config
folder must include at least two files:
-
contest.yaml
, which holds the majority of contest configuration information, and -
problemset.yaml
, which holds general descriptions of the contest problems (such as problem names, balloon colors, etc.) Note that this file may alternatively be namedproblems.yaml
(not to be confused withproblem.yaml
; see below).
In addition, the config
folder holds one sub-folder for each contest problem, named according to the "problem short name" given in the problemset.yaml
(or problems.yaml
) file. Each problem sub-folder is organized as specified by the CLICS Problem Package Format specification, including that each such problem sub-folder must include a problem.yaml
file as described by that specification.
The config
folder may also optionally include the following files which, if present, are automatically loaded by PC2:
-
groups.tsv
, identifying the groups into which contest teams are organized. This is a tab-separated file consisting of a single header line with two fields: the wordgroup
followed by the file format version number1
. Following the header line is a series of lines each of which contains two tab-separated fields: a group number followed by a group name. -
teams.tsv
, identifying the PC2 account numbers and identification data (such as team names, schools, etc.) for each team. This is a tab-separated file consisting of a single header line with two fields: the wordteams
followed by the file format version number1
. Following the header line is a series of lines each of which contains seven tab-separated fields: (1) the PC2 team number; (2) an external team identifier (e.g. the ICPC Contest Management System Id); (3) the number of the group to which the team belongs; (4) the short form of the team name; (5) the long form of the team name; (6) the name of the team's school; and (7) the country code for the team.
See the sample contests under samps/contests
in the PC2 distribution for examples of groups.tsv
and teams.tsv
files.
The images
folder contains contest-related image files, organized in subfolders as follow:
images/logos
: contains 600x600 images of each team's logo, in logo.png format.
images/teams
: contains 1920x1080 images of each team, in team.jpg format.
This folder contains a sub-folder for each run submission, where each sub-folder is named by the submission Id. For example, results/submissions/xx
contains the following files for submission number xx:
- Team's submitted source code file(s)
-
run.properties
file (optional)
The CDP specification was written with the idea that a CDP would ultimately be an archive for a contest. To this end, the specification defines a results
folder with subfolders which are intended to hold data which is generated both during a contest and after the contest has been completed. The following sections describe each of these folders and their intended function/contents. Note however that PC2 does not automatically save any data into these output folders; it is the responsibility of the Contest Administrator to arrange that this data is copied into the appropriate folders if it is desired to have the CDP be a complete contest archive.
Examples of output files:
This folder contains CCS-specific results files, for example reports generated by a CCS. Examples:
- results/pc2/results.tsv
- results/pc2/scoreboard.tsv
This folder is intended to hold the following data:
- Finalized event feed events.xml
- events.json
The folder may also contain other files in the format "-events.xml", e.g. "pc2-events.xml".
The original CLICS CDP specification defined various additional folders, as follows (none of these are used by PC2).
- contains recorded reaction videos for each submission, in reaction.m2ts format.
- contains a final backups of each team's working folder in the form team.zip. For example, for team102 their $HOME backup would be stored in
backups/team102.zip
Here are two examples of CDPs which can be imported by PC2.
config/hello/[[problem.yaml]]
config/hello/data/secret/hello.ans
config/hello/data/secret/hello.in
config/hello/data/problem_statement/[[problem.tex]]
config/[[teams.tsv]]
config/sumit/[[problem.yaml]]
config/sumit/data/secret/sumit.in
config/sumit/data/secret/sumit.ans
config/sumit/data/problem_statement/[[problem.tex]]
config/[[contest.yaml]]
config/[[problemset.yaml]]
config/[[groups.tsv]]
config/[[userdata.tsv]]
submissions/1/A.java
submissions/3/C.java
submissions/3/A.java
submissions/2/A.java
results/[[runs.tsv]]
results/[[scoreboard.tsv]]
results/[[standings.json]]
results/[[results.tsv]]
backups/team1.zip
backups/team2.zip
backups/team3.zip
video/reactions/reaction3.m2ts
video/reactions/reaction1.m2ts
video/reactions/reaction2.m2ts
images/teams/team3.jpg
images/teams/team2.jpg
images/teams/team1.jpg
images/logos/logo1.png
images/logos/logo3.png
images/logos/logo2.png
eventFeed/[[eventfeed.json]]
eventFeed/[[Event Feed|eventfeed.xml]]
backups/team1.tar.gz
backups/team2.tar.gz
backups/team3.tar.gz
config/[[contest.yaml]]
config/[[groups.tsv]]
config/[[problemset.yaml]]
config/[[teams.tsv]]
config/[[userdata.tsv]]
config/hello/[[problem.yaml]]
config/hello/data/problem_statement/[[problem.tex]]
config/hello/data/secret/hello.ans
config/hello/data/secret/hello.in
config/sumit/data/problem_statement/problem.tex
config/sumit/data/secret/sumit.ans
config/sumit/data/secret/sumit.in
config/sumit/problem.yaml
eventFeed/[[events.json]]
eventFeed/[[events.xml]]
images/logos/logo1.png
images/logos/logo2.png
images/logos/logo3.png
images/teams/team1.jpg
images/teams/team2.jpg
images/teams/team3.jpg
results/[[results.tsv]]
results/[[runs.tsv]]
results/[[scoreboard.tsv]]
results/[[standings.json]]
submissions/1/[[run.properties]]
submissions/1/A.java
submissions/2/A.java
submissions/2/run.properties
submissions/3/[[run.properties]]
submissions/3/A.java
submissions/3/C.java
video/reactions/reaction1.m2ts
video/reactions/reaction2.m2ts
video/reactions/reaction3.m2ts
The CDP specification was developed for the ICPC Finals and single site contests. This section covers where to put other sites' files.
In general each sites' data is saved in a directory under the cdp directory.
Certain output files contain all sites' information like results.tsv and scoreboard.tsv (scoreboards).
- The site 1 information is stored under the cdp as described (no need for site1 directories)
- Other sites are stored under their respective site dirs under the same cdp directory with the site name (see examples)
- Each site is stored under siteN where N is the number of the site.
- No zero padding is allowed for the site directory or filenames.
site3
site4
site9
site22
These example location and files will be for site 4 of a contest.
results/site4
Here would be the locations for files for site4 data.
backups/site4/team1.tar.gz
backups/site4/team2.tar.gz
backups/site4/team3.tar.gz
eventFeed/site4/events.json
eventFeed/site4/events.xml
images/site4/logos/logo1.png
images/site4/logos/logo2.png
images/site4/logos/logo3.png
images/site4/teams/team1.jpg
images/site4/teams/team2.jpg
images/site4/teams/team3.jpg
results/site4/results.tsv
results/site4/runs.tsv
results/site4/scoreboard.tsv
results/site4/standings.json
submissions/site4/1/A.java
submissions/site4/1/run.properties
submissions/site4/2/A.java
submissions/site4/2/run.properties
submissions/site4/3/A.java
submissions/site4/3/C.java
submissions/site4/3/run.properties
video/reactions/site4/reaction1.m2ts
video/reactions/site4/reaction2.m2ts
video/reactions/site4/reaction3.m2ts
To start/configure a contest the only required folder is config/
. A
contest archive with only config/ is only useful for loading into a CCS
to start configuring a contest.
Once the contest is complete, the final event feed and submission files should be added back into the archive.
Other content is added as available, e.g. some contests will have backups, reaction videos, or logos, and others won't.