Skip to content

Implement 'type' field in problem.yaml from 2023-07-draft spec #421

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 7 commits into from
Feb 15, 2025

Conversation

mpsijm
Copy link
Collaborator

@mpsijm mpsijm commented Feb 9, 2025

As promised in #419 (comment), here's an implementation of the type field in problems.yaml for 2023-07-spec 😄

There's still two TODOs I want to tackle before merging, but at the very least I can test this setup when working on the Freshmen Programming Contests now 🙂

mpsijm added a commit that referenced this pull request Feb 11, 2025
Note that the spec is not fully implemented yet.
At least, `validation` will be replaced with `type` in #421.
@mpsijm mpsijm mentioned this pull request Feb 11, 2025
@mpsijm mpsijm force-pushed the problem-type-from-spec branch 2 times, most recently from 3a63b4c to 5572b74 Compare February 12, 2025 07:53
Copy link
Collaborator Author

@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.

I think I'm done implementing type from the new spec 😄 There's two things I'd like to discuss, see the comments.

For the review: the largest change is that ProblemSettings.validation is no longer exposed, since this only works for legacy problems. Instead, the parsing of validation (for legacy) or type (for 2023-07-draft) now only happens in the constructor of ProblemSettings, resulting in three booleans in both ProblemSettings and Problem: interactive, multi-pass, and custom_output. The boolean custom_output is true for interactive, multi-pass, and problems with output_validators/. In other words, custom_output is only false for problems that use the default output validator.

Any other thoughts @RagnarGrootKoerkamp @mzuenni? 😄

@mpsijm mpsijm marked this pull request as ready for review February 12, 2025 20:26
@mpsijm mpsijm merged commit d56ea40 into RagnarGrootKoerkamp:master Feb 15, 2025
3 checks passed
@mpsijm mpsijm deleted the problem-type-from-spec branch February 15, 2025 11:32
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.

2 participants