Skip to content

Draft visualizer #448

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

Merged
merged 53 commits into from
Apr 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
b37cbfa
copied from mpsijm
mzuenni Apr 5, 2025
f647c2d
update identity
mzuenni Apr 5, 2025
b143e87
update schemas
mzuenni Apr 5, 2025
f876cc0
update doc
mzuenni Apr 5, 2025
8dc03ca
default value for action
mzuenni Apr 5, 2025
6c80df9
move visualizer
mzuenni Apr 5, 2025
c493fd3
remove testcases
mzuenni Apr 5, 2025
0e150f4
add warning for outdated visualizer
mzuenni Apr 5, 2025
59a5965
add output visualizer (and made open more consistent)
mzuenni Apr 5, 2025
c720c20
add comments
mzuenni Apr 5, 2025
5394cb7
implemented output visualizer
mzuenni Apr 6, 2025
f4d7c67
change visualizer interface
mzuenni Apr 6, 2025
08721a7
handle args
mzuenni Apr 6, 2025
880134d
dont use answer_validator_args
mzuenni Apr 6, 2025
b6ca0b3
properly resolve problem paths
mzuenni Apr 7, 2025
3ab0ba8
fix
mzuenni Apr 7, 2025
c566e37
typing
mzuenni Apr 7, 2025
899f232
typing
mzuenni Apr 7, 2025
a4e0637
typing
mzuenni Apr 7, 2025
b12d403
typing
mzuenni Apr 7, 2025
c4458eb
allow empty .ans files for multipass
mzuenni Apr 7, 2025
06c7d54
fix test
mzuenni Apr 7, 2025
ea83959
refactored movetree
mzuenni Apr 7, 2025
4d73c0c
allow moving sylinks
mzuenni Apr 8, 2025
07a5125
improve _move_dir
mzuenni Apr 8, 2025
64c0123
improved user experience
mzuenni Apr 10, 2025
2c801fd
add extra assert
mzuenni Apr 10, 2025
0b87155
substitute more constants in export
mzuenni Apr 11, 2025
fd6c4de
implement visualizer for interactive problems
mzuenni Apr 12, 2025
271a160
`identity` output-visualize also ans and in
thorehusfeldt Apr 13, 2025
293e381
add example arg
mzuenni Apr 13, 2025
960ec8e
fix arg passing
mzuenni Apr 13, 2025
b26ba5e
fix wsl
mzuenni Apr 13, 2025
69f93e6
disable output visualizer again
mzuenni Apr 14, 2025
5290aeb
removed outdated warning
mzuenni Apr 14, 2025
154805b
always copy output visualizer from skel
mzuenni Apr 14, 2025
9aa7cd4
`guess` output visualizer for an interactive problem
thorehusfeldt Apr 14, 2025
00bd79d
update type
mzuenni Apr 15, 2025
5f70588
more feedback
mzuenni Apr 15, 2025
32075e5
Update skel/problem/input_visualizer/readme.md
mzuenni Apr 15, 2025
2c95159
Update skel/problem/input_visualizer/readme.md
mzuenni Apr 15, 2025
8f7385f
Update bin/generate.py
mzuenni Apr 15, 2025
f3e54fa
update version
mzuenni Apr 15, 2025
92956c7
format
mzuenni Apr 15, 2025
06193ac
format
mzuenni Apr 15, 2025
3d28764
added example
mzuenni Apr 15, 2025
1284cd3
update visualizer logic
mzuenni Apr 17, 2025
07cd74d
fix mode
mzuenni Apr 17, 2025
34b82ce
fix mode
mzuenni Apr 17, 2025
fd94e89
simplify code
mzuenni Apr 19, 2025
2c168ef
add warning for deprecated root key
mzuenni Apr 19, 2025
fab7cfd
Problem._parse_testdata_yaml: enforce validator/visualizer args to be…
mpsijm Apr 20, 2025
0d2333f
[visualize] Rename InputVisualizer to TestCaseVisualizer
mpsijm Apr 20, 2025
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
1 change: 1 addition & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,6 @@ jobs:
texlive-science
latexmk
texlive-lang-german
asymptote
- shell: wsl-bash {0}
run: pytest
2 changes: 2 additions & 0 deletions bin/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@
"jobs": (os.cpu_count() or 1) // 2,
"time": 600, # Used for `bt fuzz`
"verbose": 0,
"action": None,
"no_visualizer": True,
}


Expand Down
2 changes: 1 addition & 1 deletion bin/contest.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def problems_yaml() -> Optional[list[dict[str, Any]]]:


def get_api() -> str:
api = config.args.api or contest_yaml().get("api")
api = config.args.api or cast(str, contest_yaml().get("api"))
if not api:
fatal(
"Could not find key `api` in contest.yaml and it was not specified on the command line."
Expand Down
7 changes: 6 additions & 1 deletion bin/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
from latex import PdfType
from problem import Problem
from validate import InputValidator, AnswerValidator, OutputValidator
from visualize import TestCaseVisualizer, OutputVisualizer


def select_languages(problems: list[Problem]) -> list[str]:
Expand Down Expand Up @@ -125,6 +126,8 @@ def build_problem_zip(problem: Problem, output: Path) -> bool:
("submissions/accepted/**/*", True),
("submissions/*/**/*", False),
("attachments/**/*", problem.interactive or problem.multi_pass),
(f"{TestCaseVisualizer.source_dir}/**/*", False),
(f"{OutputVisualizer.source_dir}/**/*", False),
]

# Do not include PDFs for kattis.
Expand Down Expand Up @@ -212,6 +215,8 @@ def add_testcase(in_file: Path) -> None:
f"{OutputValidator.source_dir}/**/*",
# "statement/*", "solution/*", "problem_slide/*", use \constant{} commands
# "submissions/*/**/*", removed support?
f"{TestCaseVisualizer.source_dir}/**/*",
f"{OutputVisualizer.source_dir}/**/*",
]
for pattern in constants_supported:
for f in export_dir.glob(pattern):
Expand Down Expand Up @@ -292,7 +297,7 @@ def add_testcase(in_file: Path) -> None:
validator_flags = " ".join(
problem.get_testdata_yaml(
problem.path / "data",
"output_validator_args",
OutputValidator.args_key,
PrintBar("Getting validator_flags for legacy export"),
)
)
Expand Down
Loading
Loading