Skip to content

Compare piped code at the same level #185

Open

Description

@gadenbuie

For exercises like

# user code
a %>% b()

# solution code
a %>% b() %>% c() %>% d()

the graded code that's compared is b(a) vs d(c(b(a)) and the outer calls of the user code are compared to the inner calls of the solution.

This results in

I expected d() where you wrote b()

which jumps the user to the end rather than providing feedback about their next step. I haven't explored how feasible it is, but it would be good to try to notice the extra levels of functions calls when comparing to be able to report

I expected you to call c()

Activity

  1. added
    grade code
    on Jan 11, 2021
  2. garrettgman commented on Feb 7, 2022

    @garrettgman
    Member

    + 1

    It'd be great to also recast the message as a %>% hint if we spot that they are using %>%, e.g.

    I expected you to add `%>% c()` after you called `b()`.
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    grade code

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions