Skip to content

Legacy export #441

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 16 commits into from
Mar 30, 2025
Merged

Legacy export #441

merged 16 commits into from
Mar 30, 2025

Conversation

mzuenni
Copy link
Collaborator

@mzuenni mzuenni commented Mar 21, 2025

No description provided.

@mzuenni mzuenni marked this pull request as ready for review March 23, 2025 14:21
@mzuenni
Copy link
Collaborator Author

mzuenni commented Mar 23, 2025

@mpsijm I guess this can be merged as well?

@mpsijm
Copy link
Collaborator

mpsijm commented Mar 23, 2025

Didn't immediately have the time to try it out, but I did now 😛

Is there a reason to not include the input validators? They are part of the spec, and they already were in legacy, now that I took another look. I don't know why they were never included 🤔

We could also include the generators/ folder since it's part of the spec now. The spec says to include a README.md to explain how the generators are used, but I guess it's clear enough that it's from BAPCtools (or we can automatically prepend an extra comment in generators.yaml that says it's from BAPCtools) 😛

And if we want to be complete, I don't see why we can't also include the answer validators now. They're a BAPCtools-specific extension, but the spec doesn't forbid including extra files 😇

@mzuenni
Copy link
Collaborator Author

mzuenni commented Mar 23, 2025

I don't know why... probably because this zip was only ever used as import for domjudge/kattis?

@mpsijm
Copy link
Collaborator

mpsijm commented Mar 23, 2025

DOMjudge doesn't run the input validators, but Kattis does. I guess DOMjudge is free to choose this, but it also doesn't hurt to include the validators for archival completeness.

@RagnarGrootKoerkamp do you know why the input validators are not in the zip currently?

@mzuenni
Copy link
Collaborator Author

mzuenni commented Mar 23, 2025

(for kattis we do export them)

@RagnarGrootKoerkamp
Copy link
Owner

Yeah, what @mzuenni said. It probably was domjudge-first and we simply never bothered/realized it.

@mpsijm
Copy link
Collaborator

mpsijm commented Mar 23, 2025

Fair enough! I think we can simply export everything then, no reason to leave anything out (tools that don't know how to use some directories, can simply ignore them) 🙂

@mzuenni
Copy link
Collaborator Author

mzuenni commented Mar 27, 2025

@mpsijm do you have time to take a look?

Copy link
Collaborator

@mpsijm mpsijm left a comment

Choose a reason for hiding this comment

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

Made two small documentation fixes, looking good to me 😄 At least, it works for me on the English-only problems from last year 😛

Ready to squash-and-merge? 🙂

@mzuenni
Copy link
Collaborator Author

mzuenni commented Mar 28, 2025

Some tests here would be good? I am really unsure if this works as we want... mostly because I have no idea what we want since I have never used these features ^^'

@thorehusfeldt do you have multi-language problems/contest to test that nothing breaks and behaves as expected?

@mpsijm mpsijm mentioned this pull request Mar 30, 2025
@mpsijm
Copy link
Collaborator

mpsijm commented Mar 30, 2025

I've added some tests verifying the current behaviour (which I think is the correct behaviour). Basically, the test compares the list of files in the resulting ZIP with some hand-crafted list of files, to see if the contents match 🙂

Also, I've renamed --languages to --lang, as @RagnarGrootKoerkamp suggested in #442 (comment).

If you (and the CI) agree with the tests that I added, this can be squashed-and-merged 😄

@mpsijm mpsijm mentioned this pull request Mar 30, 2025
@mpsijm mpsijm merged commit b9ad3fd into draft Mar 30, 2025
6 checks passed
@mpsijm mpsijm deleted the legacy-export branch March 30, 2025 11:13
@mpsijm mpsijm mentioned this pull request Mar 30, 2025
17 tasks
mpsijm added a commit that referenced this pull request Mar 30, 2025
* make legacy export an explicit command

* [export] Add all the directories!

* [export] Legacy: remove solution/ and problem_slide/ from export dir

* [export] Make answer_validators/ not required

Apparently, `bt validate` also doesn't require them?

* prepend problem name

* fix test

* handle languages

* use ngerman

* add german to wsl

* keep languages in sync

* keep languages in sync

* [export] Add comment explaining why name in problems.yaml can also be str

* [doc] Improve singular/plural in explanation of `--languages`

* [export][latex] Rename --languages flag to --lang

* [test][export] Add assertions for which PDFs should be in the ZIPs

* [test] TestContest.test_zip: also remove constituent zip files after test completes

---------

Co-authored-by: Maarten Sijm <[email protected]>
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.

3 participants