datacamp / pythonwhat

Verify Python code submissions and auto-generate meaningful feedback messages.
http://pythonwhat.readthedocs.io/
GNU Affero General Public License v3.0
67 stars 31 forks source link

SCT feedback on specific arguments: would be really good for beta testing 07/05 #38

Closed hugobowne closed 7 years ago

hugobowne commented 8 years ago

hey guys! we're trying to reproduce something like this is pythonwhat": i.e., being able to provide tailored feedback for each argument passed to a function

screenshot 2016-06-30 11 28 32

we can't get it to work yet. have tried the following + other stuff. How would you do it?

I will beta test without it but would be great because makes student experience far better ;-)

screenshot 2016-06-30 11 25 55 screenshot 2016-06-30 11 26 43

tagging @franciscastro

vvnkr commented 8 years ago

@hugo You are correct, this currently doesn't work:

test_function("open", index=1, args=[0], ...)
test_function("open", index=1, args=[1], ...)

I remember telling you you could give argument-specific feedback like that in pythonwhat but I forgot it is disabled. This is because each function call can only be tested once, it gets blacklisted afterwards because of some implementation technicalities. @filipsch and me will discuss if this is desirable behaviour and fix it/provide an alternative.

filipsch commented 8 years ago

@vincentvankrunkelsven either way, we need a way to fix this: either we want to be able to pass a list that has the same length as the args in incorrect_msg, either we want the blacklisting to work better that you can check the same function call with different test_function() calls (this is how it's done in testwhat, mainly for backwards compatibility reasons).

filipsch commented 8 years ago

@hugobowne I'll look into it. Can't tell when will be fixed.

hugobowne commented 8 years ago

thanks you guys are great 👍

as stated, i will beta test irrespective of this functionality. of course, the sooner the better as it improves user experience so very much ;-)

PEACE!

filipsch commented 7 years ago

I'm working on a fix for this, but I guess it'll only be possible to specify multiple incorrect_msg by simply writing multiple test_function() calls where you each time specifically mention a single argument or keyword. If we would make it possible to specify multiple incorrect messages, then it's hard to figure out which message refers to which argument or which keyword.

filipsch commented 7 years ago

@hugobowne This is currently on staging, will be deployed to master as soon as Robin updates the docker-container (with python autocomplete and bokeh)

This fix allows you to use the syntax vincent used for argument-specific feedback

test_function("open", index=1, args=[0], ...)
test_function("open", index=1, args=[1], ...)

I've also added a piece of documentation on the test_function() article: https://github.com/datacamp/pythonwhat/wiki/test_function#example-3-custom-feedback

Peace out.