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

Improve type coverage for auto-grading #6655

Merged
merged 1 commit into from
Sep 5, 2024
Merged

Conversation

acelaya
Copy link
Contributor

@acelaya acelaya commented Sep 4, 2024

This PR adds some extra types around auto-grading, with the purpose of:

  1. Being more strict on what can be sent to the deep-linking API, based on the server types defined in Forward auto-grading settings to DL assignments #6641
  2. Prepare for when the dashboard has access to the auto-grading config for assignments, based on the work on Define types for autograding shared with the frontend #6650

Both server/python types are equivalent, so we are reusing the same definition here.

@@ -160,6 +161,10 @@ function PanelLabel({
);
}

type DeepLinkingAPIData = Record<string, unknown> & {
auto_grading_config: APIAutoGradingConfig | null;
};
Copy link
Contributor Author

Choose a reason for hiding this comment

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

For now I have only defined types for auto_grading_config, which is the most complex prop.

We can enhance this type later with the other known props.

* If defined, it indicated this assignment was configured with auto grading
* enabled.
*/
auto_grading_config?: AutoGradingConfig;
Copy link
Contributor Author

@acelaya acelaya Sep 4, 2024

Choose a reason for hiding this comment

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

This property will be returned only from the /api/dashboard/assignment/{assignment_id} endpoint.

The items from the metrics and filters lists will not include this prop.

@marcospri can you confirm my assumption is correct?

Copy link
Member

Choose a reason for hiding this comment

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

The items from the metrics and filters lists will not include this prop.

Yes 👍

@acelaya acelaya requested a review from robertknight September 4, 2024 13:55
@acelaya acelaya force-pushed the type-safe-auto-grading branch 2 times, most recently from 90ea75f to 32f650d Compare September 5, 2024 07:49
@acelaya acelaya force-pushed the type-safe-auto-grading branch from 32f650d to a299fb4 Compare September 5, 2024 09:18
@acelaya acelaya merged commit ffc2af3 into main Sep 5, 2024
9 checks passed
@acelaya acelaya deleted the type-safe-auto-grading branch September 5, 2024 09:21
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