Releases: rstudio/gradethis
Releases · rstudio/gradethis
Version 0.2.14
grade_code()
no longer fails if.envir_result
or.envir_solution
is missing (#355).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 (#356).- 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.
- The
gradethis_equal.list()
method is now only used if bothx
andy
are bare lists (as defined byrlang::is_bare_list()
) (#357).- This fixes a bug where a list could be marked as equal to another object with the same contents but a different class, e.g.
list(a = 1, b = 2)
andc(a = 1, b = 2)
ordata.frame(a = 1, b = 2)
.
- This fixes a bug where a list could be marked as equal to another object with the same contents but a different class, e.g.
- Fix bug where
call_standardise_formals()
would fail when given apurrr::map()
function where.f
is an index rather than a function (#359).
Version 0.2.13
code_feedback()
now standardizes arguments to functions defined within student and solution code before comparing code. It also now successfully standardizes arguments passed through...
by mapping functions into functions defined by setup code (#349).gradethis_equal()
now has a method for objects of classlist
. If two lists are notidentical()
and their lengths are the same,gradethis_equal()
is applied to each element pairwise. This allows special logic for specific classes to be used for list elements of that class (#351).call_standardise_formals()
now appliesggplot2::standardise_aes_names()
to all arguments ofggplot2
functions. This means it no longer detects inconsequential differences between, e.g.,color =
andcolour =
(#353).- When an exercise without an
-error-check
chunk returns an error, the default feedback now includes both the error message and code feedback iffail.hint = TRUE
. Previously the error message was only shown whenfail.hint = FALSE
and code feedback was only shown whenfail.hint = TRUE
(#352).
Version 0.2.12.9005
gradethis_equal()
now has default arguments ofx = .result
andy = .solution
(#347).gradethis_equal.default()
now has a default argument oftolerance = sqrt(.Machine$double.eps)
.
Version 0.2.12.9004
Version 0.2.12.9003
call_standardise_formals()
now attempts to standardize arguments passed through...
in mapping functions likelapply()
orpurrr::map()
(#344).
Version 0.2.12.9002
Version 0.2.12.9000
- New functions:
user_object_get()
,user_object_exists()
anduser_object_list()
can be used to interact with objects created by the student's code.solution_object_get()
,solution_object_exists()
andsolution_object_list()
do the same for objects created by the solution code (#333). - New function:
with_exercise()
allows you to evaluate an expression as if it were run insidegrade_this()
with an associated exercise. It can be used alongsidemock_this_exercise()
for testing grading code outside the context of a learnr tutorial (#333). .envir_solution
is now included in thegrade_this()
check environment alongside.envir_prep
and.envir_result
..envir_solution
contains the state of the environment used to execute solution code, just as.envir_result
does for student code (#333).