{"action":"created","issue":{"url":"https://api.github.com/repos/datacamp/pythonwhat/issues/130","repository_url":"https://api.github.com/repos/datacamp/pythonwhat","labels_url":"https://api.github.com/repos/datacamp/pythonwhat/issues/130/labels{/name}","comments_url":"https://api.github.com/repos/datacamp/pythonwhat/issues/130/comments","events_url":"https://api.github.com/repos/datacamp/pythonwhat/issues/130/events","html_url":"https://github.com/datacamp/pythonwhat/issues/130","id":183693111,"number":130,"title":"Rethinking how pythonwhat raises errors for instructors","user":{"login":"machow","id":2574498,"avatar_url":"https://avatars.githubusercontent.com/u/2574498?v=3","gravatar_id":"","url":"https://api.github.com/users/machow","html_url":"https://github.com/machow","followers_url":"https://api.github.com/users/machow/followers","following_url":"https://api.github.com/users/machow/following{/other_user}","gists_url":"https://api.github.com/users/machow/gists{/gist_id}","starred_url":"https://api.github.com/users/machow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/machow/subscriptions","organizations_url":"https://api.github.com/users/machow/orgs","repos_url":"https://api.github.com/users/machow/repos","events_url":"https://api.github.com/users/machow/events{/privacy}","received_events_url":"https://api.github.com/users/machow/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"machow","id":2574498,"avatar_url":"https://avatars.githubusercontent.com/u/2574498?v=3","gravatar_id":"","url":"https://api.github.com/users/machow","html_url":"https://github.com/machow","followers_url":"https://api.github.com/users/machow/followers","following_url":"https://api.github.com/users/machow/following{/other_user}","gists_url":"https://api.github.com/users/machow/gists{/gist_id}","starred_url":"https://api.github.com/users/machow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/machow/subscriptions","organizations_url":"https://api.github.com/users/machow/orgs","repos_url":"https://api.github.com/users/machow/repos","events_url":"https://api.github.com/users/machow/events{/privacy}","received_events_url":"https://api.github.com/users/machow/received_events","type":"User","site_admin":false},"assignees":[{"login":"machow","id":2574498,"avatar_url":"https://avatars.githubusercontent.com/u/2574498?v=3","gravatar_id":"","url":"https://api.github.com/users/machow","html_url":"https://github.com/machow","followers_url":"https://api.github.com/users/machow/followers","following_url":"https://api.github.com/users/machow/following{/other_user}","gists_url":"https://api.github.com/users/machow/gists{/gist_id}","starred_url":"https://api.github.com/users/machow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/machow/subscriptions","organizations_url":"https://api.github.com/users/machow/orgs","repos_url":"https://api.github.com/users/machow/repos","events_url":"https://api.github.com/users/machow/events{/privacy}","received_events_url":"https://api.github.com/users/machow/received_events","type":"User","site_admin":false}],"milestone":null,"comments":4,"created_at":"2016-10-18T13:54:16Z","updated_at":"2016-12-12T23:27:21Z","closed_at":"2016-12-12T23:27:21Z","body":"In the current code, pythonwhat often runs tests twice. The first is to potentially raise an error for instructors, while the second is to test the submission. For example, looking at whether an object is defined in `test_object`...\n\n``` python\n    if not isDefinedInProcess(name, solution_process):\n        raise NameError(\"%r not in solution environment \" % name)\n\n    rep.do_test(DefinedProcessTest(name, student_process, Feedback(undefined_msg)))\n```\n\nthe first check raises an error if it is not defined in the solution. This is for the instructor, but essentially is just a duplication of testing. **Would it work to just run solution code as the submission code for instructors (e.g. remove the if block)?**\n\nThere are a couple benefits\n1. The checks for instructors only need to run while developing, but currently run every time.\n2. May cut down on a lot of duplication.\n3. Reflects that the solution code is just one of many passing submissions being tested.\n4. Matches how the validator currently operates\n"},"comment":{"url":"https://api.github.com/repos/datacamp/pythonwhat/issues/comments/266586893","html_url":"https://github.com/datacamp/pythonwhat/issues/130#issuecomment-266586893","issue_url":"https://api.github.com/repos/datacamp/pythonwhat/issues/130","id":266586893,"user":{"login":"machow","id":2574498,"avatar_url":"https://avatars.githubusercontent.com/u/2574498?v=3","gravatar_id":"","url":"https://api.github.com/users/machow","html_url":"https://github.com/machow","followers_url":"https://api.github.com/users/machow/followers","following_url":"https://api.github.com/users/machow/following{/other_user}","gists_url":"https://api.github.com/users/machow/gists{/gist_id}","starred_url":"https://api.github.com/users/machow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/machow/subscriptions","organizations_url":"https://api.github.com/users/machow/orgs","repos_url":"https://api.github.com/users/machow/repos","events_url":"https://api.github.com/users/machow/events{/privacy}","received_events_url":"https://api.github.com/users/machow/received_events","type":"User","site_admin":false},"created_at":"2016-12-12T23:27:20Z","updated_at":"2016-12-12T23:27:20Z","body":"closing for now, at some point it may be worth implementing error messages for instructors using their own exception, (SolutionError or something), so that it can be reliably detected and dealt with in try/except blocks."}}
{"actor":{"display_login":"machow"}}