[HnR-Autograder:2] Per-phase auto-grading config model - #7440
Draft
Elimpizza wants to merge 1 commit into
Draft
Conversation
Elimpizza
marked this pull request as ready for review
August 24, 2026 14:08
Elimpizza
marked this pull request as draft
August 24, 2026 14:08
karenrasmussen
approved these changes
Aug 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a chainable configuration model for auto-grading phases in assignments. The main change is the addition of a self-referential foreign key in the
AutoGradingConfigmodel, allowing configurations to be linked in a sequence (or "chain"). Comprehensive unit tests are also added to ensure the correctness of this new structure and its constraints. Additionally, minor corrections are made to the test factories.AutoGradingConfig model enhancements:
previous_config_idfield toAutoGradingConfig, which is a self-referential foreign key, allowing each config to point to the previous one in the chain. This field is unique (except forNULL), nullable, and uses a custom constraint name to avoid Postgres identifier length issues.previous_configrelationship to the model for convenient ORM access to the previous config object.Testing improvements:
TestAutoGradingConfigtest class that verifies:previous_config_idasNULL(for different assignments).IntegrityErrorfor testing uniqueness constraint violations.Test factory corrections:
activity_calculationandgrading_typein theAutoGradingConfigfactory to use the correct enum types.