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

Refactor detect_mistakes() to keep two standardized versions of .user_code and .solution_code #356

Merged
merged 4 commits into from
May 30, 2023

Conversation

rossellhayes
Copy link
Contributor

detect_mistakes() now keeps a version of standardized user and solution code with and without default arguments added. Missing arguments are detected by comparing the user code with defaults to the solution code without defaults. Surplus arguments are detected by comparing the user code without defaults to the solution code with defaults.

This helps avoid spurious feedback when comparing code that involves S3 methods. If the user's code differs from the solution code in a way that means a different S3 method is used, the standardized code may gain different default arguments. This could result in feedback about missing or surplus arguments that were added by code standardization rather than by the student, which is not actionable feedback. By no longer looking for default arguments that are missing or surplus in the user code, we ensure that students receive more actionable feedback, likely about the incorrect argument that resulted in the use of a different S3 method.

…n code with and without default arguments added

Detect missing args by comparing user code with defaults to solution code without defaults. Detect surplus args by comparing user code without defaults to solution code with defaults.
@rossellhayes rossellhayes added the bug Something isn't working label May 26, 2023
@rossellhayes rossellhayes self-assigned this May 26, 2023
@rossellhayes rossellhayes merged commit a2ebe90 into main May 30, 2023
@rossellhayes rossellhayes deleted the refactor/detect-mistakes branch May 30, 2023 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant