pc2ccs / pc2v9

Version 9 of the PC^2 Programming Contest Control System
Eclipse Public License 2.0
45 stars 23 forks source link

Update team numbers in pc2 from a CLICS event feed JSON #275

Open lane55 opened 2 years ago

lane55 commented 2 years ago

Is your feature request related to a problem?

The assignments of team numbers is a manual process.

Feature Description:

Update team numbers based on team numbers in a CLICS event feed.

The CMS Team Id (aka external team id) will be used to match the team account, then the team number can be updated/assigned. dal: account numbers cannot be updated, the account number (ClientId.clientNumber is immutable.)

Have you considered other ways to accomplish the same thing?

The work around is to generate the teams then use a pc2 load account file to assign account team values.

Do you have any specific suggestions for how your feature would be **implemented in PC^2?** If so,

Either create a tool that read the EF JSON and update/merge teams.tsv then create the accounts.

or Create a UI feature that will read the EF and create the accounts from that data.

Additional context:

Note that Primary CCS connection information can be read from CDP/config files or from the ContestInformation class.

lane55 commented 2 years ago

At this time to avoid impact on the Shadow and other code, a new tool is being created to extract team information from the event feed.

lane55 commented 2 years ago

Usage

C> bin\pc2tools --efx Usage: CLICSEventFeedExract [options]

Purpose: to write new.teams.tsv file from data from Event Feed

--offal - output file format account_load to file new.accounts_load.tsv --cdp cdpDir - Read Event Feed API read ccsurl, login and password from yaml in cdpDir/config OR --ccsurl URL - Primary CCS URL --login LOGIN - Primary CCS login --password PASSWORD - Primary CCS password OR, // --file EventFeedJSONFile - input CLICS event feed

lane55 commented 1 year ago

Note that loading team names defeats one of the purposes of shadowing - that is to verify that the team names and other fields (loaded independently) match the Primary CCS mode.

lane55 commented 1 year ago

Note that since the team client number is part of the key (ClientID, site, team #, type) that, at this time, the updating from the primary CCS must loaded into the server on startup.

One other, must lower LOE, would be to use the Account.alias as intended. The alias is an alternate login name, and as such could be used as a way to match a submission to its team.