Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I966 results compare fixes #998

Merged
merged 6 commits into from
Aug 27, 2024

Conversation

johnbrvc
Copy link
Collaborator

Description of what the PR does

  1. Compare per-problem results in scoreboard
  2. Do not stop compare process if a file is missing, report missing file and continue.
  3. Improve messages generated in report.
  4. Order results by compare state, then key, then field. Putting compare state in there groups all errors of the same type together.
  5. Added comments where they were deficient.
  6. If a record (key) exists in one file but not the other, do not display each field that is missing. It is enough to state the entire key is missing from one file.
  7. Clean up generated report (Pluralize, comments, highlight the filename).
  8. Add GUI flag to ignore empty awards (no teams for the award). The CDS adds awards that have no teams. Awards with no teams are meaningless, so this flag will allow you to ignore them, cleaning up the results compare report.
  9. Remove redundant info from the compare report. Some lines had the same thing (key) repeated 3 times.
  10. Updated Junit to use newer data files and test new features.

Issue which the PR addresses

Fixes #966

Environment in which the PR was developed (OS,IDE, Java version, etc.)

Windows 11
java version "1.8.0_321"
Java(TM) SE Runtime Environment (build 1.8.0_321-b07)
Java HotSpot(TM) 64-Bit Server VM (build 25.321-b07, mixed mode)

Precise steps for testing the PR (i.e., how to demonstrate that it works correctly)

The JUnit "FileComparisonUtilitiesTest" does an excellent job of testing various cases.

From the GUI:
Bring up a completed contest such as WF46 Finals, or bring up a clean contest (you can use the JUnit test data from WF46)
On an administrator, go to the Run Contest->Results Compare tab
Fill in (or browse to): ...\pc2v9\testdata\FileComparisonUtilitiesTest\resultscompwork\results\domjudge for the Primary CCS Results Directory
Fill in (or browse to): ...\pc2v9\testdata\FileComparisonUtilitiesTest\resultscompwork\results\pc2 for the PC2 Results Directory
Check
the "Include details in comparison"
The state of the "Ignore awards with no teams" checkbox will not matter for this test
Press the "View Report" button. There should be 0 differences.
Close the View Report window.
Change the Primary CCS Results Directory to: C:\MyNetProjects\ICPC\pc2v9\testdata\FileComparisonUtilitiesTest\resultscompwork\results\cds
Check both the "Include details in comparison" and the "Ignore awards with no teams" checkboxes.
Press the "View Report" button.
You will see it reports there is no results.tsv file in the primary (cds) folder (correct).
You will see it reports 40 differences in the awards.json file. This is because the CDS uses different citations (note the differences). In addition, the CDS has some additional awards for the resolver that the CCS's are unaware of. These are reported as "No record with that key was found in the PC2 awards file" (for each missing award)
Close the View Report window.
Uncheck the "Ignore awards with no teams" checkbox
Press the "View Report" button again.
You will notice a bunch more comparison errors for several awards in the CDS file where there are no teams assigned. This tests the "Ignore awards with no teams" checkbox. We do not need to have empty records on the CCS results, in fact, it's probably wrong that the CDS has them, but Tim doesn't seem to care.

johnbrvc added 2 commits July 21, 2024 17:47
Use natural sort compare for json/tsv fields, so x1 appears before x[10]
Add compare of problem information for scoreboard.
Add constants to control if certain conditions will cause a comparison difference (addresses CDS issue and PC2 issue)
For now, clean up problem id field by converting it back to a string from an elementid.
Do not abort entire compare process if a file is missing.  note the missing file in the output as a failure, but continue doing the other files.
CI: add line number if errors occur during TSV processing (this was an omission in original code)
Change order of presentation of failures in the report file to coincide with the number of failures printed in the beginning.
Add natural compare routine to StringUtilities.
Order results by compare state, then key, then field.  Putting compare state in there groups all errors of the same type together.
Added comments where they were deficient.
If a record (key) exists in one file but not the other, do not display each field that is missing.  It is enough to state the entire key is missing from one file.
Clean up generated report (Pluralize, comments, highlight the filename).
Add GUI flag to ignore empty awards (no teams for the award).  The CDS adds awards that have no teams.  Awards with no teams are meaningless, so this flag will allow you to ignore them, cleaning up the results compare report.
Remove redundant info from the compare report.  Some lines had the same thing (key) repeated 3 times.
Updated Junit to use newer data files and test new features.
@johnbrvc johnbrvc added this to the 9.11.0 milestone Jul 28, 2024
@johnbrvc johnbrvc self-assigned this Jul 28, 2024
Copy link
Collaborator

@SamanwaySadhu SamanwaySadhu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works as described. Code changes look good.

Copy link
Collaborator

@kkarakas kkarakas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Read through the changes except for data, code looks good.

Compare time fields if non-zero or ignore zero flag is not set.
It's possible that one CCS just puts zeroes in for the time.  Previously only checked if shadow had 0 times, now we check for both primary and shadow.
@johnbrvc johnbrvc merged commit b76eea2 into pc2ccs:develop Aug 27, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The Results Compare report generator stops if any file is missing
3 participants