Skip to content
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

300 fullstack refactor rubicitems to be dynamic #383

Merged
merged 22 commits into from
Jun 22, 2024

Conversation

19mdavenport
Copy link
Collaborator

Should be fairly self explanatory. Converted the three RubricItem's to an EnumMap, so we can add things to the enum and it becomes a new item

@19mdavenport 19mdavenport requested a review from frozenfrank June 3, 2024 22:43
@19mdavenport 19mdavenport linked an issue Jun 3, 2024 that may be closed by this pull request
@19mdavenport 19mdavenport requested a review from webecke June 3, 2024 22:43
@19mdavenport
Copy link
Collaborator Author

@frozenfrank These changes may be helpful with #239

Copy link
Contributor

@frozenfrank frozenfrank left a comment

Choose a reason for hiding this comment

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

This looks like an overall major improvement to the autograder. I've left comments about potential improvements, but none of them are showstoppers. Thanks for making these helpful adjustments!

src/main/java/edu/byu/cs/autograder/score/Scorer.java Outdated Show resolved Hide resolved
@@ -47,7 +48,7 @@ private <T> Set<T> allPreviousPhases(PhaseFunction<T> func) throws GradingExcept
Phase previous = gradingContext.phase();
while ((previous = PhaseUtils.getPreviousPhase(previous)) != null) {
RubricConfig rubricConfig = DaoService.getRubricConfigDao().getRubricConfig(previous);
if(rubricConfig.passoffTests() != null) {
if(rubricConfig.items().get(Rubric.RubricType.PASSOFF_TESTS) != null) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Note: RubricConfig is still a class. We could provide helpful methods to preserve the existing method calls, and avoid all these code updates.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

There are only two instances where we get this with a specific type in mind rather than a dynamic variable type. I would think that adding extra methods would add extra clutter for not that much added benefit. Do you disagree?

src/main/resources/frontend/src/types/types.ts Outdated Show resolved Hide resolved
src/test/java/edu/byu/cs/autograder/score/ScorerTest.java Outdated Show resolved Hide resolved
@19mdavenport 19mdavenport requested a review from frozenfrank June 5, 2024 20:15
@19mdavenport 19mdavenport self-assigned this Jun 5, 2024
@19mdavenport 19mdavenport merged commit 8c6133c into main Jun 22, 2024
2 checks passed
@19mdavenport 19mdavenport deleted the 300-fullstack-refactor-rubicitems-to-be-dynamic branch June 22, 2024 20:22
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.

fullstack: refactor RubicItems to be dynamic
2 participants