Skip to content

Output vizualizer #2744

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

Open
wants to merge 54 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
ebb0b43
Fix judgehost check if its enabled
vmcj Oct 13, 2024
a43209a
Future work
Oct 13, 2024
d3eec0c
Store new visualizer type
Oct 13, 2024
cdc1692
Make the doctrine links
Oct 13, 2024
88c0e88
This should be part of the ProblemZip
Oct 13, 2024
131abb5
Add simple output_validator
Oct 13, 2024
5e3406f
Assume this will be put in the spec
Oct 13, 2024
3b40afa
Allow upload of the output_visualizer
Oct 13, 2024
d4f4401
First try on import
Oct 13, 2024
101cc03
Give icon for new executable type
Oct 13, 2024
69d99dc
Display the problem badge
Oct 14, 2024
df61e4a
Display on the executable page itself
Oct 14, 2024
a956b58
Add button to generate the visualization
Oct 13, 2024
fbe7358
Show executable in problem page
Oct 13, 2024
2986727
Leave this for the demo
Oct 14, 2024
d79783d
Remember if we already requested visualization
Oct 14, 2024
8de3e52
Create the needed judgetasks
Oct 14, 2024
f3b96e1
Fix PHPStan issues
Oct 15, 2024
f6baa3a
Fix syntax error
Oct 15, 2024
76deaaf
Just move the whole code away for now
Oct 15, 2024
aa062d7
And more errors as the needed code was commented out
Oct 15, 2024
2963350
Revert later - Fixate hostname for api/doc debugging
Oct 15, 2024
f0dcaec
Fix API for when you test on a deeper dir
Oct 15, 2024
1636944
New migrations
Oct 16, 2024
1af147a
Test the search in an unrelated page
Oct 16, 2024
d88d0c0
Also get the new visualization `JudgeTask`s
Oct 16, 2024
e56a83f
Return the visualizer jobs
Oct 16, 2024
3a05304
Store the judgetask
Oct 15, 2024
87ca226
Working on the judgehost side
Oct 15, 2024
5d5d6c6
Fix output to create the image
Oct 17, 2024
52fde24
Finish
Oct 17, 2024
ac0679c
Add forgotten class
Oct 17, 2024
1edc428
Fix the visualizer script
Oct 17, 2024
9362b92
Cleanup the judgehost file
Oct 17, 2024
812042e
Check returncode as `FIXME`.
Oct 18, 2024
eca9e35
Merge migrations
Oct 18, 2024
de746eb
Cleanup unrelated testing
Oct 18, 2024
70ee0e4
Update webapp/src/Entity/Visualization.php
vmcj Oct 18, 2024
7bcac2b
Update webapp/src/Controller/API/JudgehostController.php
vmcj Oct 18, 2024
0a7daca
Update webapp/migrations/Version20241018061817.php
vmcj Oct 18, 2024
7190795
Update webapp/migrations/Version20241018061817.php
vmcj Oct 18, 2024
c424d21
Update webapp/src/Controller/API/JudgehostController.php
vmcj Oct 18, 2024
fa3e2ed
Update webapp/src/Controller/API/JudgehostController.php
vmcj Oct 18, 2024
7641e17
Update webapp/src/Controller/API/JudgehostController.php
vmcj Oct 18, 2024
5b9c970
Update webapp/src/Controller/Jury/UserController.php
vmcj Oct 18, 2024
031d24a
Remove dump and debug statements
Oct 18, 2024
51d3cc3
Cleanup unused code
Oct 18, 2024
d34fce3
Fix missing `$run`
Oct 18, 2024
d616057
Prevent duplication of code
Oct 18, 2024
ed5e47c
Not used
Oct 18, 2024
f9de23c
Fix W3C test
Oct 18, 2024
f7e7e23
Fixup
Oct 18, 2024
28c3904
Add last forgotten code
Oct 18, 2024
2b6afcd
Fixup
Oct 18, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix PHPStan issues
  • Loading branch information
Michael Vasseur committed Oct 15, 2024
commit f3b96e1be401230f6811e8369090d004c516a69c
8 changes: 4 additions & 4 deletions webapp/src/Controller/Jury/SubmissionController.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php declare(strict_types=1);

Check warning on line 1 in webapp/src/Controller/Jury/SubmissionController.php

View workflow job for this annotation

GitHub Actions / phpcs

A file should declare new symbols (classes, functions, constants, etc.) and cause no other side effects, or it should execute logic with side effects, but should not do both. The first symbol is defined on line 64 and the first side effect is on line 60.

namespace App\Controller\Jury;

Expand Down Expand Up @@ -57,11 +57,11 @@

#[IsGranted('ROLE_JURY')]
#[Route(path: '/jury/submissions')]
class SubmissionController extends BaseController

Check warning on line 60 in webapp/src/Controller/Jury/SubmissionController.php

View workflow job for this annotation

GitHub Actions / phpcs

Possible parse error: class missing opening or closing brace

Check warning on line 60 in webapp/src/Controller/Jury/SubmissionController.php

View workflow job for this annotation

GitHub Actions / phpcs

Possible parse error: class missing opening or closing brace
{
use JudgeRemainingTrait;

public function __construct(

Check failure on line 64 in webapp/src/Controller/Jury/SubmissionController.php

View workflow job for this annotation

GitHub Actions / phpcs

Line indented incorrectly; expected 0 spaces, found 4
EntityManagerInterface $em,
protected readonly EventLogService $eventLogService,
DOMJudgeService $dj,
Expand All @@ -71,10 +71,10 @@
KernelInterface $kernel,
) {
parent::__construct($em, $eventLogService, $dj, $kernel);
}

Check failure on line 74 in webapp/src/Controller/Jury/SubmissionController.php

View workflow job for this annotation

GitHub Actions / phpcs

Line indented incorrectly; expected 0 spaces, found 4

#[Route(path: '', name: 'jury_submissions')]
public function indexAction(

Check failure on line 77 in webapp/src/Controller/Jury/SubmissionController.php

View workflow job for this annotation

GitHub Actions / phpcs

Line indented incorrectly; expected 0 spaces, found 4
Request $request,
#[MapQueryParameter(name: 'view')]
?string $viewFromRequest = null,
Expand Down Expand Up @@ -175,13 +175,13 @@
$data["form"] = $form->createView();

return $this->render('jury/submissions.html.twig', $data, $response);
}

Check failure on line 178 in webapp/src/Controller/Jury/SubmissionController.php

View workflow job for this annotation

GitHub Actions / phpcs

Line indented incorrectly; expected 0 spaces, found 4

/**
* @throws NonUniqueResultException
*/
#[Route(path: '/{submitId<\d+>}', name: 'jury_submission')]
public function viewAction(

Check failure on line 184 in webapp/src/Controller/Jury/SubmissionController.php

View workflow job for this annotation

GitHub Actions / phpcs

Line indented incorrectly; expected 0 spaces, found 4
Request $request,
int $submitId,
#[MapQueryParameter(name: 'jid')]
Expand Down Expand Up @@ -600,20 +600,20 @@
}

return $this->render('jury/submission.html.twig', $twigData);
}

Check failure on line 603 in webapp/src/Controller/Jury/SubmissionController.php

View workflow job for this annotation

GitHub Actions / phpcs

Line indented incorrectly; expected 0 spaces, found 4

#[Route(path: '/request-full-debug/{jid}', name: 'request_full_debug')]
public function requestFullDebug(Request $request, Judging $jid): RedirectResponse

Check failure on line 606 in webapp/src/Controller/Jury/SubmissionController.php

View workflow job for this annotation

GitHub Actions / phpcs

Line indented incorrectly; expected 0 spaces, found 4
{
$submission = $jid->getSubmission();
$defaultFullDebugExecutable = $this->em
->getRepository(Executable::class)
->findOneBy(['execid' => $this->config->get('default_full_debug')]);
if ($defaultFullDebugExecutable === null) {

Check failure on line 612 in webapp/src/Controller/Jury/SubmissionController.php

View workflow job for this annotation

GitHub Actions / phpcs

Line indented incorrectly; expected 4 spaces, found 8
$this->addFlash('error', 'No default full_debug executable specified, please configure one.');
} else {

Check failure on line 614 in webapp/src/Controller/Jury/SubmissionController.php

View workflow job for this annotation

GitHub Actions / phpcs

Line indented incorrectly; expected 4 spaces, found 8
$executable = $defaultFullDebugExecutable->getImmutableExecutable();
foreach ($jid->getJudgehosts() as $hostname) {

Check failure on line 616 in webapp/src/Controller/Jury/SubmissionController.php

View workflow job for this annotation

GitHub Actions / phpcs

Line indented incorrectly; expected 8 spaces, found 12
$judgehost = $this->em
->getRepository(Judgehost::class)
->findOneBy(['hostname' => $hostname]);
Expand Down Expand Up @@ -1315,9 +1315,9 @@
$judgingId = $judging->getJudgingid();
if ($judging->getResult() === null) {
$inProgress[] = $judgingId;
} elseif (false and $judging->getVisualization()) {
/*} elseif ($judging->getVisualization()) {
$alreadyRequested[] = $judgingId;
} elseif (!$judging->getValid()) {
}*/ elseif (!$judging->getValid()) {

Check failure on line 1320 in webapp/src/Controller/Jury/SubmissionController.php

View workflow job for this annotation

GitHub Actions / phpstan

Syntax error, unexpected T_ELSEIF, expecting '}' on line 1320
$invalidJudgings[] = $judgingId;
} else {
$outs = $judging->getRuns()->toArray();
Expand All @@ -1344,14 +1344,14 @@
if ($inProgress !== []) {
$this->addFlash('warning', 'Please be patient, this visualization is still in progress.');
}
if ($alreadyRequested !== []) {
if ($alreadyRequested != []) {
$this->addFlash('warning', 'This visualization was already requested to be judged completely.');
}
} else {
if ($inProgress !== []) {
$this->addFlash('warning', sprintf('Please be patient, these visualizations are still in progress: %s', implode(', ', $inProgress)));
}
if ($alreadyRequested !== []) {
if ($alreadyRequested != []) {
$this->addFlash('warning', sprintf('These judgings were already requested to be judged completely: %s', implode(', ', $alreadyRequested)));
}
if ($invalidJudgings !== []) {
Expand Down
1 change: 1 addition & 0 deletions webapp/src/Service/ImportProblemService.php
Original file line number Diff line number Diff line change
Expand Up @@ -1049,6 +1049,7 @@ private function helperSearchAndAddProgram(ZipArchive $zip, ?array &$messages, s
->setImmutableExecutable($this->dj->createImmutableExecutable($zipArchive))
->setDescription(sprintf('%s for %s', $programStrings['type'], $problem->getName()));

$combinedRunCompare = false;
if ($programStrings['type'] === 'output validator') {
$combinedRunCompare = $programMode == 'custom interactive';
$executable->setType($combinedRunCompare ? 'run' : 'compare');
Expand Down
Loading
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy