-
Notifications
You must be signed in to change notification settings - Fork 1
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
Polymorphic Exercises #372
Open
LeonWehrhahn
wants to merge
22
commits into
develop
Choose a base branch
from
feature/modeling/caching
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains 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
…apping and uniqueness resolution
…tum/Athena into feature/modeling/reference
…tum/Athena into feature/modeling/reference
…n feedback model conversion
…tionships; fix foreign key references and ensure proper inheritance structure.
…remove debug prints, update caching logic, and change serialization method for structured grading instructions
LeonWehrhahn
changed the title
Polymorphic Exercises and Persistent Grading Instructions
Polymorphic Exercises
Dec 7, 2024
…ion model, update imports
LeonWehrhahn
temporarily deployed
to
athena-test1.ase.cit.tum.de
January 11, 2025 14:36 — with
GitHub Actions
Inactive
github-actions
bot
added
lock:athena-test1
Is currently deployed to Athena Test Server 1
and removed
deploy:athena-test1
Athena Test Server 1
labels
Jan 11, 2025
LeonWehrhahn
removed
the
lock:athena-test1
Is currently deployed to Athena Test Server 1
label
Jan 11, 2025
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.
Motivation and Context
This PR refactors the database structure to resolve a limitation with referencing different exercise types from general tables. While not a past problem, the addition of general tables like structured_grading_instructions introduces following issue: Without a general exercises table, referencing exercises from such tables would be cumbersome. Potential solutions, such as using separate foreign keys for each exercise type (e.g., exercise_modeling_id, exercise_programming_id), creating multiple structured grading tables, or relying solely on hashing without direct database references, are not ideal and lead to redundancy and maintenance challenges.
Description
The exercise database structure is refactored to utilize SQLAlchemy's polymorphic inheritance. A general
exercises
table now serves as the base, storing common attributes and establishing a parent-child relationship with type-specific tables (e.g.,modeling_exercises
). This change allows the creation of general tables, such asstructured_grading_instructions
, that can now reference exercises generically.Steps for Testing
Verify that exercise persisting for all types is still working.
Testserver States
Note
These badges show the state of the test servers.
Green = Currently available, Red = Currently locked
Click on the badges to get to the test servers.
Screenshots